Skip to content

gh-155031: repass permission errors on subprocesses to parent / user - #155032

Open
flowln wants to merge 2 commits into
python:mainfrom
flowln:fix/tachyon-warn-on-permission-error-main
Open

gh-155031: repass permission errors on subprocesses to parent / user#155032
flowln wants to merge 2 commits into
python:mainfrom
flowln:fix/tachyon-warn-on-permission-error-main

Conversation

@flowln

@flowln flowln commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

These changes enable issues with permissions that happen while using the --subprocesses option on the 'run' method to propagate back, giving the user an indication of what went wrong. Previously, it would just silently fail, not giving the user a hint of what happened wrong.

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we have a test?

main()
except PermissionError:
handle_permission_error()
sys.exit(1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not understand this. sys.exit() is already called within the handler.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I forgot to commit removing the sys.exit call from there, my bad. Seems less confusing to have all code in the except paths ending with sys.exit than to call it from the helper function

@bedevere-app

bedevere-app Bot commented Aug 1, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@flowln

flowln commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Can we have a test?

@picnixz I've tried implementing a test, though I didn't find a portable way to force a PermissionError on a child process, I though about doing setcap or using capsh to restrict the permission, but it wasn't working out, especially considering most capability management out of containers is restricted to the root user, and I don't know of a way to implement that in a reasonable way inside the testing environment... Do you have any ideas?

flowln added 2 commits August 1, 2026 12:01
These changes enable issues with permissions that happen while using the
'--subprocesses' option on the 'run' method to propagate back, giving
the user an indication of what went wrong. Previously, it would just
silently fail, not giving the user a hint of what happened wrong.

The `__main__` code was adjusted to streamline the `sys.exit` calls.

Signed-off-by: Sofia Donato Ferreira <flowlnlnln@gmail.com>
Signed-off-by: Sofia Donato Ferreira <flowlnlnln@gmail.com>
@flowln
flowln force-pushed the fix/tachyon-warn-on-permission-error-main branch from 7ae23fd to 620339d Compare August 1, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants