-
Notifications
You must be signed in to change notification settings - Fork 37
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
Test - Issue 481 - Green Builds Showing Despite Test Failures #487
Test - Issue 481 - Green Builds Showing Despite Test Failures #487
Conversation
if [ "$rc" -ne 0 ]; then | ||
echo "ERROR: Failure while driving npm install on plugin. rc: ${rc}." | ||
if [ "$failure" = "true" ]; then | ||
echo "ERROR: Failure while driving npm install on plugin." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the way this script works now, this error message does not seem accurate. Please update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with following comment: "ERROR: Failure occurred while running the tests."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thought, do you think it would be beneficial to differentiate between failures in the "build", "initialization" and "test" steps of the script? If so, it is not necessary for this PR, but may be good to open an enhancement issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required to differentiate between failures in the build
, initialization
and test
steps of the script. In exec.sh
these steps are differentiated by the type
. For each type we will be checking for failure and if a failure occured, that step will be exited with exit code -1 and error will be shown in the corresponding step in GHA. Hence no differentiation required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes mostly look good. I would like you to please clean up the commit history for this PR. 26 commits is excessive for changing one file, especially a small one like this script.
@@ -40,6 +43,7 @@ main() { | |||
npm run build | |||
npm run compile | |||
vsce package | |||
updateExitStatus | |||
else | |||
|
|||
#Initialisation step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be a call to updateExitStatus
in the "Initialisation step" section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened an issue: #504
if [ "$rc" -ne 0 ]; then | ||
echo "ERROR: Failure while driving npm install on plugin. rc: ${rc}." | ||
if [ "$failure" = "true" ]; then | ||
echo "ERROR: Failure while driving npm install on plugin." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thought, do you think it would be beneficial to differentiate between failures in the "build", "initialization" and "test" steps of the script? If so, it is not necessary for this PR, but may be good to open an enhancement issue.
Test PR created for #505. |
Fixes #481
Added method to fetch the status of previous command and update a boolean flag to see if the build is a failure or not.