opendevstack / ods-jenkins-shared-library

Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Apache License 2.0
70 stars 57 forks source link

Pipelines are shown as unstable without clear logs #876

Open albertpuente opened 2 years ago

albertpuente commented 2 years ago

Is your feature request related to a problem? Please describe. When a WIP pipeline is run and there are pending issues, the function https://github.com/opendevstack/ods-jenkins-shared-library/blob/f2470541f2e9cd8d247f5924ce0f5246b2069644/src/org/ods/orchestration/FinalizeStage.groovy#L91 is called, which sets the pipeline as unstable: https://github.com/opendevstack/ods-jenkins-shared-library/blob/f102ae1e82ffb2622f1c95e73550d039161f80fc/src/org/ods/orchestration/util/PipelineUtil.groovy#L168 However, no indication that this is the reason why the pipeline was set as unstable is given in the logs beyond a warning message.

WARN: Pipeline-generated documents are watermarked 'Work in Progress' since the following issues are work in progress: 

Requirements: AGE-128, AGE-126, AGE-124, AGE-130

TechSpecs: AGE-129, AGE-127, AGE-125, AGE-131

Docs: AGE-122, AGE-121

Describe the solution you'd like The logs should clearly state that this specific warning has cause the pipeline to be flagged as unstable.

metmajer commented 2 years ago

@nichtraunzer is this the issue we spoke about? @albertpuente what do you suggest? Improve the log message or not set the pipeline unstable?

albertpuente commented 2 years ago

IMO I would not set it as unstable for WIP, as that typically has other connotations (tests failing). For D, QA... it makes it fail, which is fine.

nichtraunzer commented 2 years ago

@nichtraunzer is this the issue we spoke about? @albertpuente what do you suggest? Improve the log message or not set the pipeline unstable?

yes - we proposed to improve the log message so that it is easier to identify the root cause for the unstable build. we had to go through the source code to figure it out. If there is a message like

WARN: Your pipeline has been marked as UNSTABLE  since the following issues are work in progress: 
Requirements: AGE-128, AGE-126, AGE-124, AGE-130
TechSpecs: AGE-129, AGE-127, AGE-125, AGE-131
Docs: AGE-122, AGE-121

it would have been a matter of seconds to resolve that issue ...

metmajer commented 2 years ago

@nichtraunzer feel free to provide a PR :)

nichtraunzer commented 2 years ago

@nichtraunzer feel free to provide a PR :)

will do so :)

clemensutschig commented 2 years ago

I would leave unstable- this shows something is not quite right

nichtraunzer commented 2 years ago

I would leave unstable- this shows something is not quite right

we do not change "UNSTABLE" - we propose to update the log message itself only e.g.

WARN: Your pipeline has been marked as UNSTABLE  since the following issues are work in progress: 
Requirements: AGE-128, AGE-126, AGE-124, AGE-130
TechSpecs: AGE-129, AGE-127, AGE-125, AGE-131

Otherwise its not easy for the user to identify the root cause for the unstable pipeline ...

metmajer commented 1 year ago

@nichtraunzer did you provide a PR to this?