-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(cli): new deployment monitoring #8165
Conversation
Implement a new stack monitor, which updates the screen in-place and shows the resources currently being deployed plus a progress bar, instead of dumping a giant history of all events to the screen. The new monitor can be activated by setting `$CDK_FANCY_MONITOR` to a truthy value. We might consider making it the default (I do think it's better) but it might not work properly on Windows and on narrow screens. Fix in both old and new stack monitors: detect rollback events, and instead of increasing the event counter (leading to a progress of `84/45` resources done), roll the counter backwards as resources are being rolled back.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I did not write tests for this as, to be quite frank... I'm not sure how. It's purely a UI thing, it'll be hard to write tests for. Not saying it's not worth testing... just don't really know how. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress bar should be above and not below, so it won't jump up and down...
Good call |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side Q though - have you smoke tested how this behaves when an update fails and rolls back? Edit: the PR description seems to suggest you did. Cool! |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
It's not working really well on iTerm2 with zsh (using robbierussel/oh-my-zsh)? Is there a way to use more verbose output ( ➜ sipp-api-cdk git:(master) ✗ cdk deploy
SippApiStack: deploying...
SippApiStack: creating CloudFormation changeset...
✅ SippApiStack
Outputs:
SippApiStack.ServiceServiceURL250C0FB6 = https://sipp-api-alb.acme.com
SippApiStack.ServiceLoadBalancerDNSEC5B149E = internal-SippA-Servi-1X2ZSXSR3W328-1234567890.us-west-2.elb.amazonaws.com
Stack ARN:
arn:aws:cloudformation:us-west-2:1234567890:stack/SippApiStack/3841b3e0-b271-11ea-aae2-065639e88e5c . edit: Luckily everything looks fine in Gitlab's CI/CD pipeline. |
Encountering exactly the same here. Is there an option to disable this mode and revert to the previous display? It’s also useful to understand what happened during the build, which is lost with this update. My working model is to kick off a build, then check back after awhile to see what happened. This change makes that very difficult. |
Love this. Would like to request adding monitoring for destroying a stack too. |
Implement a new stack monitor, which updates the screen in-place and
shows the resources currently being deployed plus a progress bar,
instead of dumping a giant history of all events to the screen.
The new monitor can is activated automatically if the output is a TTY,
if we're not on Windows, and if we're not doing a verbose run.
Fix in both old and new stack monitors: detect rollback events, and
instead of increasing the event counter (leading to a progress of
84/45
resources done), roll the counter backwards as resources arebeing rolled back.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license