-
Notifications
You must be signed in to change notification settings - Fork 278
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
Mark build stage as unstable if plugins failed to build #4224
Conversation
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4224 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 188 189 +1
Lines 5912 5973 +61
=======================================
+ Hits 5508 5565 +57
- Misses 404 408 +4 ☔ View full report in Codecov by Sentry. |
|
||
def markStageUnstableIfPluginsFailedToBuild() { | ||
def stageLogs = getLogsForStage(stageName: "${STAGE_NAME}") | ||
if (stageLogs.any{e -> e.contains('Failed plugins are')}) { |
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.
Seems like we are reading through all of the logs from Jenkins stage even if there are no failed plugins right?
I feel this might be really inefficient and delay the building process. Can we maybe modify the --continue-on-error
from the build workflow so that it could send signal to whenever it skips one plugin?
It could be having a new variable storing a list of failed plugins or just a boolean saying we continued on error.
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.
The only time that string is thrown as an error is when continue on error is enabled. Otherwise it is not. I think it will be too many if/else statements to call this function if continue on error is enabled.
Another work around is to only call this upon success as that when this error string is thrown. Will make that change. Making this PR as draft until dependent PRs are merged.
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.
Made the changes! The function is only called when CONTINUE_ON_ERROR = true
and only for success stage.
Thanks!
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Hi @zelinh, |
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.
LGTM!
Description
The
continue-on-error
option does not throw an error or an non-zero exit code. Hence it comes difficult for component owners to parse jenkins build log to find the exactly failure. This PR marks the stage as unstable if plugins failed to build.Issues Resolved
resolves #4018
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.