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

Fix import for Provider using server-side diff #1872

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Disable last-applied-configuration annotation for replaced CRDs (https://github.com/pulumi/pulumi-kubernetes/pull/1868)
- Fix Provider config diffs (https://github.com/pulumi/pulumi-kubernetes/pull/1869)
- Fix replace for named resource using server-side diff (https://github.com/pulumi/pulumi-kubernetes/pull/1870)
- Fix import for Provider using server-side diff (https://github.com/pulumi/pulumi-kubernetes/pull/1872)

## 3.14.0 (January 12, 2022)

Expand Down
3 changes: 3 additions & 0 deletions provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2552,6 +2552,9 @@ func (k *kubeProvider) tryServerSidePatch(oldInputs, newInputs *unstructured.Uns
return nil, nil, false
}
}
if err != nil {
return nil, nil, false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an integration test?

Copy link
Member Author

@lblackstone lblackstone Jan 18, 2022

Choose a reason for hiding this comment

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

I worked on this for awhile today, but can't figure out a reasonable way to test with our existing framework since the bug is specific to using the CLI import command. Since the fix is just handling an unhandled error case, I'm going to defer automated testing for now. I verified the fix manually.


// The server-side patch succeeded.
return ssPatch, ssPatchBase, true
Expand Down