aws-greengrass / aws-greengrass-gdk-cli

The Greengrass Development Kit - Command Line Interface (GDK CLI) is a tool that helps you create Greengrass V2 components either using templates or community repositories.
https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-development-kit-cli.html
Apache License 2.0
28 stars 19 forks source link

feat: better logging for recipe syntax failures during build #244

Closed patrzhan closed 1 year ago

patrzhan commented 1 year ago

Issue #, if available:

Description of changes: Add better logging during build stage for recipe syntax validation. Before, when a build fails due to a recipe syntax issue it just prints the error that there was some problem during the build. Now, it will notify the user that there was an issue with the recipe syntax and link to the component recipe docs for reference.

Why is this change necessary: Provides more clarity for what is going wrong.

How was this change tested: Added unit tests for recipes with a common syntax error.

Any additional information or context required to review the change:

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% :tada:

Comparison is base (131bd47) 91.17% compared to head (c0458ba) 91.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #244 +/- ## =============================================== + Coverage 91.17% 91.22% +0.05% =============================================== Files 46 46 Lines 1779 1790 +11 =============================================== + Hits 1622 1633 +11 Misses 157 157 ``` | [Flag](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | Coverage Δ | | |---|---|---| | [integ](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `75.08% <53.84%> (-0.19%)` | :arrow_down: | | [uat](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `64.97% <38.46%> (-0.18%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `87.59% <100.00%> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | Coverage Δ | | |---|---|---| | [gdk/common/CaseInsensitive.py](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass#diff-Z2RrL2NvbW1vbi9DYXNlSW5zZW5zaXRpdmUucHk=) | `100.00% <100.00%> (ø)` | | | [gdk/common/consts.py](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass#diff-Z2RrL2NvbW1vbi9jb25zdHMucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.