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

[Resolve #359] Support use-previous-parameters #1476

Conversation

alex-harvey-z3q
Copy link
Contributor

@alex-harvey-z3q alex-harvey-z3q commented Jun 16, 2024

I am adopting this stale PR by @RobReus
#914

Resolves #359

This new feature will make it possible to create and maintain stacks using Sceptre while also having the possibility to modify parameters outside of Sceptre, without Sceptre then overwriting/reverting these changes.

An example use-case: create and maintain your containerized environment using Sceptre, but after the initial deploy, maintain the Docker image tag using a CICD pipeline. When configuring the image tag parameter correctly, it will be given an initial value upon creation, but updates will not overwrite the value.

It is as simple as this:

parameters:
  Param:
    initial_value: "foobar"
    use_previous_value: true

It is fully backwards compatible and will not break existing functionality.

PR Checklist

  • Wrote a good commit message & description [see guide below].
  • Commit message starts with [Resolve #issue-number].
  • Added/Updated unit tests.
  • Added/Updated integration tests (if applicable).
  • All unit tests (poetry run tox) are passing.
  • Used the same coding conventions as the rest of the project.
  • The new code passes pre-commit validations (poetry run pre-commit run --all-files).
  • The PR relates to only one subject with a clear title.
    and description in grammatically correct, complete sentences.

Approver/Reviewer Checklist

  • Before merge squash related commits.

Other Information

Guide to writing a good commit

@alex-harvey-z3q
Copy link
Contributor Author

@RobReus Can you recall the extent to which you tested this feature yourself, besides the unit tests you have added?

@alex-harvey-z3q
Copy link
Contributor Author

Some of this logic around validating the parameters would need to be moved to _ensure_parameters inside the Stack class.

@alex-harvey-z3q alex-harvey-z3q self-assigned this Jun 16, 2024
@alex-harvey-z3q alex-harvey-z3q marked this pull request as draft June 16, 2024 02:25
@alex-harvey-z3q
Copy link
Contributor Author

To avoid potential rework here, this PR would need to go in first. #1471

@alex-harvey-z3q alex-harvey-z3q removed their assignment Jul 9, 2024
@alex-harvey-z3q
Copy link
Contributor Author

I have changed my mind about merging this considering that it adds some complexity in the code we have no known users who would benefit from the feature.

@alex-harvey-z3q alex-harvey-z3q deleted the ah/RobReus/feature/issue-359/use-previous-value branch August 9, 2024 02:18
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.

Don't override existing parameters
3 participants