Skip to content

Conversation

@ukayani
Copy link
Contributor

@ukayani ukayani commented Apr 8, 2020

Addresses #1660

  • this would ensure that route definitions from properties do not lose their relative ordering
  • only affects routes that end up having the same order, such as ones typically defined via properties (default order = 0)
  • using flatMap does not guarantee to preserve the order of elements, hence a switch to flatMapSequential to preserve order before the AnnotationAwareOrderComparator is used for sorting.

This would obviously have some overhead for needing to buffer elements to ensure ordering guarantees but probably isn't a big issue since there wouldn't be an extremely large amount of routes per locator.

… and likewise for routes

- this would ensure that route definitions from properties do not lose their relative ordering
@pivotal-issuemaster
Copy link

@ukayani Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@ukayani Thank you for signing the Contributor License Agreement!

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #1661 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1661   +/-   ##
=========================================
  Coverage     78.03%   78.04%           
  Complexity     1217     1217           
=========================================
  Files           156      156           
  Lines          4940     4941    +1     
  Branches        397      397           
=========================================
+ Hits           3855     3856    +1     
  Misses          879      879           
  Partials        206      206           
Impacted Files Coverage Δ Complexity Δ
...gateway/route/CompositeRouteDefinitionLocator.java 95.00% <100.00%> (+0.26%) 8.00 <1.00> (ø)
...ork/cloud/gateway/route/CompositeRouteLocator.java 100.00% <100.00%> (ø) 2.00 <1.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 439a912...d3f7180. Read the comment docs.

@spencergibb
Copy link
Member

Cherry-picked into 2.2.x via 73b01f8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routes defined via properties do not have their relative order preserved

4 participants