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 1.6.0 #1302

Merged
merged 1 commit into from
Sep 9, 2020
Merged

Release 1.6.0 #1302

merged 1 commit into from
Sep 9, 2020

Conversation

dmitrykuzmin
Copy link
Contributor

@dmitrykuzmin dmitrykuzmin commented Sep 8, 2020

This PR does the release of a core-java library version 1.6.0.

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

API changes

Client

  1. The ability to postAndForget() a command is added to the Client. 
This method should be called when the user does not care about events/rejections produced by a command.
    The previously used post() method is reserved for cases when one or more event types are actually observed by the client. The value returned by post() can no longer be ignored [Post and forget #1292].
  2. Event subscriptions are now more flexible, allowing to subscribe to events produced by non-entity objects (e.g. AbstractEventReactor) as well as events not explicitly declared in any BoundedContext [Propagate all events to subscriptions #1258].
  3. The Client is extended with methods to handle streaming and server errors when executing requests [Handle error acks #1270].

Server

  1. The custom environments support is introduced [Per-environment configuration for ServerEnvironment parts #1274, Improve custom environments support #1293].
    
The Environment now exposes API to register user-defined environment types and to determine which one is enabled at any given moment of time. 
See the release notes of base.
    The ServerEnvironment allows to configure environment-dependent values, as follows:

StorageFactory factory = InMemoryStorageFactory.newInstance();
	
ServerEnvironment.instance()
                 .use(factory, Tests.class);


The Spine framework provides two environments out of the box: Production and Tests.

  1. Breaking change: Most of the @Internal methods of BoundedContext moved to its internal class InternalAccess instance of which is available via the internalAccess() method.
    The method is available only to the server-side framework code.
  2. Delivery API is extended with a factory method which allows to create asynchronous version of local Delivery [Async message delivery and improvements for Subscriptions #1265].
  3. The Pair can now be created from an already existing Optional [Pair on Optional #1296].
  4. The proper support to the CommandBus filters which throw rejections is added [Improve support of rejections thrown from the CommandBus filters #1295].

Model

  1. The @External annotation is introduced to mark the handler method parameters of an external origin. 
It replaces the previously used for this purpose (external = true) attribute of @Subscribe, @React and @Command annotation.
The attribute is deprecated [@External annotation #1269].
  2. (set_once) constraint in entity states is no longer ignored [(set_once) in entities #1268].
  3. @ByField is deprecated in favour of @Where [Handle error acks #1270].

Logging

  1. The DiagnosticLog messages are made more detailed [Improve error messages #1262].
  2. The standard framework exceptions are expanded with more info [Make exceptions a bit more informative #1255].

Testing

Various quality-of-life changes are introduced for the testing API.

See #1249, #1251, #1252, and #1261 for details.

Some of the testing API changes are breaking. They include:

  1. BlackBoxBoundedContext is renamed to BlackBoxContext.
  2. Outdated Verify-based API is removed.
  3. BlackBoxContext no longer exposes eventBus() and commandBus().
  4. The subscribe(Topic) semantics changed. See Improvements for testing utilities (part 1) #1249.
  5. Simplified combinations of UserId and ZoneId parameters of BlackBoxContext.

Fixes

The Migration logic is fixed to properly support entity state updates [#1298].

Infrastructure

The project build scripts are migrated to Kotlin [#1278].

@dmitrykuzmin dmitrykuzmin self-assigned this Sep 8, 2020
@armiol
Copy link
Contributor

armiol commented Sep 9, 2020

@dmitrykuzmin please substitute the Note, that some of these API changes are breaking with the corresponding notes next to each of the breaking change.

@armiol
Copy link
Contributor

armiol commented Sep 9, 2020

@dmitrykuzmin other than that, LGTM.

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.

@dmitrykuzmin LGTM. But please take my comment into account when publishing the release notes.

@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #1302 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1302      +/-   ##
============================================
+ Coverage     91.04%   91.08%   +0.03%     
- Complexity     4743     4746       +3     
============================================
  Files           608      608              
  Lines         15091    15091              
  Branches        854      854              
============================================
+ Hits          13740    13746       +6     
+ Misses         1081     1079       -2     
+ Partials        270      266       -4     

@dmitrykuzmin dmitrykuzmin merged commit 995bdcf into master Sep 9, 2020
@dmitrykuzmin dmitrykuzmin deleted the release-1.6.0 branch September 9, 2020 17:32
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.

None yet

2 participants