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

More granular eb exit codes (return codes) #4426

Open
dirkpetersen opened this issue Jan 3, 2024 · 3 comments
Open

More granular eb exit codes (return codes) #4426

dirkpetersen opened this issue Jan 3, 2024 · 3 comments
Assignees
Milestone

Comments

@dirkpetersen
Copy link

EB mostly returns 1 as an exit code if a build fails. It will return the exit code of the application it is attempting to build. If there are errors that are not related to the actual application build it would be very beneficial to have more granular exit codes for these condititions.

  • cannot find source tar (and no download url available)
  • transient connection error when downloading source tar
  • 404 error - source tar not found
  • os-dependency not available
  • error in build dependency
  • dependency not installed

There may be some other errors states that are worth catching ?

@dirkpetersen
Copy link
Author

from Boegel on Slack:

We currently typically use raise EasyBuildError, which is then caught in main.py where the exit is done (via print_error); see bottom of https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/main.py
To allow for custom exit code, we probably need to add an exit_code field to EasyBuildError, which can be passed down to print_error.
Things have changed a bit there in preparation for EasyBuild 5.0, see the 5.0.x branch (see main_with_hooks function in https://github.com/easybuilders/easybuild-framework/blob/5.0.x/easybuild/main.py). I would target the 5.0.x branch

@boegel boegel added this to the 5.0 milestone Feb 12, 2024
@draentropia
Copy link

@boegel can you assign this ticket to me, please?

@boegel
Copy link
Member

boegel commented Feb 14, 2024

@boegel can you assign this ticket to me, please?

Sure, thanks!

@boegel boegel changed the title More granular EB exit codes (return codes) More granular eb exit codes (return codes) Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants