[MGNLHOOK-242] Use Webhooks on SaaS with JCR or Norsu Created: 10/Oct/22  Updated: 02/Nov/22  Resolved: 02/Nov/22

Status: Closed
Project: Magnolia Webhooks
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Javier Benito
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1.5h Time Spent: 1.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
supersession
is superseded by MGNLHOOK-269 Detect cloud assets events (published... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLHOOK-243 Implementation Sub-task Completed Javier Benito  
MGNLHOOK-244 Review Sub-task Completed Oanh Thai Hoang  
MGNLHOOK-245 Pre-Integration QA Sub-task Completed Oanh Thai Hoang  
MGNLHOOK-246 QA Sub-task Completed Chuong Doan Huy  
Team: DeveloperX
Date of First Response:
Epic Link: Webhook on SaaS
Sprint: DevX 22
Story Points: 2

 Description   

As a developer I would like to use Webhooks on SaaS whether I am using JCR or Norsu content.

Investigate how much effort it will be to support webhooks on SaaS with both JCR and Norsu (rather then only Norsu) For example, possibly with a "feature flag"

PM will make a decision about whether we do this based on the effort and the customer demand.

 

This ticket work will be included with https://jira.magnolia-cms.com/browse/MGNLHOOK-269 ticket work.



 Comments   
Comment by Javier Benito [ 11/Oct/22 ]

After taking a look at it, we have at least these two options:
1. Just use both dependencies on SaaS cloud at the same time (jcr and norsu).
2. Also, create a feature flag to enable or disable jcr or norsu for a given subscription ID at runtime.

Option 1.

 
We can declare both dependencies in cloud webapp pom.xml file. It'll be built to support detecting events (Published, Unpublished) for both types of content. A proof of concept that tests it: 

 
If the image built by Jenkins for that branch is deployed on Staging, it works detecting events with both types of content.
 
Story points: 2 at most.
 
It seems to be enough with Option 1, but first we need to check if we're allowed to keep jcr dependency for webhooks on cloud webapp.

Option 2.

 
This option relies on Option 1, but also adds the ability to dynamically configure by subscription, which content is expected to be managed on it (related to webhooks).
In this case, we'd implement a feature flag to dynamically add the target command detection (jcr, norsu or both) on instance startup, by subscription.
Feature toggles in this case must be used.
 
Usage examples:

 
Having two feature toggles for example for webhooksContentJcr and webhooksContentNorsu, we could check if we want to add (or remove) the detection:

 
This would give us the ability to know what customers are currently using webhooks on jcr or norsu, in order to eliminate/migrate jcr from SaaS in the future.
 
Story points: 5.

Comment by Christopher Zimmermann [ 11/Oct/22 ]

Option 1 looks good to me. What do you think jsimak 

Comment by Javier Benito [ 19/Oct/22 ]

FTR, we've agreed to go with Option 1.

Generated at Mon Feb 12 10:02:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.