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

Align the Uni::eventually operators to onTermination() semantics #1743

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

jponge
Copy link
Member

@jponge jponge commented Nov 20, 2024

The Uni::eventually(Runnable) operator had been previously moved from onItemOrFailure() to onTermination() semantics so as to handle cancellation on top of already handling items and failures.

This aligns the eventually(Supplier<Uni<T>>) variant with its eventually(Runnable) counterpart.

Fixes #1742.

BREAKING CHANGE: this may break code bases where onItemOrFailure() semantics were correctly assumed and cancellation was handled separately.

@jponge jponge changed the title fix!(Uni): align the Uni::eventually operators to onTermination() sem… fix!(Uni): align the Uni::eventually operators to onTermination() seamantics Nov 20, 2024
@jponge jponge changed the title fix!(Uni): align the Uni::eventually operators to onTermination() seamantics fix!(Uni): align the Uni::eventually operators to onTermination() semantics Nov 20, 2024
@jponge jponge force-pushed the fix/uni-eventually-and-termination branch from c447ab5 to 2199d13 Compare November 20, 2024 15:40
…antics

The Uni::eventually(Runnable) operator had been previously moved from onItemOrFailure() to
onTermination() semantics so as to handle cancellation on top of already handling items and
failures.

This aligns the `eventually(Supplier<Uni<T>>)` variant with its `eventually(Runnable)`
counterpart.

Fixes smallrye#1742.

BREAKING CHANGE: this may break code bases where onItemOrFailure() semantics were correctly
assumed and cancellation was handled separately.
@jponge jponge force-pushed the fix/uni-eventually-and-termination branch from 2199d13 to 54a161d Compare November 20, 2024 15:41
@jponge jponge changed the title fix!(Uni): align the Uni::eventually operators to onTermination() semantics Align the Uni::eventually operators to onTermination() semantics Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.50%. Comparing base (ba0cf7d) to head (54a161d).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1743      +/-   ##
============================================
+ Coverage     89.26%   89.50%   +0.24%     
- Complexity     3275     3288      +13     
============================================
  Files           458      458              
  Lines         13365    13365              
  Branches       1651     1651              
============================================
+ Hits          11930    11963      +33     
+ Misses          807      787      -20     
+ Partials        628      615      -13     
Files with missing lines Coverage Δ
...entation/src/main/java/io/smallrye/mutiny/Uni.java 90.90% <100.00%> (ø)

... and 13 files with indirect coverage changes

---- 🚨 Try these New Features:

@jponge jponge merged commit 3af8882 into smallrye:main Nov 20, 2024
8 checks passed
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.

Offer a variant of Uni::eventually(uni) that handles cancellation
2 participants