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: fix upgrade by passing placeholder values for images #2250

Merged
merged 5 commits into from
Aug 17, 2023

Conversation

elchead
Copy link
Contributor

@elchead elchead commented Aug 16, 2023

Context

Fixes a bug from #2211.
The current TF validation on AWS prevents an empty value set during an upgrade. Similarly, Azure also doesn't allow empty strings.

Proposed change(s)

  • insert placeholder values for the imageRef during an upgrade

Checklist

  • Update docs
  • Add labels (e.g., for changelog category)
  • Is PR title adequate for changelog?
  • Link to Milestone

@netlify
Copy link

netlify bot commented Aug 16, 2023

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 7b34b43
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/64dd425064d912000794b223

@elchead elchead requested a review from 3u13r August 16, 2023 13:45
@elchead elchead added needs backport This PR needs to be backported to a previous release bug fix Fixing a bug labels Aug 16, 2023
@elchead elchead changed the title cli: remove ami validation to allow empty value during upgrade cli: fix upgrade by passing placeholder values for images Aug 16, 2023
@@ -23,13 +23,13 @@ func TerraformUpgradeVars(conf *config.Config) (terraform.Variables, error) {
// The image is updates via our operator.
Copy link
Member

Choose a reason for hiding this comment

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

Update suggestion for the line above:

// Note that we don't pass any real image as imageRef, as we ignore changes to the image in the terraform.
// Still, the terraform variable verification must accept the values.
// For AWS, we enforce some basic constraints on the image variable.
// For Azure, the provider enforces that the source_image_id is not empty.
// For GCP, any placeholder works.

@elchead elchead requested a review from 3u13r August 16, 2023 14:11
Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

LGTM

@elchead
Copy link
Contributor Author

elchead commented Aug 16, 2023

running all E2E upgrades before merging and starting new release

@elchead elchead force-pushed the fix/terraform/upgrade-image-ref branch from 432745c to 9321881 Compare August 16, 2023 17:18
@elchead elchead added this to the v2.11.0 milestone Aug 16, 2023
@3u13r 3u13r marked this pull request as draft August 16, 2023 21:38
@3u13r
Copy link
Member

3u13r commented Aug 16, 2023

Converted this to a draft until the azure upgrade tests passes.
upgrade test run on this branch (azure, 3:2 nodes, cli from 2.10.0): https://github.com/edgelesssys/constellation/actions/runs/5884144445

@elchead elchead marked this pull request as ready for review August 17, 2023 04:54
@elchead elchead merged commit ca47d26 into main Aug 17, 2023
7 checks passed
@elchead elchead deleted the fix/terraform/upgrade-image-ref branch August 17, 2023 05:16
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants