_Originally posted by @robertd in https://github.com/aws/aws-cdk/pull/8165#issuecomment-647178526_
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.
_Originally posted by @slotnick in https://github.com/aws/aws-cdk/pull/8165#issuecomment-647998179_
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.
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
?
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.
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))
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?
I opened a PR at https://github.com/aws/aws-cdk/pull/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:
aws-cdk
locally in the project and use https://www.npmjs.com/package/patch-package to patch it. see https://github.com/aws/aws-cdk/pull/9516/files
Most helpful comment
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 theCI
variable is set (or another non-interactive terminal is detected), CDK automatically reverts to the old behavior?