[MAGNOLIA-8207] DataTransporter (for file import) may fail if the file-name does not reflect the node name Created: 14/Oct/21  Updated: 27/Oct/22

Status: Selected
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Christoph Meier Assignee: Michael Duerig
Resolution: Unresolved Votes: 0
Labels: VN-Maintenance, artt
Remaining Estimate: Not Specified
Time Spent: 2.5h
Original Estimate: Not Specified

Attachments: File website.test-publish-variants-AUTHOR-with-variants.yaml     File website.test-publish-variants-PUBLIC-no-variants.yaml     File website.test-publish-variants.yaml    
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
Team: Foundation

 Description   

Context / how to reproduce

Page 'test-publish-variants' - which has no variants - has been published.
After that, on AUTHOR variants were added.
Then bootstraps are created of the version with variants from AUTHOR and from the version without variants from PUBLIC.

This setup was used to test publishing of page-variants.
I have renamed both files to have them in same resources directory, and to make it easy to recognize the right file.

Files:
(a) website.test-publish-variants-PUBLIC-no-variants.yaml
(b) website.test-publish-variants-AUTHOR-with-variants.yaml
On File (b) I had to remove some jcr-properties (with the help of Roman).

Both files can be imported manually via UI. But only one of the file can be imported programmatically (via @Fixture).

@Fixture(fixtureFile = "website.test-publish-variants-PUBLIC-no-variants.yaml", repository = "website", instances = {  DIRECT_PUBLIC })

this works

@Fixture(fixtureFile = "website.test-publish-variants-AUTHOR-with-variants.yaml", repository = "website")

This fails

Renaming the one file (from author) - giving the "original name" - fixes the issue:

@Fixture(fixtureFile = "website.test-publish-variants.yaml", repository = "website")

this works

 

Developer note:

Roman assumes the problem is in DataTransporter - line 466



 Comments   
Comment by Christoph Meier [ 14/Oct/21 ]

tbh I'm not sure about Acceptance criteria.

For years I though that people should not change the file-name given by the export action. But I was told that one can change the given file-name to an arbitrary one - and import still would work.
But the described case is an example where this fails.

Generated at Mon Feb 12 04:30:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.