[CDRIVER-3573] Do not hardcode VERSION_CURRENT in patch builds or old branches Created: 16/Mar/20  Updated: 28/Oct/23  Resolved: 13/Feb/22

Status: Closed
Project: C Driver
Component/s: tests
Affects Version/s: None
Fix Version/s: 1.22.0, 1.22.0-beta0

Type: Task Priority: Trivial - P5
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

calc_release_version.py reports the wrong version if on a non-release non-master branch. This was the cause of abi-compliance-check always failing on patches from GitHub PRs (because they were running from non-master branches).

Additionally, calc_release_version.py run from a release non-master branch, uses the --merged option in git, which requires a newer version of git than we have on all variants. Example of a failing task on the r1.17 evergreen project.

As a temporary workaround, I've hardcoded VERSION_CURRENT in the evergreen config.



 Comments   
Comment by Githook User [ 13/Feb/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 remove hard-coded versions from test scripts (#941)

Add --next-minor option to calc_release_version.py

This allows build scripts to calculate the next minor release.

In Evergreen, git will be in a detached HEAD state. Not on a branch.

Co-authored-by: Roberto C. Sánchez <roberto@connexer.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/28c2ca827d318cb3ff3c832982e65b39408707c2

Comment by Githook User [ 15/Sep/20 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-3573 only hardcode version for GitHub PRs and patch builds
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0ff7c37125496710c870a4b445d6d5286da60e71

Comment by Githook User [ 24/Jul/20 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-3573 only hardcode version for GitHub PRs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/164e8716771c15f7817df514e423dea662d53648

Comment by Roberto Sanchez [ 24/Jul/20 ]

After discussing this kevin.albertson and I have concluded that this hard coding is only required for GitHub PRs. Since Evergreen has an expansion that specifically identifies GitHub PRs (${github_pr_number}) that should be the basis for hard coding the version. Since the reason this is necessary results from the calc_release_version.py script not correctly handling branches of the master branch that are not release branches (i.e., rX.Y form), a future improvement would be to update calc_release_version.py to have an option that treats the current branch the same as the master branch for reasons of computing the version. Once that change is made, the hard coding in config.yml can be updated to communicate that option to calc_release_version.py instead of actually hard coding the version.

Comment by Githook User [ 11/Jul/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 fix hardcode
Branch: r1.17
https://github.com/mongodb/mongo-c-driver/commit/90a7ac432f4e9a8d2fbb4b55d07a739d2f6394be

Comment by Githook User [ 02/Jul/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 fix hardcode
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/16cf75da76264a28353652171a76c154cee0dc3a

Comment by Githook User [ 09/Jun/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 do not hardcode version
Branch: r1.17
https://github.com/mongodb/mongo-c-driver/commit/f4724daf1fa6e4df3c4537c9e2b4ab2b6b56ecb3

Comment by Githook User [ 09/Jun/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 do not hardcode version
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/529a2be72907aeb6823e9ebbf830f9dbe7baa91c

Comment by Githook User [ 25/May/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 hard code version on patches

Not all evergreen variants have a new enough version of git to run calc_release_version.py on a non-master branch. This fixes patch builds made through GitHub PRs
Branch: r1.17
https://github.com/mongodb/mongo-c-driver/commit/790b89cb8a74fce34d9fd025eb87641153f698c0

Comment by Githook User [ 07/May/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 hard code version on patches

Not all evergreen variants have a new enough version of git to run calc_release_version.py on a non-master branch. This fixes patch builds made through GitHub PRs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d54d03c300bfb8c0f181b1eb5c161298cfde299b

Comment by Githook User [ 17/Mar/20 ]

Author:

{'email': 'kevin.albertson@mongodb.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}

Message: CDRIVER-3573 hardcode version for abi check
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/08458e5308567c38a51994ae19bb79573dcd7243

Generated at Wed Feb 07 21:18:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.