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

Fix nonzero exit for conda-build entrypoint #5169

Merged
merged 5 commits into from Feb 7, 2024
Merged

Fix nonzero exit for conda-build entrypoint #5169

merged 5 commits into from Feb 7, 2024

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Feb 5, 2024

Description

Resolves #5167

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@kenodegard kenodegard added the build::review trigger a build for this PR label Feb 5, 2024
@conda-bot conda-bot added cla-signed [bot] added once the contributor has signed the CLA and removed build::review trigger a build for this PR labels Feb 5, 2024
@conda-bot
Copy link
Contributor

conda-bot commented Feb 5, 2024

Review build status

The workflow for building and uploading a canary release for conda-build with the label conda-conda-build-pr-5169 in channel conda-canary was started by @kenodegard!

Once it's done, use this command to try it out in a new conda environment:

conda install -c conda-canary/label/conda-conda-build-pr-5169 conda-build

@kenodegard kenodegard added the build::review trigger a build for this PR label Feb 5, 2024
@conda-bot conda-bot removed the build::review trigger a build for this PR label Feb 5, 2024
@kenodegard kenodegard marked this pull request as ready for review February 6, 2024 16:29
@kenodegard kenodegard self-assigned this Feb 6, 2024
@kenodegard kenodegard mentioned this pull request Feb 6, 2024
43 tasks
@mbargull
Copy link
Member

mbargull commented Feb 6, 2024

Oh, I didn't even notice the .execute functions returned non-ints before; whoops!

Could we just let .cli.main_build.execute return 0 in any (non-failure) case?
Apart from the tests, I don't think we have consumers of that function that use the return value.

Yes, one could argue about API/deprecation etc..
I don't think this is necessarily needed here -- we do have the .api module and if anyone else uses .cli.main_*.execute they are knowingly doing bad stuff.
The proposed returns_outputs argument would just added unneeded potential maintenance burden, IMO.

@kenodegard
Copy link
Contributor Author

Could we just let .cli.main_build.execute return 0 in any (non-failure) case?
Apart from the tests, I don't think we have consumers of that function that use the return value.

I'd prefer that, was just trying to avoid a larger refactor since this is a patch.

The proposed returns_outputs argument would just added unneeded potential maintenance burden, IMO.

Absolutely, not a fan at all.

@mbargull good feedback, I'll work some more on this

mbargull
mbargull previously approved these changes Feb 7, 2024
Copy link
Member

@mbargull mbargull left a comment

Choose a reason for hiding this comment

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

LGTM!

@mbargull
Copy link
Member

mbargull commented Feb 7, 2024

There are some sys.exit(x) instead of return x calls in those execute functions -- we could clean that up at some point; but not necessary to do in this PR.

@kenodegard kenodegard enabled auto-merge (squash) February 7, 2024 17:05
@kenodegard kenodegard merged commit 7e166ac into 24.1.x Feb 7, 2024
26 checks passed
@kenodegard kenodegard deleted the nonzero branch February 7, 2024 18:17
@kenodegard kenodegard linked an issue Feb 7, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

conda build has non-zero exit status despite successful build
3 participants