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 #1464] Display launch order #1465

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

p7-mark
Copy link
Contributor

@p7-mark p7-mark commented May 5, 2024

Resolves #1464.

image

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

Akin to `sceptre delete`, display the order of operations when issuing
`sceptre launch` for a visual representation of dependencies.
@p7-mark p7-mark changed the title [Resolves #1464] Display launch order [Resolve #1464] Display launch order May 5, 2024
@alexharv074 alexharv074 self-requested a review May 26, 2024 04:09
@alexharv074
Copy link
Contributor

@p7-mark How do you handle the case of launch -y here. Those launching stacks in a CI pipeline using full automation need to be assured that this change does not break that automation.

@p7-mark
Copy link
Contributor Author

p7-mark commented May 26, 2024

@p7-mark How do you handle the case of launch -y here. Those launching stacks in a CI pipeline using full automation need to be assured that this change does not break that automation.

@alexharv074 when using launch -y, the order of operations is simply printed, and then the launch command is executed without confirmation.

In this example, I run launch -y against a stack group with two stacks (one with obsolete: true):

sceptre launch s3 -y
* During launch, the following stacks will be skipped, neither created nor updated:
s3/bucket-policy

The following operations will occur, in the following order:
Deploy: s3/bucket
Skip:   s3/bucket-policy

[2024-05-27 07:34:22] - s3/bucket - Launching Stack
[2024-05-27 07:34:23] - s3/bucket - Stack is in the PENDING state
[2024-05-27 07:34:23] - s3/bucket - Creating Stack
[2024-05-27 07:34:23] - s3/bucket localtest-s3-bucket AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
[2024-05-27 07:34:27] - s3/bucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS
[2024-05-27 07:34:27] - s3/bucket Bucket AWS::S3::Bucket CREATE_IN_PROGRESS Resource creation Initiated
...

@alexharv074
Copy link
Contributor

alexharv074 commented Jun 1, 2024

@p7-mark Thanks. I can live with this although I feel like the output in the launch -y case is a bit inconsistent with the original design i.e. not quite Sceptre-y enough! I also think your new code probably belongs in a new private method; it feels to me as if there is too much going on in the print_operations method now.

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.

List proposed order of operations for sceptre launch
2 participants