Closed Bug 1410969 Opened 7 years ago Closed 7 years ago

Generate an artifact listing per-file bug component info

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(6 files)

We have in-repo file metadata, such as the bug component for a file.

Let's have TaskCluster run a command to generate and upload an artifact so this metadata can be consumed via a bulk and static import of said file.
Comment on attachment 8921175 [details]
Bug 1410969 - Properly import AutoTry;

https://reviewboard.mozilla.org/r/192154/#review197632

Oops, thanks for fixing this. We'll have to add some python/cram tests for |mach test| at some point.
Attachment #8921175 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921176 [details]
Bug 1410969 - Return dict from find_paths_and_tags();

https://reviewboard.mozilla.org/r/192156/#review197636
Attachment #8921176 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921177 [details]
Bug 1410969 - Consolidate code for resolving path metadata;

https://reviewboard.mozilla.org/r/192158/#review197640

::: commit-message-3dc84:3
(Diff revision 2)
> +Bug 1410969 - Consolidate code for resolving path metadata; r?ahal
> +
> +find_paths_and_tags() can instantiate a BuildReader to reader moz.build

nit: read moz.build

::: tools/tryselect/selectors/syntax.py:462
(Diff revision 2)
> -    def find_paths_and_tags(self, verbose, detect_paths):
> -        paths, tags = set(), set()
> +    def find_paths_and_metadata(self, verbose, detect_paths):
> +        paths, tags, flavors = set(), set(), set()

I think it would make sense to move this function to somewhere under `mozbuild` (except change the signature to accept a list of paths instead of using `files_changed`).

We can worry about that later though.
Attachment #8921177 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921178 [details]
Bug 1410969 - Properly resolve wildcards in `mach file-info`;

https://reviewboard.mozilla.org/r/192160/#review197646
Attachment #8921178 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921179 [details]
Bug 1410969 - Add support for writing JSON from `mach file-info`;

https://reviewboard.mozilla.org/r/192162/#review197648

::: python/mozbuild/mozbuild/frontend/mach_commands.py:130
(Diff revision 3)
>          for component, files in sorted(components.items(), key=lambda x: (x is None, x)):
>              print('%s :: %s' % (component.product, component.component) if component else 'UNKNOWN')
>              for f in sorted(files):
>                  print('  %s' % f)

Probably cleaner if `--format` defaults to whatever you want to call this output.
Attachment #8921179 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921180 [details]
Bug 1410969 - TaskCluster task for generating JSON files with Bugzilla metadata;

https://reviewboard.mozilla.org/r/192164/#review197650
Attachment #8921180 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8921179 [details]
Bug 1410969 - Add support for writing JSON from `mach file-info`;

https://reviewboard.mozilla.org/r/192162/#review197648

> Probably cleaner if `--format` defaults to whatever you want to call this output.

Changed this in latest series.
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4058e6c62b3
Properly import AutoTry; r=ahal
https://hg.mozilla.org/integration/autoland/rev/7506fda0a6e7
Return dict from find_paths_and_tags(); r=ahal
https://hg.mozilla.org/integration/autoland/rev/7564ed8dff3e
Consolidate code for resolving path metadata; r=ahal
https://hg.mozilla.org/integration/autoland/rev/7f4ba82f99ea
Properly resolve wildcards in `mach file-info`; r=ahal
https://hg.mozilla.org/integration/autoland/rev/d65c6f54ff66
Add support for writing JSON from `mach file-info`; r=ahal
https://hg.mozilla.org/integration/autoland/rev/e1955af99935
TaskCluster task for generating JSON files with Bugzilla metadata; r=ahal
Blocks: 1413254
See Also: → 1418671
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: