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

Reconsider default branch in default context #10925

Open
rymsha opened this issue Feb 20, 2025 · 0 comments
Open

Reconsider default branch in default context #10925

rymsha opened this issue Feb 20, 2025 · 0 comments
Assignees
Milestone

Comments

@rymsha
Copy link
Contributor

rymsha commented Feb 20, 2025

Default preferred branch in different usages is different.

  • To access content in live mode - master should be by default.
  • To read/write non-content repositories master would be preferred (usually master is the only branch there)
  • To modify by content studio - draft should be preferred. (done in Do not use ContextAccessor.INSTANCE app-contentstudio#8392)

And it does confuse developers, as they spend time understanding why when they want to read content they only get a draft version - a bug which is hard to realize earlier.
This happens because

  • when hoot request is received - draft branch is selected in ContextFilter
  • when context is accessed ContextAccessor.get() and context does not exist - which is a very rare case - there should be no default branch set.

Recently content's draft branch become effectively read only for most of the methods, so it is much safer to set master branch as default for http requests.

And when there is no context at all - the default branch should be not set at all - so developers can realize errors quicker.

@rymsha rymsha added this to the 8.0.0 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants