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

Release v1.7.0 #1344

Merged
merged 5 commits into from
Dec 14, 2020
Merged

Release v1.7.0 #1344

merged 5 commits into from
Dec 14, 2020

Conversation

yuri-sergiichuk
Copy link
Contributor

@yuri-sergiichuk yuri-sergiichuk commented Dec 14, 2020

This PR does the release of the library version 1.7.0.

This release brings numerous API improvements, as well as fixes and infrastructure updates to the framework.

As part of the PR, I have also updated the copyright disclaimer as per the SpineEventEngine/config#155.

Breaking Changes

  1. The BlackBoxContext-based tests now fail if a runtime exception was thrown within the signal handlers.

    In order to address Fail tests if runtime exceptions are thrown in BBC #1314, we've decided to enforce the fail-fast approach within the BBC tests done in Fail tests on runtime exceptions #1322. From now on, if a test case had any runtime exceptions thrown from signal handlers the test is failed by the BBC. While it may be a breaking change for some, we believe it worth fixing such issues right away than hiding them under the carpet.

    If one requires to fall back to the previous behavior, the BBC instance can be configured using the newly introduced tolerateFailures method.

  2. The grand_origin field is no longer set to a default instance for the signal Origin if no grand origin is present (see Remove empty grand_origin #1341 for details).

  3. The ServerEnvironment API is improved and changed as a result of the API improvements for ServerEnvironment #1315 and related discussions in a series of PRs (Improve ServerEnviornment configuration #1327, More improvements to ServerEnvironment configuration #1331, ServerEnvironment improvements #1336).

    The previously deprecated configure...() API is removed in favor of the new fluent when().use() API.

    So now, instead of smth like this:

    ServerEnvironment.use(productionStorageFactory, Production.class)
                     .use(testingStorageFactory, Tests.class)
                     .use(memoizingTracerFactory, Production.class)

    One should use the following snippet:

    ServerEnvironment.when(Production.class)
                     .use(productionStorageFactory)
                     .use(memoizingTracerFactory);
    ServerEnvironment.when(Tests.class)
                     .use(testingStorageFactory);

API Changes

  1. Change type validation requirements are relaxed for primitive type changes.

    The new_value field is no longer a required one for StringChange and BytesChange types. See Relax changes #1307 for details.

  2. Introduced simplified unicast() methods in the EventRouting.

    The new unicast() API allows simplifying and prettifying the even routing for the cases where a singular ID is used.

    Now, instead of smth like this:

     @OverridingMethodsMustInvokeSuper
     @Override
     protected void setupEventRouting(EventRouting<AirportId> routing) {
         super.setupEventRouting(routing);
         routing.route(FlightScheduled.class, (e, ctx)-> EventRoute.withId(e.getAirport()));
     }

    One can use the following API:

     @OverridingMethodsMustInvokeSuper
     @Override
     protected void setupEventRouting(EventRouting<AirportId> routing) {
         super.setupEventRouting(routing);
         routing.unicast(FlightScheduled.class, FlightScheduled::getAirport)
     }

    To find out more details on the new API please check Simplify unicast event routing #1317.

  3. Added localDate and localDateTime helpers to the WithTime interface.

    This feature allows accessing localDate and localDateTime methods from within all the signals. From now on, if one requires a Java LocalDate or LocalDateTime instances over the Protobuf Timestamp or Java Instant that were previously available for signals, they may use the new API to simplify such a conversion and access to the signals timestamp field.

    See Improve MethodSignature and WithTime #1319 for additional details.

Fixes

  1. Improved multitenant delivery support by ensuring the tenant is properly propagated within the delivery (see Improve multitenancy support #1308).

  2. Fixed a typo in the io.spine.client.Client shutdownTimeout method (see Fix a typo #1339).

  3. Fixed dispatching of rejections caused by a particular command (see @Subscribe-r of the rejection caused by a particular command causes the dispatching failure in some cases #1318 and Improve signals dispatching #1343).

Infrastructure

  1. The libraries now do not use implementation for compile-only annotations like errorprone annotations but use the newly introduced compileOnlyApi configuration for such dependencies (see Improve dependencies management #1340).

@yuri-sergiichuk yuri-sergiichuk self-assigned this Dec 14, 2020
@yuri-sergiichuk yuri-sergiichuk requested a review from a team December 14, 2020 15:27
@armiol
Copy link
Contributor

armiol commented Dec 14, 2020

@yuri-sergiichuk There is a typo here:

... if not grand origin

Should be no grand origin.

@armiol
Copy link
Contributor

armiol commented Dec 14, 2020

@yuri-sergiichuk Can we please change

We should use the following snippet:

to

One should use the following snippet:

This is going to be more inline with how we tell about things throughout this text.

@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #1344 (969534a) into master (e60650d) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1344      +/-   ##
============================================
- Coverage     91.02%   90.98%   -0.04%     
  Complexity     4764     4764              
============================================
  Files           614      614              
  Lines         15135    15135              
  Branches        858      858              
============================================
- Hits          13776    13771       -5     
- Misses         1086     1090       +4     
- Partials        273      274       +1     

@armiol
Copy link
Contributor

armiol commented Dec 14, 2020

@yuri-sergiichuk I also think you may easily drop all "PR"s when referencing a pull request. Just "see #4211" works fine, with less letters to read :)

@armiol
Copy link
Contributor

armiol commented Dec 14, 2020

@yuri-sergiichuk There is a typo here:

routing..route(FlightScheduled.class, (e, ctx)-> EventRoute.withId(e.getAirport()));

Let's remove the range operator .. in favour of calling a method (.).

Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuri-sergiichuk LGTM except for my comments to the PR description.

Please see them posted.

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.

2 participants