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

Breaking aws-deployment-framework-pipelines #425

Closed
Nr18 opened this issue Jan 11, 2022 · 2 comments
Closed

Breaking aws-deployment-framework-pipelines #425

Nr18 opened this issue Jan 11, 2022 · 2 comments

Comments

@Nr18
Copy link
Contributor

Nr18 commented Jan 11, 2022

Due to the following issue:

Your aws-deployment-framework-pipelines pipeline might be impacted. The reason for this is because the CDK version is pinned to a specific version.

For example the buildspec from 3.0.6 is

version: 0.2
phases:
  install:
    runtime-versions:
      python: 3.7
      nodejs: 10
  pre_build:
    commands:
      - npm install cdk@1.32 -g -y --quiet --no-progress
      - aws s3 cp s3://$SHARED_MODULES_BUCKET/adf-build/ ./adf-build/ --recursive --quiet
      - pip install -r adf-build/requirements.txt -q -t ./adf-build
  build:
    commands:
      - cdk --version
      - chmod 755 adf-build/cdk/execute_pipeline_stacks.py adf-build/cdk/generate_pipeline_inputs.py adf-build/cdk/generate_pipeline_stacks.py
      - python adf-build/cdk/generate_pipeline_inputs.py
      - cdk synth --app adf-build/cdk/generate_pipeline_stacks.py 1> /dev/null
      - python adf-build/cdk/execute_pipeline_stacks.py

The current version uses:

version: 0.2
  phases:
    install:
      runtime-versions:
        python: 3.9
        nodejs: 12
    pre_build:
      commands:
        - npm install cdk@1.137 -g -y --quiet --no-progress
        - aws s3 cp s3://$SHARED_MODULES_BUCKET/adf-build/ ./adf-build/ --recursive --quiet
        - pip install -r adf-build/requirements.txt -q -t ./adf-build
    build:
      commands:
        - cdk --version
        - chmod 755 adf-build/cdk/execute_pipeline_stacks.py adf-build/cdk/generate_pipeline_inputs.py adf-build/cdk/generate_pipeline_stacks.py adf-build/cdk/clean_pipelines.py
        - python adf-build/cdk/generate_pipeline_inputs.py
        - cdk synth --no-version-reporting --app adf-build/cdk/generate_pipeline_stacks.py 1> /dev/null
        - python adf-build/cdk/execute_pipeline_stacks.py
    post_build:
      commands:
        - python adf-build/cdk/clean_pipelines.py

Workaround

By changing the version from 1.32 or 1.137 to 2.5.0 manually would "fix" the pipeline again.

(Proposed) Solution

Bump the version to 2.5.0 in the buildspec

@Nr18
Copy link
Contributor Author

Nr18 commented Jan 11, 2022

@sbkok my suggestion would be to use 2.5.0 in the next release. What do you think?

Nr18 pushed a commit to Nr18/aws-deployment-framework that referenced this issue Jan 11, 2022
Because CDK depends on colors.js and the newest pulled version contains a loop that print gibberish output the build execution will timeout.
CDK 2.5.0 has a fix in place to solve this, so any previous version may be affected by this.

Issue: awslabs#425
@sbkok
Copy link
Collaborator

sbkok commented Jan 11, 2022

NPM seems to have removed the broken releases of the colors library that CDK depends on.
So for the time being we don't need to fix this on our side.

See https://www.npmjs.com/package/colors.
Latest version reported there is 1.4.0. Which is the last stable release of colors.

For anyone seeing/experiencing this issue, rerunning the pipeline should fix the problem.
As it will reinstall cdk and fetch the latest stable release of the colors dependency.

I will close this issue for now, please reopen if this becomes an active issue again.

@sbkok sbkok closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants