feat: Disable writing Python bytecode#1152
Merged
codejedi365 merged 1 commit intopython-semantic-release:masterfrom Jan 24, 2025
Merged
feat: Disable writing Python bytecode#1152codejedi365 merged 1 commit intopython-semantic-release:masterfrom
codejedi365 merged 1 commit intopython-semantic-release:masterfrom
Conversation
Permission issues can occur on the Python bytecode files as the container entrypoint is being run as the root user. When e.g. using a custom parser the bytecode file will be owned by the root user instead of the user running the action. This can cause subsequent steps to fail. For example when running actions/checkout after python-semantic-release it will try to do a `git clean -ffdx` which will fail to remove the pyc file.
Contributor
|
Great work, thank you for the fix! |
Contributor
🎉 This PR has been published as part of Version 9.17.0 🎉You can find more information about this release on the GitHub Releases page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Permission issues can occur on the Python bytecode files as the container entrypoint is being run as the root user. When e.g. using a custom parser the bytecode file will be owned by the root user instead of the user running the action.
This can cause subsequent steps to fail.
For example when running actions/checkout after python-semantic-release it will try to do a
git clean -ffdxwhich will fail to remove the pyc file.Rationale
This could probably also be avoided by running the entrypoint as a non privileged user, but this would require using sudo or alternative solutions for running e.g. the
git config --systemcommand.In general the usage of the root user isn't really a problem for this action so this seems to be the most straightforward way to workaound the permission issues.
How did you test?
How to Verify
See linked actions in testing section.