-
Notifications
You must be signed in to change notification settings - Fork 75
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
[BUG] (type-safe-api) install fails on python runtime package with missing README #813
Labels
Comments
While implementing this possible solution, I realized that |
jstrunk
added a commit
to jstrunk/aws-pdk
that referenced
this issue
Jul 19, 2024
…ted code This commit introduces a new `commitGeneratedCode` option to the TypeSafeApiProject, which allows controlling whether generated code should be committed or ignored for all generated projects. The main changes include: - Add a `commitGeneratedCode` option to the TypeSafeApiProject and related options interfaces. - Set the default value of `commitGeneratedCode` to `false`, except for Python projects where it defaults to `true` due to the Poetry package manager requirements. - Conditionally add patterns to .gitignore based on the `commitGeneratedCode` option for all generated projects. - Update tests to cover the new `commitGeneratedCode` option. By default, the generated code will be ignored in the repository, except for Python projects where it will be included to allow for easier distribution and deployment of the generated artifacts using Poetry. Resolves: aws#813
jstrunk
added a commit
to jstrunk/aws-pdk
that referenced
this issue
Aug 1, 2024
…ted python projects The poetry install that runs as part of post synthesis expects there to be some code present, but code isn't generated until build time. This means that the first install will fail when either generating the project for the first time or checking out a fresh copy (since generated code is not checked in to version control). To fix this, we add a blank README.md file in addition to the __init__.py file as the first install step to keep poetry happy until the generator overwrites it. Fixes aws#813
jstrunk
added a commit
to jstrunk/aws-pdk
that referenced
this issue
Aug 1, 2024
…ted code This commit introduces a new `commitGeneratedCode` option to the TypeSafeApiProject, which allows controlling whether generated code should be committed or ignored for all generated projects. The main changes include: - Add a `commitGeneratedCode` option to the TypeSafeApiProject and related options interfaces. - Set the default value of `commitGeneratedCode` to `false`. - Conditionally add patterns to .gitignore based on the `commitGeneratedCode` option for all generated projects. - Update tests to cover the new `commitGeneratedCode` option. By default, the generated code will be ignored in the repository, except for Python projects where it will be included to allow for easier distribution and deployment of the generated artifacts using Poetry. Fixes: aws#813
agdimech
pushed a commit
that referenced
this issue
Aug 6, 2024
…ted python projects (#818) The poetry install that runs as part of post synthesis expects there to be some code present, but code isn't generated until build time. This means that the first install will fail when either generating the project for the first time or checking out a fresh copy (since generated code is not checked in to version control). To fix this, we add a blank README.md file in addition to the __init__.py file as the first install step to keep poetry happy until the generator overwrites it. Fixes #813
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
After cloning a project repo and installing the monorepo's dependencies with
pnpm install
or similar, packages that depend on an API's python runtime package fail because the generated README.md is missing andpoetry install
requires it. UsingcommitGenerated
in the type safe api package or the python runtime options still includes the README.md and the module files in the runtime's .gitignore.Expected Behavior
After cloning a project repo, I should be able to install dependencies and build all packages.
Current Behavior
After cloning the repo and running
pnpm i
:Reproduction Steps
.projenrc.ts
Possible Solution
First,
commitGenerated: true
in a Python runtime package doesn't work..gitignore
still includes the README.md and module directory:packages/api/generated/runtime/python/.gitignore
Second, commitGenerated on the type safe api project should be recursively applied to child projects.
Additional Information/Context
Mitigation:
After defining the api project in .projenrc.ts, add the following:
PDK version used
0.23.40
What languages are you seeing this issue on?
Typescript, Python
Environment details (OS name and version, etc.)
MacOS 14.5 intel
The text was updated successfully, but these errors were encountered: