Bug 551197 - [patch] Report error on unnecessary version increment
Summary: [patch] Report error on unnecessary version increment
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 551996 552775
  Show dependency tree
 
Reported: 2019-09-18 08:53 EDT by Andrey Loskutov CLA
Modified: 2019-11-07 02:46 EST (History)
4 users (show)

See Also:


Attachments
Proposed changes (96.48 KB, image/jpeg)
2019-11-04 11:40 EST, Vikas Chandra CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2019-09-18 08:53:19 EDT
API tooling should report unnecessary version increment for bundles, where version was already incremented.

See https://git.eclipse.org/r/#/c/145561/13/org.eclipse.jface.text/META-INF/MANIFEST.MF@5

The minor version segment was bumped for bug 547683, and after that service segment increment was not needed in the change above.
Comment 1 Eclipse Genie CLA 2019-09-20 07:30:03 EDT
New Gerrit change created: https://git.eclipse.org/r/149908
Comment 2 Carsten Hammer CLA 2019-09-20 07:51:45 EDT
Would at be possible to get rid of manual update of the version increment completely by implementing a gerrit plugin that does this for you whenever it is necessary? There are plugins for checking commit message length and other tasks - I am not sure if the relevant base version to be compared to can be computed at all of if it is just something only the developer knows.
see https://gerrit.googlesource.com/plugins/
Or is the eclipse gerrit installation something that should not be touched?
Comment 3 Mickael Istria CLA 2019-11-03 05:02:00 EST
(In reply to Carsten Hammer from comment #2)
> Would at be possible to get rid of manual update of the version increment
> completely by implementing a gerrit plugin that does this for you whenever
> it is necessary?

Not really. Versioning isn't something that can safely be automated. It's better to report failure and let developer discuss remediation than trying to implement a bot that would automatically change things, at the risk of being faulty.
See, it's already hard to automate good checks and this still has bugs or limitation despite being very mature; so imagine how harder and less safe it would be to automate the change here.

> Or is the eclipse gerrit installation something that should not be touched?

It's also another point: we don't really want to put too much logic in Gerrit. We need checks and smartness to be reproducible locally, on other Git repos, on other CIs... So smartness is better being placed in the build tool (Maven) for more portability and reusability.
Comment 4 Vikas Chandra CLA 2019-11-04 11:40:42 EST
Created attachment 280503 [details]
Proposed changes

The image is self explanatory
Comment 5 Vikas Chandra CLA 2019-11-04 11:49:00 EST
Andrey, can you please look at comment#4 ( or you can try out https://git.eclipse.org/r/149908)
Comment 7 Vikas Chandra CLA 2019-11-06 10:16:43 EST
This can be tried out on 6th Nov 6pm build. I will also look out for new versioning issues on the build page ( if any)
Comment 8 Vikas Chandra CLA 2019-11-07 01:51:50 EST
I tested on
Version: 2019-12 (4.14)
Build id: I20191106-1805


Seem to work as expected !

Pending item: N&N item and documentation update !

I will do those before marking this as verified
Comment 9 Mickael Istria CLA 2019-11-07 02:27:16 EST
Thanks Vikas, that's a great addition!
Comment 10 Lars Vogel CLA 2019-11-07 02:35:52 EST
Today my builds are verifying plugin.xml very long. Maybe related to this change?Please check Bug 552775.
Comment 11 Vikas Chandra CLA 2019-11-07 02:46:02 EST
(In reply to Lars Vogel from comment #10)
> Today my builds are verifying plugin.xml very long. Maybe related to this
> change?Please check Bug 552775.

Unlikely since "verifying *" uses PDE compiler builder and in this bug only API tool changes were done and will affect *API*Builders* only.

I will investigate anyway !