[MONGOCRYPT-456] Assess feasibility of migrating from GetVersion.cmake to calc_release_version.py Created: 07/Jul/22 Updated: 28/Oct/23 Resolved: 25/Aug/22 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.6.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Roberto Sanchez | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The way which the libmongocrypt build currently calculates versions is with a special purpose program which was implemented for the project, GetVersion.cmake. When the program was implemented the project had a linear development history and releases were made directly from the master branch. Today, releases are made from release branches (e.g., r1.3, r1.4, r1.5), following a pattern essentially identical to the C driver. This has resulted in some latent issues (i.e., The task of calculating build versions is handled by the program calc_release_version.py in the C driver and C++ driver builds. That program should be assessed for suitability of use in the libmongocrypt project. If it is found to be suitable to the needs of the project, it should be incorporated to replace GetVersion.cmake and the release process adjusted to best take advantage of the capabilities of calc_release_version.py. |
| Comments |
| Comment by Githook User [ 25/Aug/22 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}Message: Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com> |
| Comment by Kevin Albertson [ 09/Aug/22 ] |
|
Proceeding SGTM. |
| Comment by Roberto Sanchez [ 09/Aug/22 ] |
|
kevin.albertson@mongodb.com after evaluating calc_release_version.py and comparing its output with the output of GetVersion.cmake, it appears that calc_release_version.py can completely replace GetVersion.cmake. The benefits are that the version calculation is more robust, does not suffer from the quirks that we've encountered with GetVersion.cmake, and does not require the invocation to specify a reference branch. Additionally, the branch structure and release process of libmongocrypt are essentially identical to those of the C driver, so the maintenance of calc_release_version.py for libmongocrypt should not require any additional effort above keeping the script in sync between the two projects. The only drawback that I can see is that making the switch would introduce a dependency on python/python3. This seems like a worthwhile trade-off for the increased robustness and increased uniformity among our projects. I intend to move ahead with the replacement of GetVersion.cmake with calc_release_version.py. Please let me know if I should hold off, or if you can think of anything that I might have missed. |