Terminal size is 0 on CI and so diff and deploy throws exception when trying to create table of changes
See original GitHub issueDescribe the bug In some CI setups (CircleCI and Jenkins), process.stdout.column can return 0 and so when the cdk uses the table library to create the table of resources to print to logs it throws an exception as terminal width cannot be 0.
To Reproduce Run any cdk diff or cdk deploy command on a terminal with 0 width or on a CI setup where process.stdout.column returns 0
CI Logs https://circleci.com/gh/CSmither/aws-cdk-demo/30
> stack@0.1.0 cdk /home/circleci/repo/stack
> cdk "deploy"
COLUMN WIDTH ===> 0
This deployment will make potentially sensitive changes according to your current security approval level (--require-approval broadening).
Please confirm you intend to make the following modifications:
IAM Statement Changes
Column width must be greater than 0.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! stack@0.1.0 cdk: `cdk "deploy"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the stack@0.1.0 cdk script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/circleci/.npm/_logs/2019-04-12T07_25_54_317Z-debug.log
Exited with code 1
Expected behavior Print a table of the stack to logs and continue on to either describe diff or deploy stack
Version:
- OS: Linux host with docker image (circleci/node:11.9.0-stretch)
- Language: Node Typescript
- CDK Version: 0.28.0 from npm
Notes Stack overflow post just to link them
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Troubleshooting CI/CD - GitLab Docs
GitLab provides several tools to help make troubleshooting your pipelines easier. This guide also lists common issues and possible solutions.
Read more >Zero Downtime Deployment with a Database - Spring
This article will explain in depth how to tackle issues related to database compatibility and the deployment process.
Read more >Troubleshoot Dataflow errors - Google Cloud
If you run into problems with your Dataflow pipeline or job, this page lists error messages that you might see and provides suggestions...
Read more >Troubleshooting Node.js Deploys - Heroku Dev Center
Check the buildpack; Compare Node and npm Versions; Make sure the ... will be created from the slug of the most recent deploy,...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
The state returned from AWS CloudFormation is usually UPDATE_ROLLBACK_FAILED or DELETE_FAILED , and the error will look something like this: The ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I use
stty rows ROW_NUMBER cols COLUMN_NUMBER
as a workaround for CircleCI. Example:Just FYI for CircleCI and cdk user.
Thanks for reporting!