General mechanism to supply "rich history" to git-ubuntu
Christian Ehrhardt
christian.ehrhardt at canonical.com
Wed Feb 3 07:54:30 UTC 2021
On Tue, Feb 2, 2021 at 4:56 PM Robie Basak <robie.basak at ubuntu.com> wrote:
>
> On Tue, Feb 02, 2021 at 10:48:07AM -0500, Scott Moser wrote:
> > I think this is great. I think it is a game-changer for ubuntu development.
> > Thank you.
>
> Thanks!
I have discussed this with you before and also like it very much -
thanks for all your work on this!
> > In your example above, the 'refs/heads/test' has to exist (and to have the
> > referenced commit) in order for the importer to find it.
> >
> > So the uploader would then have to not delete or force-push that reference
> > until some point in the future, right?
> >
> > My only concern here is that I already have way too many branches
> > that I've pushed. This will just leave more manual maintenance for me
> > to not clean up these branches until the upload that references
> > them is landed.
> >
> > Did I undestand that correctly?
>
> Correct. At the time the importer runs, it needs to be able to fetch a
> ref from somewhere. If you push to a personal branch and use that ref,
> then it'll need to exist until git-ubuntu has caught up with your
> upload. Right now the time varies, is commonly an hour or two, but
> sometimes has been a week. Over time, I hope for us to get more reliable
> with it (this requires infrastructure, monitoring, etc).
>
> I'm not really sure how to avoid this requirement.
>
> Another approach you could take is to maintain a team repository and
> branch somewhere. Then all your uploads could be "from" a single main
> branch, which would then persist by its nature.
The following just came to my mind, I haven't thought it through for hours,
so I'm sharing it with some disclaimer attached :-)
I think there is a chance if someone has a "next" or "for-upload" branch that
it might be recycled and no longer match on import. But IMHO we
could synthesize a branch name in the wrapper and push to that one.
Example:
1. user works on his branch called "cool-new-feature" (that would change)
2. user decides to upload, and calls the wrapper
3. the wrapper synthesizes a new branch name like
<git-ubuntu-upload>-<branch-name>-<$date/time> =>
git-ubuntu-upload-cool-new-feature-03012021085107
and push this one.
4. the synthesized name is referenced in the tags and used by the importer
It is unlikely (unless intentional) that this branch is force pushed
before the import happens.
But it has the downside of a potential proliferation of pushed
branches, but TBH providing
a "remove all merged branches" command should not be too hard.
If we spin this forward (And ACS for it work out) we could push it to
a special namespace
in the actual per package git ubuntu repositories. And maybe add some UUID to
the synthesized branch name (for multi-user de-collision).
The ACS would need to allow that no "normal" user can force push, but
nearly everyone (with
a LP user) can push their branches. In that repository, the importer
could do auto-remove-after-import
and proliferation would not happen in the users repository anymore.
> I guess you could sort of do that with a personal repository, too, if
> you wanted. Maintain a "for-upload" branch, always push there, and then
> forget about it until you reuse it next time.
> --
> ubuntu-devel mailing list
> ubuntu-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
More information about the ubuntu-devel
mailing list