You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v7.33.2 unable to detect commit author - regression? #566
After working around #560 by upgrading to v7.33.2, I have a number of projects that are now failing to publish back to GitHub (breaking semantic-release publish).
Current version: 0.10.1, Current release version: 0.10.1
Bumping with a minor version to 0.11.0
error: Cmd('git') failed due to: exit code(128)
error: cmdline: git commit -m 0.11.0
error:
error: Automatically generated by python-semantic-release --author=semantic-release <semantic-release>
error: stderr: 'Committer identity unknown
error:
error: *** Please tell me who you are.
error:
error: Run
error:
error: git config --global user.email "[email protected]"
error: git config --global user.name "Your Name"
error:
error: to set your account's default identity.
error: Omit --global to set the identity only in this repository.
error:
error: fatal: empty ident name (for <[email protected][23](https://github.com/madpah/serializable/actions/runs/4321870889/jobs/7543605922#step:8:24)byketeyxppypgmqpve.phxx.internal.cloudapp.net>) not allowed'
error: Cmd('git') failed due to: exit code(128)
error: cmdline: git commit -m 0.11.0
error:
error: Automatically generated by python-semantic-release --author=github-actions <[email protected]>
error: stderr: 'Committer identity unknown
error:
error: *** Please tell me who you are.
error:
error: Run
error:
error: git config --global user.email "[email protected]"
error: git config --global user.name "Your Name"
error:
error: to set your account's default identity.
error: Omit --global to set the identity only in this repository.
error:
error: fatal: empty ident name (for <runner@fv-az566-152.iltkdbwcmizurjtzn42pmpc1mg.bx.internal.cloudapp.net>) not allowed'
I've never had to set or define commit_author previously.
Hey @madpah , I can see that py-serializable==0.11.1 was released a couple of hours ago! 🚀
Looking at the workflows you mentioned, I think the problem was this: poetry not found is an issue we've seen before - if you change your build_command to pip install poetry && poetry build you should be good to go - Python Semantic Release runs in its own virtual environment so you need to make sure poetry is installed in there with it. However the other workflow failures you linked concerned me, so I took a look into those too, and I think this is why:
When using our GitHub action, git is configured to use the input commit author with the git command line. By pulling the python-semantic-release package in directly, you will be running it without those git configuration steps - and if you use author=... git still checks for the existence of your configuration file before performing the commit. I happen to know because I hit exactly the same bug while working on v8, there's a reference to it at #487.
The fix is to setup environment variables for git - here's a working example which seems to work around the issue, i.e. git seems to respect these environment variables regardless of the presence of a config file or not.
Also, these are set with the command line in the GitHub action.
I am unfortunately not likely to be near a keyboard for the next week, so I'd advise if you (or anyone else) wants to run Python Semantic Release outside of the GitHub action, you can try working around this by running those git config commands in the action with the author and email you want and/or set those GIT_* environment variables.
This issue is stale because it has not been confirmed or planned by the maintainers and has been open 90 days with no recent activity. It will be closed in 7 days, if no further activity occurs. Thank you for your contributions.
Activity
bernardcooke53 commentedon Mar 3, 2023
Hey @madpah , I can see that
py-serializable==0.11.1was released a couple of hours ago! 🚀Looking at the workflows you mentioned, I think the problem was this:
poetry not foundis an issue we've seen before - if you change yourbuild_commandtopip install poetry && poetry buildyou should be good to go - Python Semantic Release runs in its own virtual environment so you need to make sure poetry is installed in there with it. However the other workflow failures you linked concerned me, so I took a look into those too, and I think this is why:When using our GitHub action, git is configured to use the input commit author with the git command line. By pulling the
python-semantic-releasepackage in directly, you will be running it without those git configuration steps - and if you useauthor=...git still checks for the existence of your configuration file before performing the commit. I happen to know because I hit exactly the same bug while working on v8, there's a reference to it at #487.The fix is to setup environment variables for git - here's a working example which seems to work around the issue, i.e. git seems to respect these environment variables regardless of the presence of a config file or not.
Also, these are set with the command line in the GitHub action.
I am unfortunately not likely to be near a keyboard for the next week, so I'd advise if you (or anyone else) wants to run Python Semantic Release outside of the GitHub action, you can try working around this by running those
git configcommands in the action with the author and email you want and/or set thoseGIT_*environment variables.Hope this helps!
ci: workaround as per python-semantic-release/python-semantic-release…
madpah commentedon Mar 7, 2023
Thanks for the comprehensive response @bernardcooke53.
I made changes as suggested and it worked (https://github.com/madpah/serializable/actions/runs/4353000193/jobs/7606491536).
However, this means I need to pin the version of
poetryin mypyproject.tomlwhich makes me sad :-(If you are not aware of a workaround, perhaps a feature request to allow dependencies to be specified when using the GitHub Action is appropriate?
bernardcooke53 commentedon Mar 14, 2023
Hey @madpah - I don't know of a better way other than inlining the dependency specification, so that sounds useful 👍
github-actions commentedon Mar 26, 2024
This issue is stale because it has not been confirmed or planned by the maintainers and has been open 90 days with no recent activity. It will be closed in 7 days, if no further activity occurs. Thank you for your contributions.