Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC2: create_route() should allow overlapping CIDR's #6106

Merged

Conversation

bblommers
Copy link
Collaborator

Fixes #6096

Partially reverts #5233

@mmerrill3 Do you remember the details about the linked PR that you raised? From my testing, overlapping CIDR's are allowed - as long as it's not a direct match.
The docs even mention this scenario, and explain what happens when overlapping routes exist: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/create_route.html

Just wanted to know whether there was a specific reason that you added this check, maybe I missed some important details in my testing.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #6106 (0d23a58) into master (681db43) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #6106   +/-   ##
=======================================
  Coverage   96.24%   96.24%           
=======================================
  Files         766      766           
  Lines       75425    75425           
=======================================
  Hits        72594    72594           
  Misses       2831     2831           
Flag Coverage Δ
servertests 36.94% <0.00%> (ø)
unittests 96.18% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
moto/ec2/models/route_tables.py 96.99% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mmerrill3
Copy link
Contributor

@bblommers, it looks like my PR was too stringent in its check, given the documentation. There was no use case that I remember where overlapping routes were being disallowed, only that my thinking at the time was to treat route setups like adding CIDRs to a VPC.

@bblommers bblommers marked this pull request as ready for review March 22, 2023 14:05
@bblommers
Copy link
Collaborator Author

Thanks for confirming @mmerrill3 - so we'll just revert that part

@bblommers bblommers merged commit 53603b0 into getmoto:master Mar 22, 2023
75 checks passed
@bblommers bblommers deleted the ec2/routes-validation-too-strict branch March 22, 2023 14:39
@github-actions
Copy link
Contributor

This is now part of moto >= 4.1.6.dev17

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.

Incorrect behavior when a routing table contains a route for destination cidr 0.0.0.0/0
2 participants