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

Initial configuration of revapi to detect API incompatibility. #356

Merged
merged 4 commits into from
Nov 22, 2020

Conversation

cescoffier
Copy link
Contributor

@cescoffier cescoffier commented Nov 20, 2020

Configure revapi.

Didn't work on the release tooling yet, but should not be hard.

@cescoffier cescoffier requested a review from jponge November 20, 2020 13:21
@cescoffier
Copy link
Contributor Author

@radcortez @kenfinnigan FYI - it can be useful for SmallRye in general

@cescoffier cescoffier added this to the 0.12.0 milestone Nov 20, 2020
@jponge
Copy link
Member

jponge commented Nov 20, 2020

I'll have a look later.

Meanwhile @cescoffier would you put your jbang script somewhere?

@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #356 (faab232) into master (28579bf) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #356      +/-   ##
============================================
+ Coverage     89.29%   89.37%   +0.08%     
- Complexity     2715     2720       +5     
============================================
  Files           361      361              
  Lines         10478    10489      +11     
  Branches       1302     1304       +2     
============================================
+ Hits           9356     9375      +19     
+ Misses          583      577       -6     
+ Partials        539      537       -2     
Impacted Files Coverage Δ Complexity Δ
...java/io/smallrye/mutiny/helpers/Subscriptions.java 79.55% <100.00%> (ø) 48.00 <0.00> (ø)
...mallrye/mutiny/operators/multi/MultiGroupByOp.java 82.81% <100.00%> (ø) 2.00 <0.00> (ø)
.../io/smallrye/mutiny/helpers/queues/DrainUtils.java 77.77% <0.00%> (-2.23%) 12.00% <0.00%> (ø%)
...tiny/operators/multi/MultiBufferWithTimeoutOp.java 70.33% <0.00%> (-1.70%) 3.00% <0.00%> (ø%)
...mallrye/mutiny/operators/multi/MultiFlatMapOp.java 86.64% <0.00%> (-0.32%) 3.00% <0.00%> (ø%)
...a/io/smallrye/mutiny/converters/multi/ToMaybe.java 100.00% <0.00%> (ø) 4.00% <0.00%> (ø%)
...rye/mutiny/operators/multi/MultiRepeatUntilOp.java 100.00% <0.00%> (ø) 5.00% <0.00%> (ø%)
...perators/multi/processors/SerializedProcessor.java 93.06% <0.00%> (ø) 26.00% <0.00%> (ø%)
...e/mutiny/streams/stages/FindFirstStageFactory.java 100.00% <0.00%> (ø) 5.00% <0.00%> (ø%)
... and 12 more

Copy link
Collaborator

@kenfinnigan kenfinnigan left a comment

Choose a reason for hiding this comment

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

Awesome, does this produce a report in the build output? Does it feed into a release note, maybe?

Copy link
Member

@jponge jponge left a comment

Choose a reason for hiding this comment

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

Definitely a great addition as long as maintenance does not become a nightmare ;-)

implementation/revapi.json Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@cescoffier
Copy link
Contributor Author

@kenfinnigan At the moment, it only generates reports as JSON and also fails the build if there is a non-justified breaking change.

From that, I will write a script that collects all the JSON files and build the list to add to the release notes (we already generate the release notes during the release process). At the same time, I will update the json file to "clear" the list of differences.

So, when we introduce a breaking change:

  • the build will fail
  • we update the difference list and give a justification
  • the build will then pass
  • during the release, the list of differences is extracted and appended to the release note with the justification (which could be a work around, for example, for long deprecated methods).
  • during the release the list of differences is cleared

BTW, to add a difference, you need to edit a json file, but the content is provided in the build log (Expect the justification, of course)

@cescoffier
Copy link
Contributor Author

cescoffier commented Nov 21, 2020

@kenfinnigan @jponge I just pushed the JBang script (located in .build):

It extracts the breaking changes and generates a markdown file which can be appended to the release notes (not done yet)

$ .build/CompatibilityUtils.java extract                                                                                                                 
🔎 Found revapi.json file: /Users/clement/Projects/microprofile/mutiny/implementation/revapi.json
🔎 Found revapi.json file: /Users/clement/Projects/microprofile/mutiny/rxjava/revapi.json
🔎 Found revapi.json file: /Users/clement/Projects/microprofile/mutiny/reactor/revapi.json
🧮 1 difference(s) found
💽 File /Users/clement/Projects/microprofile/mutiny/target/differences.md written

It can also clear the differences (after a release for example). It only touches files containing differences with justifications:

$  jbang .build/CompatibilityUtils.java clear  
🔎 Clearing differences from revapi.json file: /Users/clement/Projects/microprofile/mutiny/implementation/revapi.json
📁 Updating /Users/clement/Projects/microprofile/mutiny/implementation/revapi.json
🔎 Clearing differences from revapi.json file: /Users/clement/Projects/microprofile/mutiny/rxjava/revapi.json
🔎 Clearing differences from revapi.json file: /Users/clement/Projects/microprofile/mutiny/reactor/revapi.json

Next step is to run these commands during the release.

@cescoffier
Copy link
Contributor Author

Release script updated! All done!

@jponge
Copy link
Member

jponge commented Nov 21, 2020

This is great this way!

@cescoffier
Copy link
Contributor Author

cescoffier commented Nov 21, 2020

That's because of the emojis aka Philippe's touch ;-)

@jponge
Copy link
Member

jponge commented Nov 21, 2020

That's because of the emojis aka Philippe's touch ;-)

Emojis are life /cc @k33g

@cescoffier cescoffier merged commit 1059774 into master Nov 22, 2020
@cescoffier cescoffier deleted the introduce-revapi branch November 22, 2020 08:21
@jponge jponge modified the milestones: 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5 Dec 16, 2020
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.

3 participants