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

fix: removed logger from NonCPS to CPS #776

Merged
merged 8 commits into from
Dec 9, 2021

Conversation

petod108
Copy link
Contributor

@petod108 petod108 commented Nov 12, 2021

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)

@petod108 petod108 requested a review from s2oBCN November 12, 2021 21:53
@metmajer
Copy link
Member

@s2oBCN @petod108 an invalid document history…. Not good and a warning might not be enough. What’s the reason for this case? How can a user fix it?

clemensutschig
clemensutschig previously approved these changes Nov 15, 2021
@petod108
Copy link
Contributor Author

@s2oBCN @petod108 an invalid document history…. Not good and a warning might not be enough. What’s the reason for this case? How can a user fix it?
En JiraUseCase for new reporting bug, there was not added versions for new reported Bug to the JiraDataItem.
This then leaded to this Warning logging. Because in sequence:

  • load JiraDataItem
  • report bug, but do not fill versions in JiraDataItem
  • check if all items have versions (fail)

clemensutschig
clemensutschig previously approved these changes Nov 16, 2021
@@ -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))
Copy link
Member

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){
Copy link
Member

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))
Copy link
Member

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
@petod108 petod108 requested a review from s2oBCN December 3, 2021 14:14
@petod108 petod108 merged commit c912ac9 into master Dec 9, 2021
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

4 participants