Repository navigation
Preserve endpoint ownership when removing cloned router rules - #56
Draft
AndreKurait wants to merge 1 commit into
Draft
AndreKurait wants to merge 1 commit into
AndreKurait wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Removing one route can also remove another endpoint registered at the same host and path because Werkzeug Rule equality compares the URL trace. Compare the public clone-constructor arguments when matching removal handles, preserving endpoint, method, host and subclass distinctions across map cloning. Constructor-identical duplicate registrations retain their existing remove-together behavior.
Regression tests cover both removal orders, root and catch-all paths, different methods, foreign handles, stale handles, duplicate registrations and generators. Seven regressions fail before the change; 41 router, dispatcher and resource tests pass against both source and the built wheel. Black and Ruff checks pass. The complete owner suite also passes on Python3.12: 204tests, 0failures, 0errors and 0skips. This PR stays draft for upstream review and CI.
A separate disposable LocalStack experiment also confirmed the ownership correction across weighted alias CREATE, UPSERT, DELETE and recreation: unrelated routes survive, and removing one leaves the native ALB route intact. This is not a claim that every LocalStack routing path is repaired; a separate Classic ELB recreation failure remains under investigation.