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

Handle upgrade of cloud formation with different defaults #267

Merged
1 commit merged into from
Apr 26, 2023

Conversation

ghost
Copy link

@ghost ghost commented Apr 24, 2023

Description

When you deploy a cloud formation stack, even if you leave the default parameters the values are saved.

When you upgrade the saved values are used instead of the defaults, which means that if we change the container version in the default for a parameter it gets ignored on upgrade.

This commit changes the symantics of the parameters to overrides, only if provided will they override the value which we set in the CFN template. This means that:

  • if you want to return to the default value you can delete the contents of the parameter.

  • during upgrades the cloud formation will template in the new values unless an override is provided.

Type of Change

[X] Bug Fix
[ ] New Feature
[ ] Breaking Change
[X] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@ghost ghost self-requested a review as a code owner April 24, 2023 12:35
@ghost ghost force-pushed the cfn_upgrade_fixes branch from 6a09f73 to 11b1a6a Compare April 25, 2023 10:47
When you deploy a cloud formation stack, even if you leave the default
parameters the values are saved.

When you upgrade the saved values are used instead of the defaults,
which means that if we change the container version in the default for a
parameter it gets ignored on upgrade.

This commit changes the symantics of the parameters to overrides, only
if provided will they override the value which we set in the CFN
template. This means that:

- if you want to return to the default value you can delete the contents
  of the parameter.

- during upgrades the cloud formation will template in the new values
  unless an override is provided.
@ghost ghost force-pushed the cfn_upgrade_fixes branch from 11b1a6a to 07873cf Compare April 25, 2023 10:49
@chrisgacsal chrisgacsal self-requested a review April 25, 2023 12:12
@ghost ghost enabled auto-merge April 26, 2023 14:40
@ghost ghost added this pull request to the merge queue Apr 26, 2023
Merged via the queue into main with commit b2e1a62 Apr 26, 2023
5 checks passed
@ghost ghost deleted the cfn_upgrade_fixes branch April 26, 2023 15:00
fishkerez pushed a commit that referenced this pull request May 1, 2023
## Description

When you deploy a cloud formation stack, even if you leave the default
parameters the values are saved.

When you upgrade the saved values are used instead of the defaults,
which means that if we change the container version in the default for a
parameter it gets ignored on upgrade.

This commit changes the symantics of the parameters to overrides, only
if provided will they override the value which we set in the CFN
template. This means that:

- if you want to return to the default value you can delete the contents
of the parameter.

- during upgrades the cloud formation will template in the new values
unless an override is provided.

## Type of Change

[X] Bug Fix  
[ ] New Feature  
[ ] Breaking Change  
[X] Refactor  
[ ] Documentation  
[ ] Other (please describe)  

## Checklist

- [X] I have read the [contributing guidelines](/CONTRIBUTING.md)
- [X] Existing issues have been referenced (where applicable)
- [X] I have verified this change is not present in other open pull
requests
- [X] Functionality is documented
- [X] All code style checks pass
- [X] New code contribution is covered by automated tests
- [X] All new and existing tests pass
This pull request was closed.
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.

None yet

3 participants