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

ci(tests): Improve the handling of failures during the workflow #18390

Conversation

gustavotrott
Copy link
Collaborator

@gustavotrott gustavotrott commented Jul 26, 2023

This PR aims to improve the handling of failures during the automated-test workflow.

Currently, most of the commands run inside a block like this:

sudo sh -c '
            command 1
            command 2
            command 3
'

As it turns out, if command 2 fails and command 3 succeeds, the Step will still be marked as Successful. However, the correct behavior would be for it to fail!

So, I've tweaked most of the steps to run in a block like this:

sudo -i <<EOF
            set -e
            command 1
            command 2
            command 3
EOF

In this way, if one of the commands fails, the Step will be marked as a Failure. This will help us identify where the problem lies.

Additionally, I've tweaked the wget command to use the -nv (non-verbose) parameter instead of -q. This is because -q was suppressing the error message, making it more difficult to pinpoint the problem.

@antobinary antobinary added this to the Release 2.7 milestone Jul 26, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 27, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

No Coverage information No Coverage information
3.2% 3.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@gustavotrott gustavotrott changed the title test: Check if CI will fail the workflow tests: Improve the handling of failures during the workflow Jul 28, 2023
@gustavotrott gustavotrott merged commit be057ac into bigbluebutton:v2.7.x-release Aug 1, 2023
3 of 5 checks passed
@antobinary antobinary changed the title tests: Improve the handling of failures during the workflow ci(tests): Improve the handling of failures during the workflow Aug 1, 2023
@gustavotrott gustavotrott deleted the test-to-fail-automated-test branch September 13, 2023 20:00
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.

None yet

3 participants