Skip to content

Conversation

simonbasle
Copy link
Contributor

This commit slightly changes the way filterWhen is used in route
predicate mapping, in order to avoid swallowing of errors due to the
combination of filterWhen and next(). This is due to filterWhen
delaying the emission of async predicate errors to the end of the
Flux, and next() potentially cancelling said Flux before the error(s)
are propagated.

The fix involves applying filterWhen inside a concatMap, on a value
per value basis rather than on the whole original Flux. This results
in predicate errors being propagated as they happen, at which point
we can log them and swallow them in the concatMap.

This commit slightly changes the way filterWhen is used in route
predicate mapping, in order to avoid swallowing of errors due to the
combination of `filterWhen` and `next()`. This is due to `filterWhen`
delaying the emission of async predicate errors to the end of the
Flux, and `next()` potentially cancelling said Flux before the error(s)
are propagated.

The fix involves applying `filterWhen` inside a `concatMap`, on a value
per value basis rather than on the whole original Flux. This results
in predicate errors being propagated as they happen, at which point
we can log them and swallow them in the concatMap.
@codecov-io
Copy link

codecov-io commented Jul 11, 2018

Codecov Report

Merging #427 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
+ Coverage   68.72%   68.74%   +0.01%     
==========================================
  Files         125      125              
  Lines        3479     3481       +2     
  Branches      237      237              
==========================================
+ Hits         2391     2393       +2     
  Misses        964      964              
  Partials      124      124
Impacted Files Coverage Δ
.../gateway/handler/RoutePredicateHandlerMapping.java 90.24% <100%> (+0.5%) ⬆️

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 c343b0c...240541e. Read the comment docs.

@spencergibb spencergibb added this to the 2.0.1.RELEASE milestone Jul 11, 2018
@spencergibb
Copy link
Member

Merged with polish via e9ea2b6

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.

3 participants