Closed Bug 1792224 Opened 3 years ago Closed 3 years ago

Support vendoring individual files from an upstream repository

Categories

(Developer Infrastructure :: Mach Vendor & Updatebot, enhancement)

x86_64
Linux
enhancement

Tracking

(firefox108 fixed)

RESOLVED FIXED
Tracking Status
firefox108 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

Details

Attachments

(8 files)

Sometimes we don't want to clone an entire upstream repo just to get 5 files from it.

This is a leaky abstraction. We already have include and exclude that would allow us to accomplish this. It's just that cloning llvm or netbsd just to get 5 files is inefficient. Related, we have this kind of complicated code that's designed to detect spurious updates - which is when we update from upstream but nothing changes, because the upstream changes were e.g. in files we excluded.

We could get rid of the spurious update code if we expressed everything in terms of 'individual-files' - that is, only the files in tree get checked for updates, and if there is none then there is no update. But if we have a hundred files in-tree that isn't efficient either.

Ultimately, it seems like this is probably the best trade-off...

Blocks: 1792248

If there is a vendoring section missing in the moz.yaml,
we will error out. Detect this right away and give a better error.

Perform some cleanup since we know we have a vendoring section.

Depends on D158045

I noticed that 'branch' is only used in Updatebot in the
Commit Alert task (we made it for Angle.) It doesn't do
anything anywhere else. So assert this in the validation checks

Depends on D158046

Attachment #9296016 - Attachment description: Bug 1792224: Do some refactoring in preparation for real work r?jewilde → Bug 1792224: Refactor moz.yaml vendoring process r?jewilde
Attachment #9296016 - Attachment description: Bug 1792224: Refactor moz.yaml vendoring process r?jewilde → Bug 1792224: Do some refactoring in preparation for real work r?jewilde
Pushed by tritter@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9b8631a5eaf Add support for individual-files in the moz.yaml r=jewilde https://hg.mozilla.org/integration/autoland/rev/87392c6e2c7b Add tests for individual-files yaml parsing r=jewilde https://hg.mozilla.org/integration/autoland/rev/36b217d098a4 Do some refactoring in preparation for real work r=jewilde https://hg.mozilla.org/integration/autoland/rev/2bcdcab75a23 Do not allow branch in vendoring tasks r=jewilde https://hg.mozilla.org/integration/autoland/rev/e1a8a5c347f8 Move the Updatebot section below vendoring to make it more logical r=jewilde https://hg.mozilla.org/integration/autoland/rev/14af6d382874 Make the tracking field validation simpler r=jewilde https://hg.mozilla.org/integration/autoland/rev/d7884101b2c9 Do not allow tag tracking with individual-files r=jewilde https://hg.mozilla.org/integration/autoland/rev/c3943b948dc9 Implement vendoring individual files r=jewilde
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: