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

chore(provider-generator): Include Provider Version in Generated Bindings #1586

Merged
merged 6 commits into from
Mar 25, 2022

Conversation

jsteinich
Copy link
Collaborator

Fixes #684
Fixes #228
Fixes #318
Fixes #43

The exact version of the resolved provider is now recorded as metadata for the generated provider and resources. For the provider, this exact version is used in required_providers block to ensure a consistent experience and give users more control over the provider version used.

Also omitting version constraints when either is undefined.

Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @jsteinich

@jsteinich jsteinich force-pushed the provider_version_updates branch 2 times, most recently from 1169581 to 13d3dcc Compare February 24, 2022 14:27
@jsteinich jsteinich added the ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests label Feb 25, 2022
@jsteinich
Copy link
Collaborator Author

This does break compatibility in that the new cli will generate binding not compatible with the old cdktf lib since a new metadata property was added. We could just change the meaning of the existing one, but that seems like more of a breaking change. Also having both allows for something like this.addOverride("terraform.required_providers.null.version", nullProvider.terraformGeneratorMetadata?.providerVersionConstraint); to restore the previous behavior.

@jsteinich jsteinich removed the ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests label Feb 25, 2022
@jsteinich jsteinich marked this pull request as ready for review February 25, 2022 02:45
@jsteinich jsteinich added the ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests label Feb 25, 2022
@github-actions github-actions bot added ci/updating-snapshots CI is currently updating this PR with new snapshot tests and removed ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests ci/updating-snapshots CI is currently updating this PR with new snapshot tests labels Feb 25, 2022
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@skorfmann skorfmann added the ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests label Mar 21, 2022
@github-actions github-actions bot added ci/updating-snapshots CI is currently updating this PR with new snapshot tests and removed ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests labels Mar 21, 2022
@skorfmann
Copy link
Contributor

@jsteinich could you fix the merge conflict, please? Seems like I can't do this on this PR

@github-actions github-actions bot removed the ci/updating-snapshots CI is currently updating this PR with new snapshot tests label Mar 21, 2022
@vercel
Copy link

vercel bot commented Mar 21, 2022

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@DanielMSchmidt DanielMSchmidt added ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests and removed ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests labels Mar 24, 2022
@github-actions github-actions bot added ci/updating-snapshots CI is currently updating this PR with new snapshot tests and removed ci/update-snapshots When set on a PR a GH Action will update and push all snapshot tests labels Mar 24, 2022
@github-actions github-actions bot removed the ci/updating-snapshots CI is currently updating this PR with new snapshot tests label Mar 24, 2022
@ansgarm
Copy link
Member

ansgarm commented Mar 25, 2022

force merging this, as only Vercel fails – ignoring it in the Github action did not work sadly.

@ansgarm ansgarm merged commit aee99a3 into hashicorp:main Mar 25, 2022
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants