Require git >= 2.49 on managed machines#6868
Open
dannyroberts wants to merge 1 commit intomasterfrom
Open
Conversation
Pin a minimum git version on the install_git task so we can rely on recent git features without per-host version checks. Includes a changelog entry so environments can be brought up to the new minimum before any code starts depending on it. Discussed in #6865 (comment).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #6865 (comment). Rollout tracked in https://dimagi.atlassian.net/browse/SAAS-19703.
Environments Affected
All
Announce New Release
Summary
>=1:2.49.0) on theinstall_gittask so commcare-cloud can rely on recent git features without per-host probing.cchq <env> deploy-stack --tags=install_gitto bring all hosts up to the new minimum.This is the prerequisite I committed to in #6865 (comment) — once this is merged, announced, and rolled out (per our usual six-week window), we can switch the deploy-tag push in #6865 to the simpler
git clone --bare --filter=blob:none --depth=1 --revision={sha} ...form @millerdev originally proposed.Why
1:2.49.0and not2.49.0The
1:here is the "epoch", which in debian packaging, starts at / defaults to 0, and then can be changed to 1 (and then 2 and so on) as a hard-reset when versioning schemes change, in order to preserve ordering. For historical reasons, theppa:git-core/ppaPPA (already configured by the role) uses epoch 1, e.g.1:2.49.0-2~ppa1~ubuntu22.04.1. Without the explicit1:, dpkg would compare against epoch 0, which would make>=falsely match all versions starting with epoch1:(basically, all versions). (I think1:is used to match the default non-ppagit, which itself uses1:because thegitname used to refer to a completely different package, GNU Interactive Tools, and they had to reset version numbers which they decided to give that name to the eventually much more populargitversion control system it refers to today; but I kind of just pieced this together from scraps, so this is not the authoritative story.)Test plan
cchq staging deploy-stack --tags=install_gitcchq <staging> run-shell-command all 'git --version'reports2.49.xor later on every host