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
75 stars 57 forks source link

ReleaseManger failed job is not keeping status from Running to Failed #938

Closed petod108 closed 2 years ago

petod108 commented 2 years ago

Describe the bug Failing Relasemanager job is not setting status 'Failed' and instead is keeping status 'Running'

To Reproduce Steps to reproduce the behavior: http://ec2-54-155-126-35.eu-west-1.compute.amazonaws.com/job/edp-e2e-tests/job/e2e/job/master/job/ApproveFailedDeployReleaseSpec/66/

  1. first QuickStarter for E2E project Geb-Spock created project with missing metadata.yml
  2. set E2E project to has failing test
  3. Developers preview failed because of missing metadata.yml
  4. changed status manually to Success
  5. run "Deploy to D" failed because of missing metadata.yml
  6. changed status manually to Success
  7. move to 'D SLC DOCS APPROVED'
  8. run "Deploy to Q" failed because of Error: "unable to find latest tag for version 1.0/1.0."
  9. status of release manager didn't changed never from Running to Failed

Expected behavior Even Release manager failed is should change status from Running to Failed

Screenshots Jenkins Log

Affected version (please complete the following information):

Log Output (ensure to remove any confidential information like tokens, project names, etc.

12:16:45      java.lang.RuntimeException: Error: unable to find latest tag for version 1.0/1.0.
12:16:45        at org.ods.orchestration.InitStage.checkOutRepoInPromotionMode(InitStage.groovy:498)
12:16:45        at org.ods.orchestration.InitStage.checkOutReleaseManagerRepository(InitStage.groovy:440)
12:16:45        at org.ods.orchestration.InitStage.run(InitStage.groovy:56)
12:16:45        at org.ods.orchestration.Stage.execute(Stage.groovy:40)
12:16:45        at ___cps.transform___(Native Method)
12:16:45        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
12:16:45        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
12:16:45        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
12:16:45        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
12:16:45        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
12:16:45        at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
12:16:45        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
12:16:45        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
12:16:45        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
12:16:45        at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.constructorCall(DefaultInvoker.java:25)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:97)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
12:16:45        at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
12:16:45        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:16:45        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:16:45        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:107)
12:16:45      Caused: java.lang.IllegalStateException: Error: invalid references have been detected for critical pipeline services. Most likely, your Jenkins instance has been recycled. Please re-run the pipeline!
12:16:45        at org.ods.orchestration.Stage.execute(Stage.groovy:45)
12:16:45        at ___cps.transform___(Native Method)
12:16:45        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
12:16:45        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
12:16:45        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
12:16:45        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
12:16:45        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
12:16:45        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
12:16:45        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
12:16:45        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
12:16:45        at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.constructorCall(DefaultInvoker.java:25)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:97)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
12:16:45        at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
12:16:45        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:16:45        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:16:45        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
12:16:45        at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:87)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
12:16:45        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
12:16:45        at jdk.internal.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
12:16:45        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:16:45        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:16:45        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
12:16:45        at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
12:16:45        at com.cloudbees.groovy.cps.Next.step(Next.java:83)
12:16:45        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
12:16:45        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
12:16:45        at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
12:16:45        at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
12:16:45        at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
12:16:45        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
12:16:45        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:186)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270)
12:16:45        at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:66)
12:16:45        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
12:16:45        at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
12:16:45        at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
12:16:45        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
12:16:45        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
12:16:45        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
12:16:45        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
12:16:45        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
12:16:45        at java.base/java.lang.Thread.run(Thread.java:834)

Additional context Add any other context about the problem here.