-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
CONTRIBUTING.md needs some minor updates in Getting Started / Pack #20041
Comments
@comcalvi @kaizen3031593 I'm not familiar with this process, could one of you help out here? |
I dont think either of us are familiar, rerouting to @RomainMuller who is my best guess for help here. |
Anyone familiar? |
The documentation should be updated to mention the Regarding the absence of |
Okay so, I was able to reproduce this locally... Now to understand what's actually going on...
It appears to reproduce consistently, and I guess the symptoms tend to point to an issue with |
|
Ah-ha! |
Alright - I found the culprit to be a bug in The solution is to resolve the If you want to unblock yourself until the
So that it instead reads: '-o', path.resolve(process.cwd(), outdir)]; This way, the path passed to |
When the `-o`/`--outdir` option is passed to `jsii-pacmak` with a relative path, that path was not resolved up-front by the CLI, which resulted in the Python code-generator not outputting the wheel files in the expected directory: instead of being consistently treated as relative to the current working directory, the Python generator interpreted it relative to it's temporary working directory. This addresses the issue by resolving relative paths to absolute paths, using `process.cwd()` as the base directory, before passing the value down to the business logic. Fixes aws/aws-cdk#20041
When the `-o`/`--outdir` option is passed to `jsii-pacmak` with a relative path, that path was not resolved up-front by the CLI, which resulted in the Python code-generator not outputting the wheel files in the expected directory: instead of being consistently treated as relative to the current working directory, the Python generator interpreted it relative to it's temporary working directory. This addresses the issue by resolving relative paths to absolute paths, using `process.cwd()` as the base directory, before passing the value down to the business logic. Fixes aws/aws-cdk#20041
I have made PRs to:
Regarding the |
The `jsii/superchain` image no longer has a `:latest` tag and users need to expressly reference `:1-buster-slim` instead. See #20041 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
) When the `-o`/`--outdir` option is passed to `jsii-pacmak` with a relative path, that path was not resolved up-front by the CLI, which resulted in the Python code-generator not outputting the wheel files in the expected directory: instead of being consistently treated as relative to the current working directory, the Python generator interpreted it relative to it's temporary working directory. This addresses the issue by resolving relative paths to absolute paths, using `process.cwd()` as the base directory, before passing the value down to the business logic. See aws/aws-cdk#20041 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Sorry for playing hot potato @jusdino but we have an internal issue to update the contributing guide with v2 workflow changes with a target date of june 1 (when v1 goes into maintenance mode). Assigning back to @madeline-k and me who will make sure that happens on that day. |
No problems. For what it’s worth, I worked up a dockerfile/script that helps with some of the superchain user permission issues, at least. I’m using it to try to build v2 now and was considering opening a PR in case you wanted to add it to |
Another interesting discovery I just made while trying to figure out how to build v2's aws-cdk-lib - it looks like
|
The `jsii/superchain` image no longer has a `:latest` tag and users need to expressly reference `:1-buster-slim` instead. See aws#20041 ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…0581) Now that v1 is in maintenance mode, we need some updates to the contributing guide. The biggest change to the developer workflow now that v1 is in maintenance mode, is that the main development branch, `main`, has the v2 source code. This does not have many practical impacts on developer workflow, because in most cases we will continue to just iterate on a single service module in its `packages/@aws-cdk/aws-<service>` directory. This PR adds instructions for building and testing `aws-cdk-lib` and the individual `-alpha` packages, which developers might need to do occasionally. closes https://github.com/cdklabs/cdk-ops/issues/1933 closes #20041 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…s#20581) Now that v1 is in maintenance mode, we need some updates to the contributing guide. The biggest change to the developer workflow now that v1 is in maintenance mode, is that the main development branch, `main`, has the v2 source code. This does not have many practical impacts on developer workflow, because in most cases we will continue to just iterate on a single service module in its `packages/@aws-cdk/aws-<service>` directory. This PR adds instructions for building and testing `aws-cdk-lib` and the individual `-alpha` packages, which developers might need to do occasionally. closes https://github.com/cdklabs/cdk-ops/issues/1933 closes aws#20041 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the issue
Below is a long-winded way of saying:
Short version
What did you try?
Read CONTRIBUTING.md and follow its instructions for packaging a module in aws-cdk
What happened?
I was eventually able to run
yarn run package
but did not find any python packages being producedWhat behavior did you expect:
To understand how to locally work in the repo then produce packages that I can use for local testing/development and (most importantly to me) understand how to do this for v2 of this lib.
Details
I'm trying to get ready to contribute some updates to this project but, before I dive in, I wanted to get familiar and get an idea of how I can try out local changes and package them to see if they will do what I need in a Python based app. From reading CONTRIBUTING.md, my understanding of how best to go from zero to python-package would be more or less (after installing node/yarn/.NET/python/docker:
That last step is where things go wonky. I spent a few days off and on trying to get that to work and here is the short version of what I found:
Running things as described reliably produces an error for me:
After a little digging, I found that the
:latest
version of the jsii docker referenced in CONTRIBUTING.md uses node10, while the docs say that >=14.15.0 is required. If I instead use:1-buster-slim-node14
, that gets me further, but another change between versions is that:latest
runs asroot
, while the latter does not, so it runs into a number of file permissions issues trying to operate on folders/files that the docker user does not own. The most reliable way I was able to get past that was to force the user back toroot
with the--user root
arg fordocker run
(not ideal, obviously). So, changing the package part of the process, gets me a successful package run:But wait, there's more!
Looking at the command output, I was excited to go find my python packages that I could theoretically go test in a demo app, but to my surprise, there was
js
,dotnet
, andjava
output in all the relevantdist/
folders, but nothing forpython
. Monitoring the/tmp/foreach.stdio
file during another attempt showed me that it did 'finish' the python packaging, though I can find no artifacts of that having happened 😕 .So that leaves me with two problems:
Links
CONTRIBUTING.md
The text was updated successfully, but these errors were encountered: