Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff: exit 2 in case we find differences #278

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

jcristau
Copy link
Contributor

There's currently no way for consumers to differentiate between "there was an error generating the diff" and "there were differences", since both exit 1.

Unfortunately this is reversed from the diff command, which exits "0 if the inputs are the same, 1 if different, 2 if trouble", but given python's behavior I'm not sure we can reliably do better.

There's currently no way for consumers to differentiate between "there
was an error generating the diff" and "there were differences", since
both exit 1.

Unfortunately this is reversed from the diff command, which exits "0 if
the inputs are the same, 1 if different, 2 if trouble", but given
python's behavior I'm not sure we can reliably do better.
@jcristau jcristau requested a review from a team as a code owner December 18, 2024 17:51
Copy link
Contributor

@matt-boris matt-boris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@matt-boris matt-boris merged commit 50e64df into taskcluster:main Dec 18, 2024
2 checks passed
@jcristau jcristau deleted the diff-exit-2 branch December 18, 2024 18:43
jcristau added a commit to jcristau/fxci-config that referenced this pull request Dec 19, 2024
jcristau added a commit to jcristau/fxci-config that referenced this pull request Dec 20, 2024
bhearsum added a commit to mozilla-releng/fxci-config that referenced this pull request Jan 6, 2025
* Require tc-admin 4.0.2

First release with taskcluster/tc-admin#278

* ci: check `tc-admin diff` exit code

Avoid optimizing out all tasks when the diff fails.

---------

Co-authored-by: Ben Hearsum (he/him) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants