Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a conditional completion-anchor ChangesCompletion anchor resource
Documentation updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
…gUnitsAndGroups completion anchor
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.
Pull Request (PR) description
Fixes #XXX. Follow-up to #248 / #249 (same symptom class, different root cause).
AddsDomainPrincipalsis typically ordered afterAddsOrgUnitsAndGroupswith acomposite-level dependency:
Root cause. Both entries are composite references, and DSC applies two
multiplicative expansions when the composites are expanded into a root
configuration:
DependsOnexpands to areference to every resource that composite generated (~5 for
AddsDomainAddsOrgUnitsAndGroups= 562).DependsOnplaced on a consuming compositeis copied onto every resource that composite emits (~130
ADUser_MemberOfScript+ … ≈ 230).The two multiply: ≈ 230 × 562 ≈ 129,000 fully-qualified
DependsOnstrings≈ 16 MB. On a real DC (~130 users, ~200 groups, ~350 OUs) each
MSFT_ADUserMOF block was 73,360 bytes, of which 72,770 (99.2 %) was a 562-entry
DependsOnarray; the node MOF was 17.8 MB. That compiles (below the50 MB
ValidateInstanceTextlimit addressed by #248/#249) but cannot bepushed —
Start-DscConfigurationfails withMOF file size exceeded max size limit./MI RESULT 27(MI_RESULT_SERVER_LIMITS_EXCEEDED), the hard ~10 MBLCM push limit that
MaxEnvelopeSizeKbdoes not affect (see Microsoft365DSC #357).The
AddsDomainPrincipalscomposite itself is fine — each_MemberOfscriptdepends only on its own
[ADUser]; the bloat is entirely the propagatedcomposite-level
DependsOn.Fix.
AddsOrgUnitsAndGroupsnow publishes a single, always-in-desired-statecompletion anchor — a
ScriptresourceAddsOrgUnitsAndGroupsCompletewhoseDependsOnlists every OU and group the composite creates. Consumers orderafter the whole composite with one non-expanding reference:
That single reference propagates to
AddsDomainPrincipals's ~230 resources as1 edge each instead of 562, so ordering is preserved (users find their
PathOU;_MemberOfscripts find their target groups) while the node MOFstays small. No cycle:
AddsDomainPrincipals→ anchor → OUs/groups; nothingpoints back.
[AddsDomain]AddsDomainbecomes redundant in the consumer becausethe anchor is transitively after
AddsDomainvia the existingAddsOrgUnitsAndGroups.DependsOn. The anchor is inert (TestScript = { $true },empty
SetScript) — it never performs work; it is purely an ordering gate — andis skipped when neither OUs nor groups are defined, so existing consumers that
don't reference it are unaffected.
Measured (real DC): node MOF 17.8 MB → < 2 MB; sample
MSFT_ADUserDependsOn562 entries → 1; push no longer returnsMI RESULT 27.Added
AddsOrgUnitsAndGroups: always-in-desired-stateAddsOrgUnitsAndGroupsCompletecompletion anchor that depends on every OU and group the composite creates, so
consuming composites (e.g.
AddsDomainPrincipals) can order after the wholecomposite with a single cross-composite reference instead of a composite-wide
DependsOn. The composite-wide form expands to every member resource and, whenplaced on a consuming composite, is propagated to every resource that composite
emits — an O(consumers × members) explosion that bloated the node MOF past the
hard ~10 MB LCM push limit (
MI RESULT 27). The anchor is inert and is skippedwhen no OUs or groups are defined. [fix #XXX]
Task list
build.ps1 -ResolveDependency).and comment-based help.