Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add python docs #20
chore: add python docs #20
Changes from 3 commits
0b3f861
f735abd
08b2be3
82b0aea
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a weird requirement. The whole CDK stack in Python runs on
jsii
, and we don't need to pass anything to it using this method. Can you please share related resources here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If needed, we should abstract this away from the final consumer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahinism
related (re)-sources (also included in the docs):
@property
declaration aws/jsii#1027I don't think this is possible in a pure Typescript implementation, unless you want to create a dedicated Python one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the Python usage, but like @shahinism mentions. When you are using the construct you should not be concerned about anything JSII, it should just be normal Python usage. In an ideal world. So I don't know about this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong but is your Python example in the doc using the construct or inheriting from it? Maybe that edge case only exists if you inherit in Python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rehanvdm
Are you referring specifically to the interface
IApplicationCostMonitoring
? In that case, neither.Inheritance doesn't work, nor does it work to use the "interface" directly:
TypeError: Don't know how to convert object to JSON
The CDK run will fail nonetheless because lack of permissions, but the only case in which it fails because of a permission error rather than some type error or other programmatic issues is the one documented here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concern in this link is implementing the interface directly in Python instead of using one in TS. Am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also spent some time this morning reviewing some of the constructs available at https://constructs.dev/
We can check any supporting Python construct without taking extra care with JSII. Let's see what they are doing differently at the library level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've spent some time going through the cdk code as suggested. Here's my findings (in no particular order):
IConnection
interface and relatedConnection
class (here and here).subnet
andsecurity_groups
args, but it expects properec2.Subnet()
andec2.SecurityGroup()
objects, rather than some dictionary.jsii.implements
shenanigans in python, we need to add an extra step (basically what I did in python, but in typescript). See again theConnection
class:and how it's exported in python:
ISecurityGroup
andISubnet
mentioned above (see here, for instance)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is something wrong with the component, I think that here instead of
It should be
Somewhere something goes wrong and JSII does not produce the right Python.
VS something in the standard CDK lib, an SQS to be specific.