Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Matthew Bonig
    @mbonig
    I think a guide for extending vs wrapping would be a good idea
    Gary Parker
    @garyaparker
    Thanks, @mbonig . I'll see about getting a PR in for a small guide on extending constructs. I also realized after posting here this should have gone into the other gitter channel. Thanks for the tolerance :)
    Matthew Bonig
    @mbonig
    ha, no problem.
    are you talking a PR for the OCF or for Secure-bucket?
    I'm making the change (going to use a branch) right now
    Gary Parker
    @garyaparker
    I was thinking of adding a guide to the OCF site.
    Philipp Garbe
    @pgarbe
    In my opinion, you should inherit only if you just change some properties of an existing Construct., like the SecureBucket. But when you combine multiple Constructs together to build something new it should be it's own Construct.
    Gary Parker
    @garyaparker
    Totally agree. That's a good call out and I'll be sure to include that in an explanation of when you would want to extend a class vs creating a new construct.
    Matthew Bonig
    @mbonig
    Please submit a PR at the OCF site. I am updating the SecureBucket repo
    alright, updated version (not published, mind you)
    Daniel Schroeder
    @udondan
    i was wondering why my iam package wasn't showing up in the catalog so i debugged it a bit. turns out by default the npmjs api does not return package < 1.0.0
    is this intended @eladb?
    i have seen in the docgen package there is code in place for unstable packages. of course, this only makes sense in case of cdk core packages . they are > 1.0.0 but still might be unstable. and core packages now are all excluded from the catalog.
    Daniel Schroeder
    @udondan
    would you accept a PR for modifying the query to include packages < 1.0.0? it's tricky though. i haven't found a way to get all results in a single query. you need to run 2 queries, onw with is:unstable and one with not:unstable. there is no idontcare:unstable and i haven't seen any advanced query features where you could define an or
    Elad Ben-Israel
    @eladb
    Absolutely!
    TIL
    Weirdly though cdk8s is pre 1.0 and it is being picked up by the catalog
    Daniel Schroeder
    @udondan
    Hmm. That's true. Also cdk-spot-blocks is 0.1.10 and was announced today... 🤔
    Now that's really confusing... I was only able to find my page when I added is:unstable to the query. I'll look into it again tomorrow.
    *package
    Elad Ben-Israel
    @eladb
    We’ve seen npm hiccups like that in the past
    Try to publish another version
    (Yeah I know...)
    Daniel Schroeder
    @udondan
    yeah, i have to say, the npmjs api is quite a bad experience. just the fact that you have to query all the effing packages every time and cannot limit by date...
    Elad Ben-Israel
    @eladb
    Yah
    Daniel Schroeder
    @udondan
    in regards to re-publish. i had released 4 versions so far and none had been picked up. that's why i started investigating in the first place
    Daniel Schroeder
    @udondan
    something else. i have noticed the ingenstion function pretty much always times out in my account. from what i understand is, that this is caused by a bottleneck in the dynamoDB. sometimes it throws an error of type ProvisionedThroughputExceededException. i already implemented a retry, additional to the retry already contained in the dynamodb.putItem method. also increased the lambda timeout to 2 minutes, still timing out
    i'm working on resolving this, but just wondered: doesn't the same thing happen in your prod setup?
    the default write throughput for provisioned dynamodb instances is pretty pretty low. i increased it, still no luck
    Elad Ben-Israel
    @eladb
    I need to dig into this. Embarrassingly we don’t have monitoring over there so could very well be that we consumed some capacity
    Daniel Schroeder
    @udondan
    my current idea/approach is to inspect the release date of packages. packages older than X don't need to be written to the DB. thats's no-op, assuming they're already there. i'll play with this later but gotta go now
    btw, setting up the catalog in my test account worked almost instantly. just another proof how aweseom cdk is :D
    Daniel Schroeder
    @udondan
    alright, so I have no clue how to fix this. the ingernstion function has logic for pagination
    but after debugging and readinfg the docs... i believe there simply aint no support for pagination in that darn api
    and there is no way to retrieve more than 250 results
    10:46:44 :/private/tmp$ curl -s http://registry.npmjs.com/-/v1/search?text=keywords:cdk\&page=0\&size=10 | jq "[.objects[].package.name]"
    [
      "@angular/cdk",
      "@aws-cdk/core",
      "constructs",
      "@aws-cdk/aws-iam",
      "@aws-cdk/aws-lambda",
      "@aws-cdk/cx-api",
      "@aws-cdk/aws-s3",
      "@aws-cdk/aws-ec2",
      "@aws-cdk/aws-events",
      "@aws-cdk/aws-sns"
    ]
    10:46:49 :/private/tmp$ curl -s http://registry.npmjs.com/-/v1/search?text=keywords:cdk\&page=100\&size=10 | jq "[.objects[].package.name]"
    [
      "@angular/cdk",
      "@aws-cdk/core",
      "constructs",
      "@aws-cdk/aws-iam",
      "@aws-cdk/aws-lambda",
      "@aws-cdk/cx-api",
      "@aws-cdk/aws-s3",
      "@aws-cdk/aws-ec2",
      "@aws-cdk/aws-events",
      "@aws-cdk/aws-sns"
    ]
    page 0 and page 100 = same results
    am i stupid or is this api just unusable
    and because my iam page is not in the 250 first restuls it never is indexed
    Daniel Schroeder
    @udondan
    that's why i first thought the is:unstable search would fix this, because then it simply shows up on the first page
    Daniel Schroeder
    @udondan
    ayee, it is from! not page!
    Daniel Schroeder
    @udondan
    Here's a PR to fix the pagination: construct-catalog/catalog#26
    when this is going live I expect quite some spam on the twitter channel. page 2 contains 71 packages. sure some are not related to cdk but still
    Matthew Bonig
    @mbonig
    @eladb I'm looking through the jsii-reflect and I'm not sure it can do the following: I want to point it at a construct library (like https://github.com/mbonig/secure-bucket) and use it to tell me what constucts secure-bucket uses (in this case just a single Bucket from the s3).
    Matthew Bonig
    @mbonig
    Alternatively, what about maybe synthing the construct (assuming it's setup to work with a basic cdk synth) ?
    Elad Ben-Israel
    @eladb
    Jsii can only reflect on the api, not the implementation
    Synth makes more sense but you’d theoretically need to synth all possible configurations
    Matthew Bonig
    @mbonig
    That is true.