hashicorp / terraform-cdk

Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
https://www.terraform.io/cdktf
Mozilla Public License 2.0
4.87k stars 455 forks source link

Error produced by cdktf get is not breaking docker build #1115

Open nadworny opened 3 years ago

nadworny commented 3 years ago

Community Note

cdktf & Language Versions

cdktf-cli@0.6.3-pre.360 node:16.10-alpine Docker version 20.10.8, build 3967b7d

Affected Resource(s)

cdktf cli

Debug Output

https://gist.github.com/nadworny/0d0c567efbbaeeab9e1169bab51811d6

Expected Behavior

Docker build fails

Actual Behavior

Docker build runs successfully.

Steps to Reproduce

  1. Clone the repo and go to examples/python/docker
  2. Create a following Dockerfile:
    
    FROM node:16.10-alpine

RUN npm install --global cdktf-cli@0.6.3-pre.360

ENV DEFAULT_TERRAFORM_VERSION=1.0.7

Install Terraform

RUN apk add --update --no-cache git curl docker-cli unzip python3 python3-dev && \ ln -sf python3 /usr/bin/python && python3 -m ensurepip && \ rm -r /usr/lib/python*/ensurepip && \ pip3 install --upgrade pip setuptools==45 && \ if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ AVAILABLE_TERRAFORM_VERSIONS="0.15.0 ${DEFAULT_TERRAFORM_VERSION}" && \ for VERSION in ${AVAILABLE_TERRAFORMVERSIONS}; do curl -LOk https://releases.hashicorp.com/terraform/${VERSION}/terraform${VERSION}_linuxamd64.zip && \ mkdir -p /usr/local/bin/tf/versions/${VERSION} && \ unzip terraform${VERSION}_linuxamd64.zip -d /usr/local/bin/tf/versions/${VERSION} && \ ln -s /usr/local/bin/tf/versions/${VERSION}/terraform /usr/local/bin/terraform${VERSION};rm terraform${VERSION}_linux_amd64.zip;done && \ ln -s /usr/local/bin/tf/versions/${DEFAULT_TERRAFORM_VERSION}/terraform /usr/local/bin/terraform

WORKDIR /cdktf

Prepare tf providers

COPY cdktf.json . RUN cdktf get


3. Build image `docker build -t cdktf-test -f Dockerfile .`
<!--- Please list the steps required to reproduce the issue. --->
LeonidLapshinAquaCloud commented 3 years ago

Have the same error today, last successful run was 3 days ago

DanielMSchmidt commented 3 years ago

I think this is a duplicate of #1113. It seems like Ink-Spinners have a broken and unpinned dependency. This is our top priority to fix, @ansgarm is already working on this

DanielMSchmidt commented 3 years ago

Sorry, I misread the issue, my bad 🙈

DanielMSchmidt commented 2 years ago

I wonder if this can be solved by #841 or if this stems from another problem

DanielMSchmidt commented 1 year ago

This is still an issue