Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicorn.DataProvider.10.1.config role:require setting prevents the config from being loaded on XM0 #423

Open
islaytitans opened this issue Feb 3, 2022 · 2 comments

Comments

@islaytitans
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Unicorn.DataProvider.10.1.config role:require is set to "Standalone" however XM0 doesn't have a Standalone mode for local development. Unlike XP0, XM0 creates both a CM and CD instance. Therefore the config is not included.

Resulting in saved changes to items are not written to the file system automatically. However Syncing or Reserializing works correctly when triggered through the Unicorn interface.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Install a clean 10.2 XM0
  2. Add Unicorn 4.1.6 to the CM webroot
  3. Change Unicorn.Configs.Example.example to be Unicorn.Configs.Example.config so it monitors /sitecore/layout/Layouts/YourSite
  4. Add an item under /sitecore/layout/Layouts/YourSite and save
  5. Observe the yml file is not created in the targetDataStore

What is the expected behavior?
After completing step 4 the yml file should automatically appear the in the targetDataStore.

I can make the expected behaviour to occur by changing Unicorn.DataProvider.10.1.config role:require="Standalone" to role:require="Standalone or ContentManagement" but obviously we only need that change on locals. I'm currently investigating if you can change a role:require value via a config transform.

Please mention your Sitecore version and Unicorn version.
Sitecore - 10.2
Unicorn - 4.1.6

It's also worth mentioning this issue also affects Unicorn.UI.DeployedContentEditorWarnings.config as they're typically warnings / text you want to show on Prod to content editors. Not so much of an issue as you can patch Unicorn.DevMode to be true

@cassidydotdk
Copy link
Member

Yea it's a little bit fuzzy, since Sitecore and the roles it ships with has changed a bit over the years while Unicorn at least attempts to remain as compatible as possible with as many versions as possible. The reason I've not made the change you suggest is also the same reason you mention yourself; if I change the default role to Standalone or ContentManagement this might come as a surprise to people who are currently deploying to an upstream environment where they expect the dataprovider to be inactive.

Possibly the best solution would be to make this driven by an environment variable of some sort, but I'm not entirely certain that this is actually possible. Something along the lines of role:require="$(env:UNICORN_DATAPROVIDER_ROLE)" or some such. Definitely open to any suggestions you could offer - as long as they don't introduce a "surprise gotcha" to existing installations.

@markgibbons25
Copy link

I think it should be safe to change it to Standalone or ContentManagement, in the new world of more XM and less XP, we are going to see more people with only ContentManagement role enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants