[MAGNOLIA-7396] magnolia.bootstrap.dir does not support yaml files Created: 22/Oct/18  Updated: 04/Sep/19  Resolved: 03/Sep/19

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.7.1
Fix Version/s: 5.7.5, 6.1.3, 6.2

Type: Improvement Priority: Neutral
Reporter: Mercedes Iruela Assignee: Adam Siska
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relation
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)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Support
Sprint: Maintenance & Releases
Story Points: 3

 Description   

When YAML files are located in the directory configured by magnolia.bootstrap.dir, this content is not bootstrapped.

Steps to reproduce ( in a new Magnolia bundle):

  1. In an already working instance, create a page and export it to YAML (for example, with a page it might be any other content).
  2. Store the YAML file in /bootstrap/common (magnolia.bootstrap.dir default value) in the new instance.
  3. Start the server and install Magnolia.
  4. Go to Pages app, the page wasn't bootstrapped.

The cause seems to be in info.magnolia.importexport.Bootstrapper.getBootstrapFiles(String[], String, BootstrapFilter) where YAML files are not accepted:

public boolean accept(File dir, String name) {
                    return name.startsWith(repositoryName + ".")
                            && filter.accept(name)
                            && (name.endsWith(DataTransporter.XML) || name.endsWith(DataTransporter.ZIP) || name
                            .endsWith(DataTransporter.GZ) || name.endsWith(DataTransporter.PROPERTIES));
                }

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