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

Bamboo retains instance of custom NotificationRecipient after add-on uninstalled

    XMLWordPrintable

Details

    Description

      Summary

      Our add-on Automation with AWS (Bamboo) implements an "Automate with AWS" notification recipient. When using this recipient in a plan notification, a reinstall (or disable/enable cycle) of the add-on triggers the following ServiceProxyDestroyedException (also see attached Bamboo log excerpt) when trying to view or edit the plan notification afterwards, resulting in no content being displayed for the notification on view or edit:

      2016-10-20 17:22:50,804 ERROR [http-nio-6990-exec-9] [AwsActionNotificationRecipient] Failed to render edit html: 
      org.eclipse.gemini.blueprint.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:101)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:81)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:427)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:400)
          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.$Proxy1386.getLicense(Unknown Source)
          at net.utoolity.atlassian.dry.licensing.LicenseCheck.ensureValidLicense(LicenseCheck.java:86)
          at net.utoolity.atlassian.dry.licensing.LicenseCheck.ensureValidLicense(LicenseCheck.java:62)
          at net.utoolity.atlassian.aaws.bamboo.AwsActionNotificationRecipient.getEditHtml(AwsActionNotificationRecipient.java:286)
      
      

      NOTE: This problem only occurs for build plan notifications, not for system notifications.

      Steps to reproduce:

      • Install Automation with AWS (Bamboo)
      • Configure at least one System Scope connector under plugins/servlet/identity-federation-for-aws/configuration/aws-connector (this does not have to be based on real AWS credentials, a dummy entry will do for the repro case)
      • Add a Plan level notification using the "Automate with AWS" recipient type (again, any entries will do, e.g. selecting the dummy connector created above, an arbitrary action and an empty JSON "{}" for the Parameters field just to pass validation)
      • Disable the add-on
      • Enable the add-on
      • Try to edit the notification created above (or just refresh the Plan Notifications page) - this will trigger the SPDE, logged to the main Bamboo log.

      Partial workaround

      We have not found a way to prevent this exception, but once the issue occurs, it can be fixed by adding/removing a dummy notification:

      • Add an arbitrary new dummy notification (for example, notify a User and select yourself).
      • The notification list should now surface your intended edit on the original notification.
      • Delete the dummy notification again.

      This seems to trigger a complete refresh of the involved NotificationRecipient instances, thus fixing the issue.

      Attachments

        Issue Links

          Activity

            People

              kbrazulewicz Krystian Brazulewicz
              847fe7f23dab Henrik Opel [Utoolity]
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: