[RELENG-137] Builds should fail early with snapshot mismatches Created: 27/Nov/18 Updated: 04/Aug/20 |
|
| Status: | Open |
| Project: | releng |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Medium |
| Reporter: | Stephen Kitt | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In a given release, all snapshot dependencies should have the same patch level: .0-SNAPSHOT when we’re leading up to GA, .1-SNAPSHOT leading up to SR1, etc. We could easily check builds for this and fail them early — this would catch mis-matches in patches (which catch a lot of developers out), and help reduce the risk of merging patches with obsolete versions after a release bump. |
| Comments |
| Comment by Thanh Ha (zxiiro) [ 27/Nov/18 ] |
|
skitt which jobs are you thinking of adding this to? autorelease-release-* and *-validate-autorelease-* jobs achieve this today by running "mvn clean validate" as an initial build step. |
| Comment by Stephen Kitt [ 27/Nov/18 ] |
|
I’m not sure yet. This does more than “mvn validate”: it doesn’t only check that all the dependency information is present and correct, it would check that it’s consistent. See for example https://git.opendaylight.org/gerrit/#/c/77569/8/features/production/odl-neutron-northbound-api/pom.xml — this references aaa-artifacts:0.8.2-SNAPSHOT (which is correct for Fluorine leading up to SR2) and restconf-artifacts:1.8.1-SNAPSHOT (which isn’t). |
| Comment by Stephen Kitt [ 27/Nov/18 ] |
|
Oh wait, I realise the build isolation in autorelease jobs would check this via “validate”, indirectly... |
| Comment by Stephen Kitt [ 27/Nov/18 ] |
|
Except it doesn’t, because of the release bumping. |
| Comment by Thanh Ha (zxiiro) [ 27/Nov/18 ] |
|
That's right. validate-autorelease does validate that all artifacts are reachable due to the nature of the job itself. However the downside is it doesn't work during version bumping (well it does work just we are expecting it to fail). |
| Comment by Stephen Kitt [ 27/Nov/18 ] |
|
What I meant by release bumping here was the fact that the autorelease jobs drop "-SNAPSHOT". Thus if a project still references a previous release as a snapshot, it pulls in the previously-released artifacts instead, and the autorelease job validates just fine. See https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/neutron-validate-autorelease-fluorine/69/ which should have failed (because the patch pulls in the SR1 restconf instead of the SR2 restconf). |
| Comment by Thanh Ha (zxiiro) [ 27/Nov/18 ] |
|
Oh right. Yes that is definitely a problem we should try to address. |