Hi Martin,

Great! Thanks for fixing it! I reviewed the diff and it looks good.

Thanks

On Fri, Feb 20, 2015 at 6:00 AM, Martin Eppel (meppel) <mep...@cisco.com>
wrote:

>  forgot to attach the diff
>
>
>
> *From:* Martin Eppel (meppel)
> *Sent:* Thursday, February 19, 2015 2:23 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Thanks Imesh,
>
>
>
> I still see an issue in the respective
> ApplicationSignUpMessageProcessorChain.java which, IMHO doesn’t handle the
> ApplicationSignUpRemovedEvent because of the missing
> ApplicationSignUp<…>EventListener.
>
>
>
> I fixed the issue and checked it in (commit
> ddd6a1bd6d875d55bf8ca7a98b45160b6185bd6e), please see attached diff file
> and review,
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* Imesh Gunaratne [mailto:im...@apache.org <im...@apache.org>]
> *Sent:* Wednesday, February 18, 2015 7:46 PM
> *To:* dev
> *Subject:* Re: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Hi Martin,
>
>
>
> Application signups has a dedicated event receiver:
>
>
>
>
>
> They are not handled by Application event receiver, let us know if you
> need further clarifications.
>
>
>
> Thanks
> ​
>
>
>
> On Thu, Feb 19, 2015 at 4:52 AM, Martin Eppel (meppel) <mep...@cisco.com>
> wrote:
>
> Hi,
>
>
>
> I have another question regarding this implementation:
>
>
>
> The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent”
> (in agent.py), which subsequently I added as well to the JCA. However, it
> seems support for this event is missing in the “ApplicationsEventReceiver”
> (respectively  in the “ApplicationsMessageProcessorChain”), see also the
> runtime exception below. I did a search and couldn’t find this event
> anywhere being used in the system, so either the PCA is handling the wrong
> event or support for this event is entirely missing.
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event
> listener
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3
> <org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3>*
>
> *        at
> org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84)
> at java.lang.Thread.run(Thread.java:745)*
>
>
>
>
>
>
>
> *From:* Gayan Gunarathne [mailto:gay...@wso2.com]
> *Sent:* Tuesday, February 17, 2015 8:53 PM
> *To:* dev@stratos.apache.org
> *Subject:* Re: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Hi Martin,
>
>
>
> Thanks for identify that.It needs to be compare application ID. I have
> fixed that now.
>
>
>
> Hi Imesh,
>
>
>
> That part is didn't test since we have some issue with PCA git repo
> cloning at that time. But I guess now we can do the end to end testing on
> this.
>
>
>
> Thanks,
>
> Gayan
>
>
>
>
>
> On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
> Hi Martin,
>
>
>
> Thanks for identifying this, yes it seems like a bug. Gayan did we test
> this?
>
>
>
> IMO we need to compare the Application ID sent in the Application SignUp
> Removal event against the Application ID in the payload, then if the
> tenant's Git repository is already cloned we need to remove it.
>
>
>
> Thanks
>
>
>
> On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <mep...@cisco.com>
> wrote:
>
> In extensionhandler.py we compare in “
> *on_application_signup_removal_event*” method service_name with
> applicationId, is this a bug or intentional ?
>
>
>
> See snippet:
>
>
>
>
>
> def on_application_signup_removal_event(self,
> application_signup_removal_event):
>
>         self.log.info(
>
>             "Tenant unsubscribed event received: [tenant] " +
> application_signup_removal_event.tenantId +
>
>             " [application ID] " +
> application_signup_removal_event.applicationId
>
>         )
>
>
>
>         *if self.cartridge_agent_config.service_name ==
> application_signup_removal_event.applicationId:*
>
>
> agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
>
>
>
>         extensionutils.execute_application_signup_removal_extension({})
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
>
> Technical Lead
>
> WSO2 Inc. (http://wso2.com)
>
> email  : gay...@wso2.com  | mobile : +94 766819985
>
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to