Fail action on invalid ESP-IDF version tags instead of continuing silently #12
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.
When an invalid ESP-IDF version tag is provided (e.g.,
5.5.1instead ofv5.5.1), EIM logs an error but returns exit code 0, causing the action to continue and create a broken installation that appears successful.Changes
"Failed to checkout reference","did not exist","ERROR"with tag/reference keywords)Example
Before:
After:
Original prompt
This section details on the original issue you should resolve
<issue_title>Incorrect tag fails silently (RDT-1591)</issue_title>
<issue_description>### Checklist
How often does this bug occurs?
always
Expected behavior
Ideally, if any version tag does not exist, we should exit with non-zero exit-code.
Actual behavior (suspected bug)
In my case, I used
5.5.1even though the correct version input should have beenv5.5.1. Instead of throwing error, it goes on to give an illusion that5.5.1is correctly installed (judging from the file paths). Theidf.py --versionoutput:The installation logs correctly indicate that the tag does not exist but I think the more appropriate behaviour is to fail:
Error logs or terminal output