Closed
Bug 1480187
Opened 7 years ago
Closed 7 years ago
mach try again doesn't work correctly with multiple checkouts
Categories
(Testing :: General, defect, P3)
Tracking
(firefox-esr60 fixed, firefox63 fixed)
RESOLVED
FIXED
mozilla63
People
(Reporter: gabriel-v, Assigned: gabriel-v)
References
Details
Attachments
(1 file, 1 obsolete file)
The history file for 'mach try again' is under the state dir, '~/.mozconfig', which means it's shared between source clones.
Steps to reproduce:
1. repo A: mach try commandA
2. repo B: mach try commandB
3. repo A: mach try again
Outcome: step 3 runs commandB.
Expected: step 3 runs commandA.
I propose to move the history file to the topsrcdir.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → tvijiala
Assignee | ||
Updated•7 years ago
|
Attachment #8996977 -
Flags: review?(gbrown)
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8996977 -
Flags: review?(gbrown)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8996977 -
Attachment is obsolete: true
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8997829 [details]
Bug 1480187 - Fix mach try again when using multiple source checkouts.
https://reviewboard.mozilla.org/r/261542/#review269088
::: tools/tryselect/push.py:49
(Diff revision 1)
>
> here = os.path.abspath(os.path.dirname(__file__))
> build = MozbuildObject.from_environment(cwd=here)
> vcs = get_repository_object(build.topsrcdir)
> -history_path = os.path.join(get_state_dir()[0], 'history', 'try_task_configs.json')
> +topsrcdir_hash = hashlib.sha256(os.path.abspath(build.topsrcdir)).hexdigest()
> +history_path = os.path.join(get_state_dir()[0], 'history', '{}.json'.format(topsrcdir_hash))
Please make the history_path `history/<hash>/try_task_configs.json`. Will make it a bit easier to store other stuff.
::: tools/tryselect/push.py:60
(Diff revision 1)
> json.dump(try_task_config, fh, indent=2, separators=(',', ':'))
> fh.write('\n')
> return config_path
>
>
> def write_task_config_history(msg, try_task_config):
Could you add an if statement that detects if the old `history_path` exists and if so moves it to the new location?
That way people don't lose their history during the transition.
Attachment #8997829 -
Flags: review?(ahal) → review-
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•7 years ago
|
||
Assignee | ||
Comment 8•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8997829 [details]
Bug 1480187 - Fix mach try again when using multiple source checkouts.
https://reviewboard.mozilla.org/r/261542/#review269088
> Could you add an if statement that detects if the old `history_path` exists and if so moves it to the new location?
>
> That way people don't lose their history during the transition.
I had to add this to selectors/again.py, so the move happens before the history is read or purged.
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8997829 [details]
Bug 1480187 - Fix mach try again when using multiple source checkouts.
https://reviewboard.mozilla.org/r/261542/#review269440
Thanks, lgtm!
Attachment #8997829 -
Flags: review?(ahal) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Updated•7 years ago
|
Keywords: checkin-needed
Comment 10•7 years ago
|
||
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/5312e71473c4
Fix mach try again when using multiple source checkouts. r=ahal
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment 12•6 years ago
|
||
bugherder uplift |
status-firefox-esr60:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•