UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS#2188
UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS#2188chandrasekharan-zipstack wants to merge 2 commits into
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughGroup loading now supports environment-specified overlay manifests, merges and validates their groups, and rejects duplicate names. Organization lookup now returns ChangesManifest overlay loading
Organization context lookup
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
load_groups() now merges extra group manifests listed in the env var (os.pathsep-separated, REPO_ROOT-relative) onto the base tests/groups.yaml before validation, so cross-manifest depends_on and the platform-gate invariant are checked over the union. Name collisions are an error. Lets a downstream repo (the cloud build) contribute its own test groups by copying a groups.cloud.yaml into the merged tree, without editing the OSS manifest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnLaN45ShBbcCXWZkqCThz
fa7eaf8 to
16f31ce
Compare
|
| Filename | Overview |
|---|---|
| tests/rig/groups.py | Adds environment-driven overlay manifest loading and in-place merge before rig validation. |
| tests/rig/tests/test_groups.py | Adds tests for overlay manifest merging and duplicate group rejection. |
| backend/utils/user_context.py | Skips the organization query when the context has no organization identifier. |
| backend/utils/tests/test_user_context.py | Adds tests for no-context organization lookup behavior. |
Reviews (4): Last reviewed commit: "UN-3636 [FIX] Skip org lookup when no or..." | Re-trigger Greptile
ade772e to
16f31ce
Compare
UserContext.get_organization() ran Organization.objects.get() even with no org id in StateStore (import time, or management commands with no request), catching only DoesNotExist/ProgrammingError — a DB-less/unmigrated setup hit an uncaught OperationalError. Short-circuit when there's no org id: no query, so serializers/managers that reference org-scoped querysets at class-def can be imported during DB-free test collection.
|
Unstract test resultsPer-group results
Critical paths
|



What
load_groups()now merges extra group manifests listed in theUNSTRACT_RIG_EXTRA_MANIFESTSenv var (os.pathsep-separated, REPO_ROOT-relative) onto the basetests/groups.yamlbefore validation — so cross-manifestdepends_onand the platform-gate invariant are checked over the union. Group-name collisions are an error, not a silent override.Why
Lets a downstream repo contribute its own test groups without editing the OSS manifest. First consumer is the cloud build: it copies a
tests/groups.cloud.yamlinto the merged tree (viacopy_cloud_deps.py) and points the env var at it, so cloud-only plugin test groups (workers, etc.) join the rig without forkinggroups.yaml. No cloud specifics leak into OSS.Changes
tests/rig/groups.py:_extra_manifest_paths()+_merge_manifest(), wired intoload_groups().tests/rig/tests/test_groups.py: +2 self-tests (successful merge with cross-manifestdepends_on; name-collision rejected).Notes
feat/un-3636-execute-path-llm-mock(UN-3636 [DEV] Hermetic LLM mock hook for execute-path critical tests #2170). Rebase onto main once that merges.🤖 Generated with Claude Code