Loading
Remove the extended_organization_url_scoping feature flag
What does this MR do and why?
This MR removes the extended_organization_url_scoping feature flag. This was a gitlab_com_derisk flag added in !254952 (merged). It has been enabled for 100% of GitLab.com for over 24 hours, so we can clean it up now.
The flag controlled organization URL scoping (the /o/:organization_path/... routes) for module-level URL helpers, url_for/polymorphic_url, and the fallback that reads the organization from the X-GitLab-Organization-ID header on API requests. With the flag gone, this behavior is now always on.
app/helpers/routing/organizations_helper.rb: removed the separate "gated" override module.MappedHelpers.installnow prepends one override module everywhere. The override method is a plain if/else again: if a scoped path exists, call the organization helper, otherwise callsuper.header_organizationno longer checks the flag, andextended_scoping_enabled?is removed.- Removed the three "flag disabled" contexts from
spec/helpers/routing/organizations_helper_spec.rband deleted the flag YAML file. - Renamed
spec/support/extended_organization_url_scoping.rbtospec/support/organization_url_header_fallback.rb. It now stubsMappedHelpers.header_organizationto returnnilfor feature specs, instead of stubbing the flag. This keeps feature specs unscoped until #605262 is done. Reviewers should take a look at this part.
References
Screenshots or screen recordings
Not applicable, backend URL generation only.
How to set up and validate locally
- In a Rails console, create an organization with path
my-organd move a group into it. You still needFeature.enable(:ui_for_organizations)for the organization UI. - Call an API endpoint with the
X-GitLab-Organization-IDheader set to that organization's ID, for examplecurl -H "X-GitLab-Organization-ID: <id>" http://gdk.test:3000/api/v4/groups/<group-id>. Check thatweb_urlvalues are nested under/o/my-org/. - In a Rails console, inside an organization context, run
Gitlab::Routing.url_helpers.projects_pathand check it returns/o/my-org/projects. No feature flag needs to be enabled anymore.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.