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

cli: create namespaced folders for upgrade backups #1702

Merged
merged 3 commits into from
May 2, 2023

Conversation

derpsteb
Copy link
Member

@derpsteb derpsteb commented Apr 28, 2023

Proposed change(s)

  • There might be cases in which a resource name is reused for multiple resources or across namespaces. In that case upgrade apply would fail while creating the local resource backups. This is because files are dumped into one folder with the resource name as file name. This is fixed by creating paths with this pattern: constellation-upgrade/backups/<kind>/<namespace>/<name>.yaml.

Additional info

Checklist

  • Add labels (e.g., for changelog category)
  • Link to Milestone

Resource names are only unique per kind+ns. Without this patch it
might happen that there are two resources with the same name
in different namespaces. Upgrade might fail in that case.
@derpsteb derpsteb added bug fix Fixing a bug backport This PR is a backport to a previous release labels Apr 28, 2023
@derpsteb derpsteb requested a review from malt3 April 28, 2023 08:39
@netlify
Copy link

netlify bot commented Apr 28, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit d0be422
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/644bc109916261000818749d

@katexochen katexochen added needs backport This PR needs to be backported to a previous release and removed backport This PR is a backport to a previous release labels Apr 28, 2023
We sometimes run older CLI versions in the CI. Those versions
may not support the flag.
@derpsteb derpsteb merged commit 1180b37 into main May 2, 2023
@derpsteb derpsteb deleted the fix/cli/upgrade-backups branch May 2, 2023 09:08
@katexochen katexochen added the no changelog Change won't be listed in release changelog label May 2, 2023
katexochen added a commit that referenced this pull request May 2, 2023
Resource names are only unique per kind+ns. Without this patch it
might happen that there are two resources with the same name
in different namespaces. Upgrade might fail in that case.

Co-authored-by: Otto Bittner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixing a bug needs backport This PR needs to be backported to a previous release no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants