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

[CLI] display issues with new deployment monitoring in the CDK CLI #8696

Closed
nija-at opened this issue Jun 23, 2020 · 6 comments · Fixed by #9516 or #9623
Closed

[CLI] display issues with new deployment monitoring in the CDK CLI #8696

nija-at opened this issue Jun 23, 2020 · 6 comments · Fixed by #9516 or #9623
Assignees
Labels
bug This issue is a bug. in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI
Milestone

Comments

@nija-at
Copy link
Contributor

nija-at commented Jun 23, 2020

Originally posted by @robertd in #8165 (comment)

It's not working really well on iTerm2 with zsh (using robbierussel/oh-my-zsh)?

Is there a way to use more verbose output (for CI/CD purposes too)?

➜  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.

image

@nija-at
Copy link
Contributor Author

nija-at commented Jun 23, 2020

Originally posted by @slotnick in #8165 (comment)

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.

@SomayaB SomayaB changed the title display issues with new deployment monitoring in the CDK CLI [CLI] display issues with new deployment monitoring in the CDK CLI Jun 25, 2020
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jun 25, 2020
@Ophirr33
Copy link

I'm seeing a bunch of escape codes being dumped when running cdk deploy --no-color in a jenkins job. e.g.,

Stack ARN:
arn:aws:cloudformation:eu-central-1:account-num:stack/stack-name/uuid
stack-name
stack-name: deploying...
stack-name: creating CloudFormation changeset...

�[K
�[K
�[K
�[K[
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K]
�[K
�[K(
�[K0
�[K/
�[K2
�[K)
�[K

�[20A�[K
�[K
�[K
�[K[
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K]
�[K
�[K(
�[K0
�[K/
�[K2
�[K)
�[K

�[20A�[K
�[K
�[K
�[K[
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K·
�[K]
�[K
�[K(
�[K0
�[K/
�[K2

Is there a way to revert to the prior display mode when running with --no-color?

@shivlaks shivlaks added bug This issue is a bug. p1 labels Jun 25, 2020
@nsstensoriot
Copy link

I agree. While this is very pretty, it's a bit of a hit to usefulness when doing complex debugging of stacks if I can't see what was actually deployed after it's been deployed. Adds a lot of friction to the process.

@elgordino
Copy link

elgordino commented Jun 30, 2020

I would like to add to the request to have an option to revert to the previous behaviour. In the event of a failed deploy it gives basically no feedback as to what went wrong.

xxxx: creating CloudFormation changeset...
[████▍·····················································] (1/13)


 ❌  xxxx failed: Error: The stack named xxxx is in a failed state: UPDATE_ROLLBACK_COMPLETE
    at Object.waitForStack (/xxx/cdk/node_modules/aws-cdk/lib/api/util/cloudformation.ts:266:11)

Previously I could see which components had been deployed and rolled back, now I need to login to the console to find out.

For example in a verbose run I see this much more useful message

(UPDATE_ROLLBACK_IN_PROGRESS Export xxxxStack:ExportsOutputRefxxxx cannot be deleted as it is in use by yyyyStack))

@blimmer
Copy link
Contributor

blimmer commented Jun 30, 2020

Agreed. In addition to providing an option for people to choose, I think non-interactive terminals (like CI) should default to the other output style. Most (all?) CI platforms set the CI environment variable, so maybe when the CI variable is set (or another non-interactive terminal is detected), CDK automatically reverts to the old behavior?

@andreialecu
Copy link
Contributor

I opened a PR at #9516 that detects whether the CI environment variable is set and reverts the output to previous behavior.

It's a minor change, so to anyone that is affected by this:

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Aug 8, 2020
@rix0rrr rix0rrr added this to the [CLI] Soon milestone Aug 13, 2020
@mergify mergify bot closed this as completed in #9516 Aug 18, 2020
mergify bot pushed a commit that referenced this issue Aug 18, 2020
…9516)

Fixes: #8696 #8893

Detects whether the `CI` environment variable is set and reverts output to `standard` behavior.

The fancy output was especially broken on CircleCI.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
misterjoshua pushed a commit to misterjoshua/aws-cdk that referenced this issue Aug 19, 2020
…ws#9516)

Fixes: aws#8696 aws#8893

Detects whether the `CI` environment variable is set and reverts output to `standard` behavior.

The fancy output was especially broken on CircleCI.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this issue Aug 27, 2020
…9623)

Since the new deployment monitoring has been problematic on environments such as CI,
adding a switch called `progress` to allow users to set their deploy output display preference.

Supported values are `bar` and `events`. The default deployment display mode includes the
progress bar.

The workaround of adding `-v` to display the stack event history includes a lot of
undesired output and users have expressed that it includes a lot of noise.

If the key `progress` exists in user settings (`~/.cdk.json`) or project settings (`cdk.json`),
users will not need to specify it on every deploy and can set their desired default once.

closes #8696 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
9 participants