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

Closed
wants to merge 1 commit into 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

@p7-mark p7-mark force-pushed the feature/launch-order branch from 8a04954 to c0cb0a6 Compare May 5, 2024 00:46
Akin to `sceptre delete`, display the order of operations when issuing
`sceptre launch` for a visual representation of dependencies.
@p7-mark p7-mark force-pushed the feature/launch-order branch from c0cb0a6 to 56ca19a Compare May 5, 2024 00:47
@p7-mark p7-mark changed the title [Resolves #1464] Display launch order [Resolve #1464] Display launch order May 5, 2024
@zaro0508 zaro0508 requested a review from jfalkenstein May 23, 2024 16:07
@alex-harvey-z3q alex-harvey-z3q self-requested a review May 26, 2024 04:09
@alex-harvey-z3q
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
...

@alex-harvey-z3q
Copy link
Contributor

alex-harvey-z3q 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.

@alex-harvey-z3q
Copy link
Contributor

alex-harvey-z3q commented Jun 10, 2024

@p7-mark I have been using this a while now and feel that some work is needed to make the output consistent and clean. During delete I see this:

Screenshot 2024-06-10 at 2 24 41 pm

During launch I then see this:

Screenshot 2024-06-10 at 2 24 51 pm

Similarly, the implementation in the code is inconsistent. You have:

Screenshot 2024-06-10 at 2 26 41 pm

Elsewhere:

Screenshot 2024-06-10 at 2 33 18 pm

Copy link
Contributor

@alex-harvey-z3q alex-harvey-z3q left a comment

Choose a reason for hiding this comment

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

See comments.

@alex-harvey-z3q
Copy link
Contributor

@p7-mark any thoughts on the above?

@alex-harvey-z3q
Copy link
Contributor

It seems like the author has abandoned this PR, so I'm closing it. @p7-mark please feel free to open a new PR if you ever return to this!

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