[MGNLREST-159] Decoration lost effects after updating original definition Created: 11/Dec/17  Updated: 05/Mar/18  Resolved: 01/Mar/18

Status: Closed
Project: Magnolia REST Framework
Component/s: delivery
Affects Version/s: None
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Sang Ngo Huu Assignee: Hieu Nguyen Duc
Resolution: Fixed Votes: 0
Labels: consolidation, decoration
Remaining Estimate: 0d
Time Spent: 4d 6.5h
Original Estimate: 3d

Attachments: Zip Archive rest-decoration-failed.zip    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 133, Saigon 134, Saigon 135, Saigon 136
Story Points: 3

 Description   

After the decoration works, I update the original configuration, the decoration lost affects.

Seem decoration is not updated again.

Steps to reproduce:

  • Download and extract rest-decoration-failed.zip
  • Copy rest-test and add-features-1 to "light-module" folder
  • Test: endpoint return the result with decorated configuration
  • Update file rest-test/restEndpoints/rest1.yaml, decoration's effect is gone.
  • Test: Endpont return result with original configuration


 Comments   
Comment by Hieu Nguyen Duc [ 12/Feb/18 ]

Tested on "magnolia-enterprise-5.6.2-SNAPSHOT"

Steps:
+ Make sure tourFinder endpoint is disabled

+ Copy "amazing-endpoint" and "amazing-endpoint-decoration" to "modules" folder

"amazing-endpoint/restEndpoints/amazing-endpoint.yaml"

class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
params:
  pages:
    workspace: website
    bypassWorkspaceAcls: true
    includeSystemProperties: false

"amazing-endpoint-decoration/decorations/amazing-endpoint/restEndpoints/amazing-endpoint.yaml"

params:
  pages:
    depth: 1
    nodeTypes:
      0: mgnl:page
    childNodeTypes:
      0: mgnl:page

+ curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/pages/v1'
=> The endpoint returns correct result.

+ Edit "amazing-endpoint/restEndpoints/amazing-endpoint.yaml" to have depth = 0

class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
params:
  pages:
    depth: 0
    workspace: website
    bypassWorkspaceAcls: true
    includeSystemProperties: false

+ curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/pages/v1'
=> The endpoint returns empty result
=> It's a bug

Comment by Oanh Thai Hoang [ 05/Mar/18 ]

While QA this ticket, I need to disable tourFinder since tourFinder still use rest v1 and is reporting problems in Definition app. Without tourFinder (MGNLDEMO-271) , decoration works good now.

Generated at Mon Feb 12 06:57:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.