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 18 forks source link

feat: get latest GTF release name from Github API #269

Closed patrzhan closed 9 months ago

patrzhan commented 9 months ago

Issue #, if available:

Description of changes: Get the latest GTF release name from Github API and use it as the default value. If this API request fails (typically due to exceeding rate limits), fall bad on old behavior and use a hard-coded release value.

Why is this change necessary: Getting the release dynamically should allow customers to benefit from GTF releases as soon as they are available, and lessen the need for us to release new GDK versions to followup GTF releases. The hard coded value will still need to be updated once in a while though.

How was this change tested: Modified unit and integration tests that use the config value. Added new unit test for the new utils function. Manually tested as well.

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 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (14fee92) 97.77% compared to head (64c4be8) 97.80%.

Files Patch % Lines
gdk/common/config/TestConfiguration.py 86.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #269 +/- ## =============================================== + Coverage 97.77% 97.80% +0.02% =============================================== Files 48 49 +1 Lines 1886 1910 +24 =============================================== + Hits 1844 1868 +24 Misses 42 42 ``` | [Flag](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/269/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/269/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `80.89% <92.00%> (+0.19%)` | :arrow_up: | | [uat](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/269/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `70.89% <76.00%> (?)` | | | [unit](https://app.codecov.io/gh/aws-greengrass/aws-greengrass-gdk-cli/pull/269/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-greengrass) | `93.87% <92.00%> (-0.03%)` | :arrow_down: | 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.

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