Skip to content
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

[project.dependencies] references nonexistent "pulumi-kubernetes4.18.0" package #148

Closed
jfly opened this issue Sep 16, 2024 · 2 comments · Fixed by #149
Closed

[project.dependencies] references nonexistent "pulumi-kubernetes4.18.0" package #148

jfly opened this issue Sep 16, 2024 · 2 comments · Fixed by #149
Assignees
Labels
area/codegen Affects quality or correctness of generated code kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@jfly
Copy link

jfly commented Sep 16, 2024

What happened?

When I use crd2pulumi generate a python package, the resulting pyproject.toml has a [project.depenedencies] entry that references a nonexistent "pulumi-kubernetes4.18.0" package:

$ grep dependencies pyproject.toml
  dependencies = ["parver>=0.2.1", "pulumi>=3.109.0,<4.0.0", "pulumi-kubernetes4.18.0", "requests>=2.21,<3.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""]

Example

I can reproduce this on main (f670a71 at time of writing).

$ go run main.go --pythonPath ./crontabs tests/crds/k8sversion/mock_crd.yaml --force
Successfully generated python code.
$ grep dependencies crontabs/pyproject.toml
  dependencies = ["parver>=0.2.1", "pulumi>=3.109.0,<4.0.0", "pulumi-kubernetes4.18.0", "requests>=2.21,<3.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""]

Output of pulumi about

N/A

Additional context

I dug into this, and believe the issue is the interaction between these 2 lines of code:

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@jfly jfly added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 16, 2024
@rquitales
Copy link
Member

Thanks for submitting this issue! We'll include the fix for this in the next patch release.

@rquitales rquitales self-assigned this Sep 16, 2024
@rquitales rquitales added area/codegen Affects quality or correctness of generated code and removed needs-triage Needs attention from the triage team labels Sep 16, 2024
rquitales added a commit to pulumi/pulumi-kubernetes that referenced this issue Sep 16, 2024
### Proposed changes

When setting p-k as a python dependency for schemagen, we also need to
include the `==` token to generate a valid pyproject.toml file.

### Related issues (optional)

Related: pulumi/crd2pulumi#148
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Sep 16, 2024
@pulumi-bot
Copy link

This PR has been shipped in release v1.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen Affects quality or correctness of generated code kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants