Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18523

java.util.NoSuchElementException: No value present when trying to import job which was deleted

    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      HTR

      1. Create a plan with a set of jobs
      2. Delete that plan via Bamboo UI
      3. Try to import plan with Bamboo Specs with jobs with the same keys

      Expected result

      Plan is imported and new definition is active

      Actual result

      The following exception is returned

      java.util.NoSuchElementException: No value present
      	at java.util.Optional.get(Optional.java:135)
      	at com.atlassian.bamboo.configuration.external.helpers.JobImportHelper.findJobByKeyExpectingSuccess(JobImportHelper.java:20)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.createTasks(PlanConfigImportServiceImpl.java:901)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$modifyTopLevelPlanFunction$1(PlanConfigImportServiceImpl.java:421)
      	at com.atlassian.bamboo.core.ScopedExclusionServiceImpl.tryWithLock(ScopedExclusionServiceImpl.java:74)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.modifyExistingTopLevelPlan(PlanConfigImportServiceImpl.java:315)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$importPlan$0(PlanConfigImportServiceImpl.java:296)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
      	at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:35)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.importPlan(PlanConfigImportServiceImpl.java:288)
      	at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.importPlan(PlanConfigImportServiceImpl.java:162)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy488.importPlan(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      	at com.sun.proxy.$Proxy721.importPlan(Unknown Source)
      	at com.atlassian.bamboo.plugins.rest.configuration.external.BambooPlanConfigImportResource.importPlan(BambooPlanConfigImportResource.java:113)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
      

      Workaround

      Change Bamboo Specs Jobs keys to new and unique.

            [BAM-18523] java.util.NoSuchElementException: No value present when trying to import job which was deleted

            Martyna Wojtas (Inactive) made changes -
            Resolution New: Timed out [ 10 ]
            Status Original: Gathering Interest [ 11772 ] New: Closed [ 6 ]

            Atlassian Update - 24 March 2020

            Hi,

            Thank you for raising this suggestion. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request.

            This is an automated update triggered by low user engagement with this suggestion (number of votes, number of watchers).

            Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Bamboo team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested.

            Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments.

            Thank you,

            Bamboo Team

            Martyna Wojtas (Inactive) added a comment - Atlassian Update - 24 March 2020 Hi, Thank you for raising this suggestion. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request. This is an automated update triggered by low user engagement with this suggestion (number of votes, number of watchers). Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Bamboo team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments. Thank you, Bamboo Team
            Martyna Wojtas (Inactive) made changes -
            Labels Original: bamboo-specs New: bamboo-bugs-grooming bamboo-specs
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3019209 ] New: JAC Suggestion Workflow 3 [ 3606141 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing v4 [ 2701134 ] New: JAC Suggestion Workflow [ 3019209 ]
            Owen made changes -
            Symptom Severity Original: Major [ 14431 ] New: Severity 2 - Major [ 15831 ]
            Krystian Brazulewicz made changes -
            UIS New: 0
            Owen made changes -
            Issue Type Original: Improvement [ 4 ] New: Suggestion [ 10000 ]
            Owen made changes -
            Status Original: Not Being Considered [ 11776 ] New: Gathering Interest [ 11772 ]
            Owen made changes -
            Status Original: Gathering Interest [ 11772 ] New: Not Being Considered [ 11776 ]

              Unassigned Unassigned
              glewandowski Grzegorz Lewandowski
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: