Skip to content

Conversation

@phisco
Copy link
Contributor

@phisco phisco commented Oct 31, 2024

Description of your changes

Fixes a bug reported by @bobh66:

I just tried running crossplane CLI convert pipeline-compositionfrom main branch on a composition that didn't have spec.environment set to anything and it failed - crossplane: error: Error generating new Composition: failed to migrate environment: failed to get environment: spec.environment: no such field.   If I add an empty spec.environment block it works. 

We should ignore not found errors in that case given that the environment is optional.

Took the chance to refactor the patchsets migration code too for consistency, added test coverage for that too.

I have:

  • Read and followed Crossplane's contribution process.
  • Run earthly +reviewable to ensure this PR is ready for review.
  • Added or updated unit tests.
  • Added or updated e2e tests.
  • Linked a PR or a docs tracking issue to document this change.
  • Added backport release-x.y labels to auto-backport this PR.

Need help with this checklist? See the cheat sheet.

@phisco phisco requested a review from a team as a code owner October 31, 2024 13:40
@phisco phisco requested a review from bobh66 October 31, 2024 13:40
@phisco phisco merged commit 8ddec4c into crossplane:main Oct 31, 2024
@github-actions
Copy link

@phisco
Copy link
Contributor Author

phisco commented Oct 31, 2024

/backport

@github-actions
Copy link

Git push to origin failed for release-1.18 with exitcode 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants