-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix: removed logger from NonCPS to CPS #776
Conversation
fix: CodeNarc error
|
@@ -3,7 +3,7 @@ | |||
## Unreleased | |||
|
|||
## [4.0] - 2021-05-11 | |||
|
|||
- Prevent Jenkins nonCPS error after reporting bug ([#776](https://github.com/opendevstack/ods-jenkins-shared-library/pull/776)) |
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.
Please move this line above , is not for 4.0
@@ -325,6 +326,9 @@ class DocumentHistory { | |||
this.allIssuesAreValid = true | |||
|
|||
def versionMap = this.computeEntryData(jiraData, projectVersion, keysInDocument) | |||
if (!this.allIssuesAreValid){ |
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.
let me talk online about this code
@@ -3,7 +3,7 @@ | |||
## Unreleased | |||
|
|||
## [4.0] - 2021-05-11 | |||
|
|||
- Prevent Jenkins nonCPS error after reporting bug ([#776](https://github.com/opendevstack/ods-jenkins-shared-library/pull/776)) |
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.
Please move this above, this is not 4.x
# Conflicts: # CHANGELOG.md # src/org/ods/orchestration/util/DocumentHistory.groovy
moved logger from NonCPS to upper CPS function.
If logger is used in NonCPS then there is error:
DEBUG: Parsing jira data to document history
expected to call org.ods.orchestration.util.DocumentHistory.computeEntryData but wound up catching org.ods.util.Logger.warn; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
...
WARN: Error occured within the orchestration pipeline: Error: Creating document of type 'CFTR' for project 'tes96' in phase 'Test' and stage 'PRE_END' has failed: Could not find matching constructor for: org.ods.orchestration.util.DocumentHistoryEntry(java.lang.String, java.lang.Long, java.lang.String, java.lang.String, java.lang.String)