- Package:
- git-debpush
- Source:
- git-debpush
- Submitter:
- Ian Jackson
- Date:
- 2025-08-10 21:51:03 UTC
- Severity:
- normal
While uploading src:dgit to expeerimental, I discovered that my git remote was misconfigured. So it made the tag, but then failed to push. This isn't a very nice failure mode, particularly because fixing the config and retrying doesn't work because the tag has already been made. I suggest: * After doing all the local checks, but before making the tag, run git fetch on the selected remote. (Not in --tag-only and --print-tag-text modes.) We should probably do a ref-limited fetch covering the tag we are proposing to make, and * Check that the local branch is ff from the remote. (If it isn't then someone has pushed to salsa in the mesntime. Probably, the user wants to know about this.) * If the remote branch is ff from the local one, do not attempt to push it. This can happen if the user overrode the previous check, an is deliberately tagging an older commit. It also happens if the remote and local branches are the same. Not pushing the branch in this case is good because it means that if the git-debpush user is racing with something on salsa, the push doesn't fail after making the tag. This might also help with a forge that prevents "git push" and only allows explicit MR merge operatiuons. Gitlab has that option, but empirically it doesn't object if the push you're making won't actually update the remote ref. * Provide options which can be used to retry a push, including a way to push only the tag. How about --retry-push and --no-branch (= `--branch=HEAD~0`). For testing, we may want to invent a new test case that just tests git-debpush corner cases but doesn't invoke the whole t2u machinery to process the actual tag. That would also help us in the future when we'll want to update the server-side machinery to new dependencies but still be able to test git-debpush on old releases. Ian.
Hello, This sounds good. prompt to retry the push. I think it should always attempt to push the branch and the tag. If the user wants to get into pushing individual items, they should just use 'git push' themselves. This avoids adding any new options. Yes, I've been thinking similarly.
Sean Whitton writes ("Bug#1107921: git-debpush fetch before making tag"):
In this case we should probably generate the tag text and compare it.
(Not checking the signature.) We probably wouldn't want to push
something different to the tag we would have made.
The user can already do that if they tag a detached HEAD, of course.
But your way of handling this is better.
Ian.
We talked about this some more on irc. AIUI we have decided: * The fetch should try to fetch the tag that would be made by git-debpush, from salsa; if it exists it should end up in the user's refs/tags/. * The fetch should try to fetch the previous DEP-14 maintainer tag (based on the changelog) but *not* into the user's refs/tags/. This will influence quilt mode selection - eg in case a co-maintainer has changed the quilt mode and our user hasn't pulled so doesn't have that tag. We'll save the successive fetches to refs/dgit/debpush-cache/debian/SUTIE or something, with reflog enabled, so that this private tag fetch is properly memoised. * The fetch will fetch the destination *branch* into the user's tracking remote. * The fetch will *not* attempt to fetch any archive/ tag(s). The reason we care about those is just the "accidentally uploading from dgit view" check; I think we can hope that in that scenario the user has the tag(s) as well as just the branch. * git-debpush --tag-only should operate solely offline so shouldn't do this fetch. * git-debpush --dry-run *will* do the fetch. I've thought about tag tag out-of-course situations: * Tag exists locally but *not* remotely (or we didn't fetch) and contains the same tag as we would generate. Diagnosis: tag push failed. Action: Unconditionally repush the existing tag rather than remaking it. (Doing this makes git-debpush idempotent. and avoids prompting the user for a safe action.) * Tag exists locally but *not* remotely (or we didn't fetch) and contains different tag to what we would generate. Diagnosis: for some reason (maybe previous git-debpush attempt, maybe ad-hoc git-tag, maybe sponsorship) user has a "wrong" DEP-14 tag that they might want to replace. Action: Check failed, `replace-tag`. * Tag exists remotely already: Diagnosis: this version has already been used for a release. Maybe the user is accidentally re-using a version number. Anyway we don't want to change a published tag. Unconditional failure. Recovery: if the problem was just that the tag was wrong somehow (eg wrong quilt mode) the user should bump the version number. When we're comparing the tag text, we consider the tag body, and everything in the git header apart for the date in the tagger line. We don't verify the signature, but a "same tag" must be one that looks signed.
I wrote: I decided to use just a single ref and rely on the user having a suitable reflog and object expiry policy. My implementation does *not* do this. Mostly because figuring out what that would be like would involve parsing refspecs and reimplementing complex git logic. Instead, my implementation prints the remote's URL in some of the error messages in the hope that this is helpful. ... I have not yet implemented this part. I *have* implemented this part. Ian.
I wrote: The message I added in !231 is Tag $debian_tag already exists at $fetch_url. This version seems already to have been released.
Hello, Yes, though only if it had the exact same text. These all look good to me. Unconditional failure seems right because we know the push will fail, so no point in making a tag. If the user *really* wanted to override they could use -t.
We believe that the bug you reported is fixed in the latest version of
dgit, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1107921@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ian Jackson <ijackson@chiark.greenend.org.uk> (supplier of updated dgit package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 18 Jul 2025 17:36:28 +0100
Source: dgit
Architecture: source
Version: 13.8
Distribution: experimental
Urgency: medium
Maintainer: Debian tag2upload Delegates <dgit-owner@debian.org>
Changed-By: Ian Jackson <ijackson@chiark.greenend.org.uk>
Closes: 1107921
Changes:
dgit (13.8) experimental; urgency=medium
.
git-debpush user experience improvements:
* Check for and handle an existing tag for this version.
* Try to check our branch against the remote target branch,
to detect releasing from behind mainline, and avoid push failures.
* Closes: #1107921.
.
Internal changes:
* dgit: Provide abbreviated --t2u-* options, to support log improvements.
* git-debpush: Improve comment about remote branch. [Sean Whitton]
* git-debpush: Coding style cleanups.
* dir-locals.el: Set fill-column to 78 for all languages.
Checksums-Sha1:
3672dc205062cb50b0f913fd5b057e700a84882c 2106 dgit_13.8.dsc
6137fbcfd33600f00b312b8ec396eaf7cff12bc6 769138 dgit_13.8.tar.gz
Checksums-Sha256:
c74fedb0a39a0fc8688d311e87e326e5fcce48e7c0862db7c5ceccd704d90609 2106 dgit_13.8.dsc
7d011fec3abbf2974be3002efae58e6e3380c600023fcbe472bcac04aeaf3318 769138 dgit_13.8.tar.gz
Files:
adf490cf09943cdb3a2805b866023457 2106 devel optional dgit_13.8.dsc
9a820fc3cfe9bc9567f5de76be077b93 769138 devel optional dgit_13.8.tar.gz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEVZrkbC1rbTJl58uh4+M5I0i1DTkFAmh6gTMACgkQ4+M5I0i1
DTm4QwgAn4wvljEGkjWSCa+WjTuXknBGq6+vpJhJNijEYFfAIrf0HXIP1uczorv/
fUWWWNGHu7MXx8JHpE+oGjDU5ei5Y0BXyzz4TIORFof4ACE+ArbKxnrq1bJLYjsI
rXb5UhppmEodR4D6uNSk5ifJSqZ4y5RMZnXzJQc+2hzNlOuw/qq4mfg/IWrB/2+U
3aehpaN3Bw/tqzfN6JWROZpH6u1zkYd24W407z3I7RvwiuahLtyUutiFNZBVSQcN
Vtsq1hmnJzGMLkxkO0O59Q7YEg1UOZIa5tYnBXchnXztD3eAzFvIwodWB5MQ4cx0
9sUU45OIY8bFpIHBeeSI0qXihF3CLA==
=BmMy
-----END PGP SIGNATURE-----
We believe that the bug you reported is fixed in the latest version of
dgit, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1107921@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ian Jackson <ijackson@chiark.greenend.org.uk> (supplier of updated dgit package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 10 Aug 2025 20:18:45 +0100
Source: dgit
Architecture: source
Version: 13.11
Distribution: unstable
Urgency: medium
Maintainer: Debian tag2upload Delegates <dgit-owner@debian.org>
Changed-By: Ian Jackson <ijackson@chiark.greenend.org.uk>
Closes: 1107151 1107921 1108088 1108242 1108378 1108613 1108658 1109130 1109473 1110339 1110402
Changes:
dgit (13.11) unstable; urgency=medium
.
* No change upload, targeting mainline to unstable.
.
dgit (13.11+exp1) experimental; urgency=medium
.
git-debpush UX improvements:
* Always print a message before fetching from salsa.
Closes: #1110402. [Sean Whitton]
* Detect debian/source/local-options, as a failed check.
This avoids later failures. Closes: #1110339. [Sean Whitton]
* Detect redundant --quilt mode option, as a failed check.
Helps useers avoid dangerous habits. Closes: #1108378. [Sean Whitton]
* Detect possible intent to use pristine-tar even if pristine-tar
is not installed. [Andrea Pappacoda]
.
tag2upload service:
* If origs cannot be obtained from the archive (eg due to mirror delays),
try to regenerate them. Closes: #1109130. (Deployment TBC.)
.
Documentation:
* Workflow manpages: Replace bookworm with trixie. [Sean Whitton]
* Workflow manpages: Suggest sbuild -d, not sbuild -c. [Sean Whitton]
* tag2upload(5): Specify ! for service-critical extensions.
.
Minor bugfixes:
* git-debpush: Avoid ignoring a failure of git-cat-file. [Sean Whitton]
* Add missing newline to overridden --force fail message.
.
dgit download-unfetched-origs subcommand (changes to support tag2upload):
* Look in the source tree's current suite, specifically.
* New --write-sha256sums subcommand option.
* Don't download files already present in the build-products-dir.
* Save downloaded files to .tmp names until file checksums verified.
* Report unobtainable origs with special exit status 3.
.
Supporting and internal changes:
* Cleanups and defensiveness in tag2upload-oracled. [Sean Whitton]
* Code cleanups, and refactoring, in git-debpush. [Sean Whitton]
* Much logic moved from tag2upload-obtain-origs into dgit.
.
Tests:
* Refactoring and additions for testing the new functionality.
* restore checking of error messages in tag2upload emails.
* t2u-integration: Include the event_name field in webhook.
(Compatibility with tag2upload-service-manager changes.)
.
dgit (13.10) experimental; urgency=medium
.
git-debpush user experience improvements:
* Print some status messages while processing.
* Better error messages when git-deborig tag search fails.
* New --help, -h options. Closes: #1109473.
.
tag2upload infrastructure:
* Switch to using new tag2upload-obtain-origs script.
Closes: #1108658. [Ian Jackson]
* tag2upload Manager protocol: Introduce some protocol state names.
[Ian Jackson]
* tag2upload-oracled: Speak Manager protocol version 5.
* tag2upload-builder-rebuild: Request restarting workers.
.
git-debpush miscellaneous:
* Expand and update statement of design principles.
* Delete a completed TODO.
.
dgit (13.9) experimental; urgency=medium
.
tag2upload infrastructure:
* Improve and shorten command lines appearing in report emails.
* Check upstream tag/commit correspondence even when using existing origs.
* Minor performance improvement for native packages (skip pre-fetch).
.
Internal changes:
* Testing improvements for tag2upload.
* changelog: Start 13.9
* Introduce new tag2upload-obtain-origs script.
.
dgit (13.8) experimental; urgency=medium
.
git-debpush user experience improvements:
* Check for and handle an existing tag for this version.
* Try to check our branch against the remote target branch,
to detect releasing from behind mainline, and avoid push failures.
Closes: #1107921.
.
Internal changes:
* dgit: Provide abbreviated --t2u-* options, to support log improvements.
* git-debpush: Improve comment about remote branch. [Sean Whitton]
* git-debpush: Coding style cleanups.
* dir-locals.el: Set fill-column to 78 for all languages.
.
dgit (13.7) experimental; urgency=medium
.
* Demo upload for talk.
.
dgit (13.6) experimental; urgency=medium
.
* Demo upload for talk rehearsal.
.
dgit (13.5) experimental; urgency=medium
.
git-debpush user experience improvements:
* Check for tag already existing at the remote. Part of #1107921.
* Improve error message for tag already existing locally.
* Check for uncommitted changes in working tree.
Closes: #1108088. [Sean Whitton]
.
tag2upload service:
* Properly RFC2047-escape non-ASCII names. Closes: #1108613.
* Hide virt runes in a per-invocation ssh wrapper Closes: #1107151.
* Print oracle and builder dgit versions in transcript. Closes: #1108242.
* d-r-s t2u: Add missing -oBatchMode=yes option to ssh invocation.
.
CI and administrivia:
* CI: Check for missing Signed-off-by.
* git-debpush: Add missing copyright notice. [Sean Whitton]
* Add missing Closes for #1108180 to changelog entry for 12.125.
* CI: Drop compatibility tests for buster, which is gone from the archive.
.
Suppporting changes:
* git-debpush: Figure out the previous maintainer upload version.
* dgit: Honour DGIT_VERSION in dgit --version and use it in ./using-these.
* git-debpush: Reorganisation and tidying. [Ian Jackson and Sean Whitton]
.
dgit (13.4) experimental; urgency=medium
.
Documentation:
* t2u o2m: Describe version 5, with 'restart' message. [Sean Whitton]
* t2u FAQ: Clarify that debian/-only repos still need
upstream source in git. [Christoph Berg]
* t2u FAQ: Remove much obsolete material.
.
Tests:
* t2u: Test "tag changed between fetches" path.
* CI: Check for blocking todos (three or more X's).
.
Internals:
* Avoid blocking-todo markers in a few places in docs and comments.
* dgit-repos-server: Fix a comment about indistrodir.
* tests: debpolicy-taintrm: Downgrade a TODO.
Checksums-Sha1:
9193e59edd3b0c18c8347e09d776d313b66a0eb0 2111 dgit_13.11.dsc
7f99505fd4f2ce48b05d2c284027558ee183d56b 775411 dgit_13.11.tar.gz
Checksums-Sha256:
4824f3e9a499a6c7e0699c6f7792f16b0d1105a86bac64644a70b73cf0cacf00 2111 dgit_13.11.dsc
a1fca8a024897385e6238b0ceef172d4754493071d51ac0def18b17b4ab68bb6 775411 dgit_13.11.tar.gz
Files:
7966448f18a47e620270ba6888e153d6 2111 devel optional dgit_13.11.dsc
51e56d2f6a4773ce3cc47156c6e9c0bc 775411 devel optional dgit_13.11.tar.gz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEVZrkbC1rbTJl58uh4+M5I0i1DTkFAmiZDtYACgkQ4+M5I0i1
DTmhdQf/VUwTc+1xg3POYk6Nn7ai83HGt+Gc36FCeQLp8qjNgQ3lCtS2pcsVBcmE
VS9/Feh6q5o9jpbMob/TBKaH6VdyNs0koEEi2VDC9ELi7KVZkPgQlsiq31IAMN6B
00gQ9ZJzs0A5Gfy0dAFUXBNE8EGHufhq3Ee87aFmvgLSipo8r6I+GJC1u+5cBoSr
TV7SsBAwyNjy+nIYbg3rCU2cYjI8vSGNySrwnXTyKrJ8HnCY9nC+DGSBrgWWvqg3
Sj58Ny3MIqkoH6d/bapwpawcdK5kowv3ToDvUhSH1Ix4nQCCpvTRcdOlp2EnHVrZ
3OVU4lUcKy3AKooeP1QU8uaAd1RYGw==
=du5z
-----END PGP SIGNATURE-----