Open
Bug 1968280
Opened 10 months ago
Updated 5 months ago
landoscript should fetch file modes for newly added or files being removed
Categories
(Release Engineering :: Release Automation, enhancement, P3)
Release Engineering
Release Automation
Tracking
(Not tracked)
NEW
People
(Reporter: bhearsum, Unassigned, Mentored)
Details
(Keywords: good-next-bug, Whiteboard: [lang=py])
Attachments
(1 file)
At the moment landoscript hardcodes file modes that are used in diff metadata for added or removed files. This works fine for all known use cases at the moment, but it's certainly possible that in the future we may add or remove a file with a different file mode.
We should enhance landoscript to deal with this better by:
- Adding an optional
modeargument to diff_contents that must be present if a file is being added or removed. - Adding support in github_client.py for optionally fetching file modes in
get_files. This will require changing the format of the return value of this function. - Updating the get_files_payload test fixture to deal with the new format; it will need to allow for file modes to be passed in
- Updating [get_files callers](https://github.com/search?q=repo%3Amozilla-releng%2Fscriptworker-scripts%20.get_files(&type=code) to deal with this interface change, and updating the
android_l10ncallers to pass along the file modes when appropriate. (Other landoscript actions at the time of writing will never add or remove files; so we don't need to pass along modes in them.) - Adding tests that add and remove files with non-default modes. This will most likely involve removing hardcoded modes in assert functions.
Comment 1•5 months ago
|
||
Comment 2•5 months ago
|
||
Hi bhearsum, is this bug still open? I've submitted a draft PR here. Could you please have a look and let me know if I need to make any changes.
Flags: needinfo?(bhearsum)
| Reporter | ||
Comment 3•5 months ago
|
||
Feedback sent in the PR! Thanks for your interest!
Flags: needinfo?(bhearsum)
You need to log in
before you can comment on or make changes to this bug.
Description
•