Skip to content

Preserve endpoint ownership when removing cloned router rules - #56

Draft
AndreKurait wants to merge 1 commit into
localstack:mainfrom
AndreKurait:akurait/router-removal-identity-20261012-v1
Draft

AndreKurait wants to merge 1 commit into
localstack:mainfrom
AndreKurait:akurait/router-removal-identity-20261012-v1

Conversation

@AndreKurait

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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