[NCX-46] Two-part Config Flag setup for Requiring Orgs During Site Creation#2781
Open
IndigoW0lf wants to merge 3 commits intopantheon-systems:4.xfrom
Open
[NCX-46] Two-part Config Flag setup for Requiring Orgs During Site Creation#2781IndigoW0lf wants to merge 3 commits intopantheon-systems:4.xfrom
IndigoW0lf wants to merge 3 commits intopantheon-systems:4.xfrom
Conversation
- Introduced the `TERMINUS_SITE_CREATE_REQUIRE_ORG` flag in `constants.yml` to control the requirement of an organization during site creation. - Updated `CreateCommand` to warn users when the organization parameter is missing if the feature flag is enabled. - Modified `Interacter` to enforce organization selection based on the new feature flag. - Added a functional test to verify the warning behavior when the organization is not provided and the flag is enabled.
- Updated feature flags in `constants.yml` to introduce `TERMINUS_SITE_CREATE_WARN_ORG` for deprecation warnings and retain `TERMINUS_SITE_CREATE_REQUIRE_ORG` for future enforcement. - Modified `CreateCommand` to implement phased organization requirement checks, providing warnings and exceptions based on the respective flags. - Added a new test to verify the enforcement of organization requirement when the corresponding flag is enabled.
| // Phase 1: Warn about org requirement when feature flag is enabled. | ||
| if ($this->config->get('site_create_warn_org') && empty($options['org'])) { | ||
| $this->log()->warning( | ||
| 'Creating sites without an organization will be deprecated. ' . |
Member
There was a problem hiding this comment.
Deprecated == strongly discouraged. Use "removed" or "disabled" or "disallowed" when talking about future status. In the present, creating sites without an organization should be described as deprecated right now, because we want to start training people towards the new model.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two feature flags to support the gradual rollout of requiring
--orgfor site creation. This helps customers migrate away from personal workspace site creation before it's fully deprecated platform-wide.Background
Personal workspaces are being deprecated. When that happens, all site creation will require an organization. These flags let us warn customers first, then enforce the requirement when the platform is ready.
How It Works
Flag 1:
TERMINUS_SITE_CREATE_WARN_ORG(the gentle nudge)site:createwithout--orgFlag 2:
TERMINUS_SITE_CREATE_REQUIRE_ORG(the enforcement)--orgis missing in non-interactive modeWhy Two Flags?
Having separate flags means we can roll this out in phases instead of breaking everyone's scripts at once. We can turn on warnings early while customers update their automation, then flip the enforcement flag later when the API is ready to reject orgless sites.
Implementation
Rollout Plan
Important Notes
--orgto their scripts before enforcementTests
testSiteCreateWarnsWhenOrgMissingAndWarnFlagEnabled: Warning shows up correctlytestSiteCreateRequiresOrgWhenRequireFlagEnabled: Blocking works as expectedReferences