Skip to content

fix(monitors,synthetics_tests): drop stale restricted_roles/principals under new flag (3/4)#631

Draft
michael-richey wants to merge 1 commit into
drop-unresolvable-principals-restriction-policiesfrom
drop-unresolvable-principals-monitors-synthetics
Draft

fix(monitors,synthetics_tests): drop stale restricted_roles/principals under new flag (3/4)#631
michael-richey wants to merge 1 commit into
drop-unresolvable-principals-restriction-policiesfrom
drop-unresolvable-principals-monitors-synthetics

Conversation

@michael-richey

Copy link
Copy Markdown
Collaborator

Context

Stacked PR 3 of 4. Base: drop-unresolvable-principals-restriction-policies (PR #630).

This PR

Applies the same drop-aware pattern (PR #629 helpers) to the two resource types carrying both a flat restricted_roles list and a restriction_policy.bindings.principals composite:

  • monitors: restricted_roles + restriction_policy.bindings.principals
  • synthetics_tests: options.restricted_roles + restriction_policy.bindings.principals

Each connect_resources override keeps non-access-control connections (query/composite/slo-alert, private locations, subtests, global variables, rum/mobile apps) on the generic path, filters access-control references through the shared helpers, and preserves the empty-binding/empty-list access-elevation hard-fail. extract_source_ids left unaffected (documented). Unchanged when the flag is off.

Testing

New connect_resources drop suites in test_monitors.py and test_synthetics_tests.py covering both the composite and flat-list shapes (drop, empty-risk, middle-element regression, flag-off). Green; ruff clean.

🤖 Generated with Claude Code

…s under new flag

Applies the same drop-aware pattern (PR1 helpers) to the two resource types that carry
both a flat `restricted_roles` list and a `restriction_policy.bindings.principals` composite:

- monitors: `restricted_roles` + `restriction_policy.bindings.principals`
- synthetics_tests: `options.restricted_roles` + `restriction_policy.bindings.principals`

Each `connect_resources` override keeps all non-access-control connections on the generic
path, filters access-control references through the shared helpers, and preserves the
empty-binding/empty-list access-elevation hard-fail. `extract_source_ids` left unaffected
(documented). Behavior is unchanged when `--drop-unresolvable-principals` is off.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@michael-richey michael-richey force-pushed the drop-unresolvable-principals-restriction-policies branch from c0fbb7e to 76bcbff Compare July 14, 2026 21:32
@michael-richey michael-richey force-pushed the drop-unresolvable-principals-monitors-synthetics branch from 518113c to 27fd78f Compare July 14, 2026 21:32
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