feat: migrate Tier 2 resources to map_existing_resources#529
Merged
michael-richey merged 1 commit intomrichey/map-existing-resources-tier1from Apr 20, 2026
Merged
Conversation
b473ca6 to
9618178
Compare
8cda408 to
a5e6ec6
Compare
9618178 to
8de4dc4
Compare
heyronhay
approved these changes
Apr 20, 2026
8de4dc4 to
159d33c
Compare
468316e to
c93fa20
Compare
159d33c to
ad69f8e
Compare
Migrate 3 complex resources that override map_existing_resources() with custom fetch/mapping logic while using the standardized _existing_resources_map dict. Migrated resources: - roles: override with get_destination_roles_mapping(), removed redundant re-fetch from pre_resource_action_hook (N+1 perf fix) - security_monitoring_rules: override with get_destination_rules(), removed side-effect dest fetch from get_resources() - team_memberships: override with composite team_id:user_id key, O(1) dict lookup replaces O(n) list scan Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ad69f8e to
aef178a
Compare
c93fa20 to
09fc70a
Compare
9a35c56
into
mrichey/map-existing-resources-tier1
3 checks passed
3 tasks
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.
Summary
map_existing_resources()with custom logic_existing_resources_mapas the standardized dict nameMigrated resources
rolesattributes.nameget_destination_roles_mapping(); removed N+1 re-fetch frompre_resource_action_hooksecurity_monitoring_rulesnameget_destination_rules(); removed side-effect dest fetch fromget_resources()team_membershipsteam_id:user_id(callable)Notable improvements
pre_resource_action_hook(was O(n) calls where n = number of roles)_get_existing_team_membership()linear scanStack
Test plan
🤖 Generated with Claude Code