Skip to content
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

Conversation

gilbysunil14
Copy link
Contributor

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.

aparnamichael
aparnamichael previously approved these changes Feb 3, 2025
aparnamichael
aparnamichael previously approved these changes Feb 7, 2025
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."
Copy link
Contributor

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.

Copy link
Contributor Author

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."

Copy link
Contributor

@TrevCraw TrevCraw Feb 12, 2025

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@TrevCraw TrevCraw left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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."
Copy link
Contributor

@TrevCraw TrevCraw Feb 12, 2025

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.

@gilbysunil14
Copy link
Contributor Author

Test PR created for #505.

@gilbysunil14 gilbysunil14 deleted the archive-screenshot-mac-failure branch February 19, 2025 04:40
@gilbysunil14 gilbysunil14 changed the title Issue 481 - Green Builds Showing Despite Test Failures Test - Issue 481 - Green Builds Showing Despite Test Failures Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Green Builds Showing Despite Test Failures
3 participants