Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Added recipe input validation to check specific recipe properties and log a warning if any violations are detected.
Why is this change necessary:
This change is necessary to proactively identify and address potential issues during the build stage.
How was this change tested:
New unit tests have been added and all tests passed successfully.
Any additional information or context required to review the change:
The decision to display warnings instead of raising errors is based on the understanding that these issues may not be critical enough to block component deployment or runtime. The warnings are intended to alert customers early in the process, allowing them to be aware of and mitigate potential issues.
An example output for a recipe with potential issues:
[2023-08-18 13:14:36] INFO - Building the component 'com.example.PythonHelloWorld' with the given project configuration.
[2023-08-18 13:14:36] INFO - Using 'zip' build system to build the component.
[2023-08-18 13:14:36] WARNING - This component is identified as using 'zip' build system. If this is incorrect, please exit and specify custom build command in the 'gdk-config.json'.
[2023-08-18 13:14:36] WARNING - It's not recommended to specify the component type in a recipe. AWS IoT Greengrass sets the type for you when you create a component.
[2023-08-18 13:14:36] WARNING - The file name in the script does not match the artifact names in the URI. If this is incorrect, please exit and ensure the artifacts and the script are correct.
[2023-08-18 13:14:36] INFO - Copying over the build artifacts to the greengrass component artifacts build folder.
[2023-08-18 13:14:36] INFO - Updating artifact URIs in the recipe.
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.