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

Stop using initialApiVersion annotation #837

Merged
merged 4 commits into from
Oct 9, 2019

Conversation

lblackstone
Copy link
Member

Proposed changes

In the 1.2.0 release, we added the pulumi.com/initialApiVersion annotation,
which was used internally by the provider. This caused the side effect of
requiring updates to all existing resources.

This change instead stores that information in the state file, and no longer
creates an annotation. To avoid further disruption, the annotation is not
removed if it already exists, but will be ignored by the provider.

Related issues (optional)

Fixes #834

In the 1.2.0 release, we added the pulumi.com/initialApiVersion annotation,
which was used internally by the provider. This caused the side effect of
requiring updates to all existing resources.

This change instead stores that information in the state file, and no longer
creates an annotation. To avoid further disruption, the annotation is not
removed if it already exists, but will be ignored by the provider.
pkg/provider/provider.go Show resolved Hide resolved
pkg/provider/provider.go Outdated Show resolved Hide resolved
Copy link
Contributor

@hausdorff hausdorff left a comment

Choose a reason for hiding this comment

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

I don't understand how Update works if there isn't already an annotation. It seems like we're expect it will be in the state bag or the annotations, but some resources will have neither of these—right?

@lblackstone lblackstone force-pushed the lblackstone/initial-api-version branch from f646cfc to a38489e Compare October 9, 2019 18:57
@lblackstone
Copy link
Member Author

@hausdorff You're right; I was not handling pre-1.2 resources correctly. Fixed in the latest commit.

Copy link
Contributor

@hausdorff hausdorff left a comment

Choose a reason for hiding this comment

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

Alright, I think this works.

@lblackstone lblackstone merged commit 02e4019 into master Oct 9, 2019
@pulumi-bot pulumi-bot deleted the lblackstone/initial-api-version branch October 9, 2019 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move internal annotation logic to state file
3 participants