December 2019 Archives

Paws XXXXII (A little help from my friends)

Now that I have at least one call working 'ListJobs' I reran the full test suit and to my surprise I got no fails. So maybe it is going to be an easy ride?

Well I was dead wrong.

Just spent the last few days banging my head against the AWS servers thinking that if the first 825 attempts to get 'CreateJob' to work, the 826th would of work.

I think I got sucked into the gambler's fallacy.

Well lets just say 826 attempt is most likely an order of magnitude under the number of dif…

Paws XXXXI (Doubble Sawbuck plus 1)

I was hoping that I would have an easy time with S3Control once I figured out the XML problems. Sadly I was a little premature on that thought.

I spent a good while over the past few days getting either an 'Access Denied' or 'Forbidden' response to my 'CreateJob' call.

I eventually though that I might as well try one of the simpler calls and get that working and then work may way up. So I tried the simplest of all;


 my $s3 = Paws->service(
    'S3Control',
    region => 'us-east-1',
    debug  => 1,
    caller => FullTes…

Paws XXXX (A new Start)

The next chapter in the 'Book of PAWS' is to the S3 control working.

I do not see this project to go on to long as the S3 as there are only eight actions that are exposed by the S3control API. Given this, the many fixes I have made to the XML Rests side of the perl code my full test suite and my handy test generating caller. I think I can get this control working very quicky.

Well to start out I decided to have a quick look at the Documentation for AWS S3 Control
https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_AWS_S3_Control.html and looking there I no…

Paws XXXIX (The Paws is Dead. Long Live the Paws)

S3 is a wrap was quite the journey since September.

The end result

  • All non depreciated S3 actions on API work
  • A new test case 09_requests.t and test for each action was created
  • All none deprecated action now have a 10_response test as well
  • A new Caller that generates both 09 and 10 test case
  • NO changes needed to BOTO

The most important aspect of my changes in my opinion is figuring out how to handle the botocode correctly to cover all the use cases. It was a slow iterative process and what really saved my but …

Paws XXXVII (So close but yest so far)

Well I was just about ready to check everything in on S3 Paws and move onto the next part of Paws that need some love and kindness when I did one last review of all the test cases I have created over the past little while when I discovered I had left one out.

I forgot to add in a request test case for the 'DeleteBucketMetricsConfiguration' action. It took the opportunity to use my new test generator a spin as well so I fired up my real world call with the new caller and much to my chagrin I got an error;

'The specified configuration does not exist.',

Which could be th…

Paws XXXVI (Still not finished.)

Well finally got the last of my tests done for S3, not much of a story as most of the test cases at least for the 'PUT' actions cases were mostly made up of two tests 'load' the results class and check the value of the '_request_id'.

That being said I still had some 80 tests that where failing most of them where this '_request_id' test. Seems when I was doing my test generator I was creating the test for '_request_id' but forgot to add it to the test content.

So a little change to 'FullTestMakerLWPCaller.pm'


sub write_response_test {
…

Paws XXXV (Well not a wrap but close)

Well it looks like a wrap for Paws S3

I made up my own test creation caller. No rocket science in this one. I just added in a few useful attributes;


has [
    qw(make_response_test
      make_request_test
      warn_response
      warn_request
      )
  ] => (
    is      => 'ro',
    isa     => 'Bool',
    default => 0,
  );

has [
qw(response_test_dir
request_test_dir
)
] => (
is => 'ro',
isa => 'Str',
default => "",
);
/users/byterock/2019/12/index.html

Paws XXXIV (Yet more code)

Well after spending a little while trying to create an auto test generator I found the test generator script that came with PAWS.

So I decided to try it out. With only a little fudging of the code internals, no real code changes just changes to libs, I got it to work;

perl script/paws_make_testcase  S3 --region us-east-1 GetBucketLocation Bucket: "dev.cargotel.test"

the test file it generated /0001.response.test.yml;


--
tests:
  - expected: eu-west-2
    op: eq
    path: LocationConstraint

So that is ok. …

Paws XXXIII (A little advice please)

Well some-days it would be nice to get a little advice, without asking for it, before one heads down a very long and in the end futile path.

Today that happened to me when I was starting down a path that I dreaded. Namely creating the 'response' test suite for all those S3 requests I have fixed up over the past few weeks. This type of programming ranges from so mind numbingly dull as to cause your ears to bleed to so incredibility repetitive that you consider that career change to line supervisor at the box factory.

Looking at the prospect of coveting some 70+ working S3 un…

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations