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

Update the taskcat version to 0.9.23 from current 0.9.19 #82

Closed
arniesaha opened this issue Feb 8, 2021 · 12 comments
Closed

Update the taskcat version to 0.9.23 from current 0.9.19 #82

arniesaha opened this issue Feb 8, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@arniesaha
Copy link

Hello @ShahradR,

Hope you're doing well! I've been trying to set this up, taskcat action with one of my CF repositories. And, thank you for the easy setup. However, there's a potential cfn-lint issue that I'm currently facing with the existing taskcat version this repo deploys. i.e. 0.9.19

There's a CFN resource in my template:
NodeGroup: Type: AWS::EKS::Nodegroup Properties: AmiType: AL2_x86_64 CapacityType: !Ref NodeInstanceCapacity ClusterName: !Sub ${EKSControlPlane}

Where version 0.9.19 fails 'CapacityType: !Ref NodeInstanceCapacity' as a Resource Not Found.

`version 0.9.19

[WARN ] : A newer version of taskcat is available (0.9.23)
[INFO ] : To upgrade pip version [ pip install --upgrade taskcat]
[INFO ] : To upgrade docker version [ docker pull taskcat/taskcat ]`

[ERROR ] : line 200 [3002] [Resource properties are valid] Invalid Property Resources/NodeGroup/Properties/CapacityType

Perhaps relates to aws/aws-cdk#12154

And, I initially set up the taskcat workflow on local as well as on CodePipeline using 0.9.23 and my taskcat test do pass and deploy.

Based on this:
https://github.com/aws-quickstart/quickstart-taskcat-ci

Is there a way we could update the taskcat version. Although the Dockerfile has the latest pull, not sure if it's updated though.

Any assistance is much appreciated

Thanks,
Arnab

ShahradR added a commit that referenced this issue Feb 9, 2021
Add the update_taskcat input parameter to the GitHub Action based on
feedback received in #82. When set to true, the
script runs `pip install --upgrade taskcat`, upgrading taskcat to the
latest version before running tests.

The --minimal-output flag was also added to the script to help with
logging issues. See 9111ae4 for more details.

Note that the parameter name uses an underscore instead of a hyphen to
separate "update" and "taskcat". This is because the input is read as an
environment variable, and only ASCII characters + underscores are
allowed.

Associated issue: #82
ShahradR added a commit that referenced this issue Feb 9, 2021
Add the update_taskcat input parameter to the GitHub Action based on
feedback received in #82. When set to true, the
script runs `pip install --upgrade taskcat`, upgrading taskcat to the
latest version before running tests.

The --minimal-output flag was also added to the script to help with
logging issues. See 9111ae4 for more details.

Note that the parameter name uses an underscore instead of a hyphen to
separate "update" and "taskcat". This is because the input is read as an
environment variable, and only ASCII characters + underscores are
allowed.

Associated issue: #82
@ShahradR
Copy link
Owner

ShahradR commented Feb 9, 2021

Hi @arniesaha, thanks for reaching out!

I think you're right—it doesn't look like the container is running the latest version of taskcat. I just pushed a release out for you which introduces a new input parameter called update_taskcat. If you set that to true in your workflow file, the action will run pip install --upgrade taskcat before executing your tests, which should upgrade you to v0.9.23!

Try updating your GitHub Action workflow file like so, and see if this helps with your issue?

  - name: Run taskcat test run
-   uses: ShahradR/action-taskcat@v1
+   uses: ShahradR/action-taskcat@v1.2.0
    with:
      commands: test run
+     update_taskcat: true

Let me know what you think, and thanks again for the feedback—it's really appreciated! 😄

@ShahradR ShahradR self-assigned this Feb 9, 2021
@ShahradR ShahradR added the enhancement New feature or request label Feb 9, 2021
@arniesaha
Copy link
Author

Hi @ShahradR

Thanks for the prompt update. Yes, this does update the taskcat version to 0.9.23. Although, the lint issue I was facing still persists. Not sure as the same templates work on 0.9.23 and python v3.7 & 3.8

But, as of now, I'm passing disable lint in the command to get the action to run successfully.

test run -t dev --lint-disable

Thanks though, will continue to use this action and figure out the lint issue.

ShahradR added a commit that referenced this issue Feb 11, 2021
Add the update_lint input parameter to the GitHub Action based on
feedback received in #82. When set to true, the
script runs `pip install --upgrade cfn-lint`, upgrading cfn-lint before
running tests.

Note that this commit does not inclue unit tests. These will be added in
a future commit.

Associated issue: #82
@ShahradR
Copy link
Owner

Hi @arniesaha!

I was thinking, maybe we need to update cfn-lint too?

I pushed a new commit that adds another input parameter called update-lint. I still need to add some tests, so I haven't merged it into the main branch yet, but give this a try and see if it does the trick?

  - name: Run taskcat test run
-   uses: ShahradR/action-taskcat@v1.2.0
+   uses: ShahradR/action-taskcat@9a5e4e1eeef3fb2b0b3c79a2f9eeccc8ded352dd
    with:
      commands: test run
      update_taskcat: true
+     update_lint: true

@arniesaha
Copy link
Author

Hi @ShahradR !

Yes, this did the trick :)

I will be testing further with my stack as well! But, it did pass through the lint and started creating the stack :)

Thanks for the great work +1

@ShahradR
Copy link
Owner

That's awesome!!! 🥳

I'll keep this ticket open until the code changes are merged into the main branch. If there is anything else I can help with though, feel free to comment here or open a new ticket!

I might also change the input parameter's name from update_lint to update_cfn_lint, just to make it more descriptive. I'll let you know if I end up making that change!

@arniesaha
Copy link
Author

Thanks! Appreciate it :)

Let me know once you merge it and if the commands are updated: would need to update my workflow appropriately.

ShahradR added a commit that referenced this issue Feb 17, 2021
Rename the `update_lint` input parameter to `update_cfn_lint`, making
explicit that we're updating the CloudFormation Linter, as opposed to
some other linter.

Associated issue: #82
ShahradR added a commit that referenced this issue Feb 17, 2021
Rename the `update_lint` input parameter to `update_cfn_lint`, making
explicit that we're updating the CloudFormation Linter, as opposed to
some other linter.

Associated issue: #82
@ShahradR
Copy link
Owner

Hi @arniesaha, sorry for the delay!

I just pushed release 1.3.0 of the action with the cfn_lint update flag! I did end up renaming the input parameter name to update_cfn_lint though.

Since your workflow is referencing the action using a commit SHA, your builds should continue working using update_lint until you start referencing the new release, so hopefully this shouldn't cause too much of a disruption with your pipelines!

Let me know if you run into any issues!

  - name: Run taskcat test run
-   uses: ShahradR/action-taskcat@9a5e4e1eeef3fb2b0b3c79a2f9eeccc8ded352dd
+   uses: ShahradR/action-taskcat@v1.3.0
    with:
      commands: test run
      update_taskcat: true
-     update_lint: true
+     update_cfn_lint: true

@arniesaha
Copy link
Author

Thanks @ShahradR

I have updated the workflow to use 1.3.0, testing it atm. 👍

@arniesaha
Copy link
Author

Hi @ShahradR

Something has broken with the workflow yesterday.

ERROR: unsatisfiable constraints: nodejs-12.21.0-r0: breaks: world[nodejs=12.20.1-r0] satisfies: npm-12.21.0-r0[nodejs] npm-12.21.0-r0: breaks: world[npm=12.20.1-r0] The command '/bin/sh -c apk add --no-cache nodejs=12.20.1-r0 npm=12.20.1-r0 && rm -rf /var/cache/apk/*' returned a non-zero code: 2 Warning: Docker build failed with exit code 2, back off 9.528 seconds before retry.

image

Let me know if we can fix this? My workflows just stopped working :|

Thanks for the help again!

Regards,
Arnab

ShahradR added a commit that referenced this issue Feb 25, 2021
Update the Dockerfile definition and bump the Node.js and npm versions
from 12.20.1-r0 to 12.21.0-r0, resolving the "unsatisfiable constraints"
error thrown when building the container, as identified by @arniesaha in
#82.

This is a recurrence of the issue identified in January and tracked in
#74.

Associated issue: #74, #82
@ShahradR
Copy link
Owner

Hi @arniesaha, thank you for flagging this!

It looks like the Node.js and npm packages in the Alpine repositories have been updated, and the versions referenced in the Dockerfile are no longer available.

I'm tracking this issue in #74 with the hopes of finding some long-term solution, but in the meantime, I just pushed a new release which bumps the Node.js and npm versions. Give it a try, and see if that gets your workflows running again?

@arniesaha
Copy link
Author

Thanks, @ShahradR for the prompt update.

Have been using the updated version 1.3.1 and is currently working as expected +1

@ShahradR
Copy link
Owner

ShahradR commented Mar 4, 2021

That's awesome!!! 🥳

I'll go ahead and close this issue, but is anything comes up again, feel free to either re-open this issue or create a new one!

And thank you so much for this ticket—I'm really glad we were able to add these update flags to the action!

@ShahradR ShahradR closed this as completed Mar 4, 2021
ShahradR added a commit that referenced this issue Apr 2, 2021
Update the project's README to include information about the new
`update_taskcat` and `update_cfn_lint` input parameters, along with
usage examples.

Associated issue: #82
ShahradR added a commit that referenced this issue Apr 2, 2021
Update the README document to use "they're" instead of "they are", to
adhere to the Microsoft Style Guide and help "create a friendly,
informal tone".

See https://git.io/JYi2e for more details.

Associated issue: #82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants