Closed Bug 2007316 Opened 4 months ago Closed 3 months ago

`mach try` commands return job_id as exit code instead of 0 on success

Categories

(Developer Infrastructure :: Try, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr140 wontfix, firefox146 wontfix, firefox147 wontfix, firefox148 wontfix, firefox149 fixed)

RESOLVED FIXED
149 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- wontfix
firefox146 --- wontfix
firefox147 --- wontfix
firefox148 --- wontfix
firefox149 --- fixed

People

(Reporter: Logan, Assigned: Logan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

./mach try auto and other try commands return a non-zero exit code (the Lando job_id, e.g., 48) even when the push succeeds. This breaks shell scripting conventions where 0 indicates success and non-zero indicates failure.

Steps to Reproduce:

./mach try auto
echo $?

Expected Result:
Exit code 0 (success)

Actual Result:
Exit code 48 (or other job_id number)

Set release status flags based on info from the regressing bug 1964784

:sparky, since you are the author of the regressor, bug 1964784, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(gmierzwinski)

./mach try commands were returning the Lando job_id (e.g., 48) as the shell
exit code instead of 0 on success. This broke shell scripting conventions.

The issue was introduced in Bug 1964784 when push_to_try() was changed to
return the job_id. This value propagated up through the mach command layer.

This fix normalizes exit codes in mach_commands.py to return 0 for success
while preserving error code 1 for validation failures.

Assignee: nobody → loganrosen
Status: NEW → ASSIGNED
Flags: needinfo?(gmierzwinski)

The severity field is not set for this bug.
:marco, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mcastelluccio)
Severity: -- → S3
Flags: needinfo?(mcastelluccio)
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: