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

JiraService.createIssueType(JiraService.groovy:194) fails when description is missing - from upstream empty error.text in XUnit #849

Closed
clemensutschig opened this issue Feb 20, 2022 · 4 comments · Fixed by #850
Labels
bug Something isn't working

Comments

@clemensutschig
Copy link
Member

The error comes as downstream result from Tosca sending errors instead of failures …

	| 
, systemErr:, timestamp:2/20/2022 10:14:19 PM], [classname:Acceptance, name:VEEVACRM486_Medical Information Inquiry is completely and correctly transferred from IRep to MIS, time:362, error:[message:TestCase Failed with Failure, type:ExecutionResultState.Failed, text:], skipped:false, systemOut:	| ********************************************************************************************************
	| *** VEEVACRM486_Medical Information Inquiry is completely and correctly transferred from IRep to MIS ***
	| ********************************************************************************************************
	| ResultState: Failed

The problem is the “text:” that is empty – which makes downstream (JiraService) fail, especially:

        if (!description?.trim()) {
            throw new IllegalArgumentException('Error: unable to create Jira issue. \'description\' is undefined.')
        }

[Pipeline] End of Pipeline
java.lang.IllegalArgumentException: Error: unable to create Jira issue. 'description' is undefined.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at org.ods.orchestration.service.JiraService.createIssueType(JiraService.groovy:194)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
at org.ods.orchestration.service.JiraService.createIssueTypeBug(JiraService.groovy:240)
at org.ods.orchestration.usecase.JiraUseCase.createBugsForFailedTestIssues(JiraUseCase.groovy:122)
at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2068)
at org.ods.orchestration.usecase.JiraUseCase.createBugsForFailedTestIssues(JiraUseCase.groovy:119)
at org.ods.orchestration.usecase.JiraUseCase.reportTestResultsForComponent(JiraUseCase.groovy:335)
at org.ods.orchestration.usecase.JiraUseCase.reportTestResultsForProject(JiraUseCase.groovy:346)
at org.ods.orchestration.TestStage.run(TestStage.groovy:72)
at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.callClosureForMapEntry(CpsDefaultGroovyMethods:5228)
at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2107)
at org.ods.orchestration.TestStage.run(TestStage.groovy:70)
at org.ods.orchestration.Stage.execute(Stage.groovy:40)
at cps.transform(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
at jdk.internal.reflect.GeneratedMethodAccessor388.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
at com.cloudbees.groovy.cps.Next.step(Next.java:83)

@clemensutschig clemensutschig added the bug Something isn't working label Feb 20, 2022
@clemensutschig
Copy link
Member Author

clemensutschig commented Feb 20, 2022

https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/src/org/ods/orchestration/service/JiraService.groovy#240

  • my proposal - if empty/null - just warn and set to N/A - please check the test logs - that way it's really super surgical

@clemensutschig clemensutschig changed the title JiraService.createIssueType(JiraService.groovy:194) fails when description is missing JiraService.createIssueType(JiraService.groovy:194) fails when description is missing - from upstream empty error.text in XUnit Feb 20, 2022
@clemensutschig
Copy link
Member Author

clemensutschig commented Feb 22, 2022

please fwd port to master @albertpuente

@metmajer
Copy link
Member

metmajer commented Mar 2, 2022

@jafarre-viewnext can you please assist with the forward to the master branch?

@metmajer
Copy link
Member

metmajer commented Mar 5, 2022

@jafarre-viewnext please close this if merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants