Skip to content

fix(managed-context): correct namespace context calculation for multi-package#3988

Open
jstvz wants to merge 3 commits into
mainfrom
cherry/pr-3906-managed-context-fix
Open

fix(managed-context): correct namespace context calculation for multi-package#3988
jstvz wants to merge 3 commits into
mainfrom
cherry/pr-3906-managed-context-fix

Conversation

@jstvz
Copy link
Copy Markdown
Contributor

@jstvz jstvz commented May 27, 2026

Summary

Cherry-pick of #3906 by @jorgesolebur with fixes for lint, test compatibility, and a backward-compat fix for task-level namespace option fallback.

  • Centralizes managed-mode determination into determine_managed_mode() in cumulusci/core/utils.py
  • Indexes installed_packages by package Name in addition to namespace and ID
  • Fixes ___NAMESPACED_ORG___ token replacement in package.xml
  • Adds backward-compatible fallback to options["namespace"] when project config namespace is unset

Closes #3906

Test plan

  • All touched module tests pass locally (394 passed)
  • CI required checks pass (Python 3.11-3.13)

Co-authored-by: Jorge Soler jsolerburguera@salesforce.com

…-package

Centralize managed-mode determination into `determine_managed_mode()`
utility. Fix installed_packages dict to also index by package Name.
Fix ___NAMESPACED_ORG___ token replacement in package.xml.

Includes lint fixes and test fixture updates for compatibility with
the new installed_packages keys.

Co-authored-by: Jorge Soler <jsolerburguera@salesforce.com>
jstvz added 2 commits May 27, 2026 12:37
Only access org_config.installed_packages when namespace or
package_name is set. Prevents unnecessary API calls in tasks
where no namespace context applies.
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

Successfully merging this pull request may close these issues.

1 participant