See for example here.
rebase-helper <[email protected]> are fallback values used by rebase-helper in case it's not possible to obtain the proper values from git configuration (i.e. git config --get user.name and git config --get user.email fail).
hmm, the image looks OK to me:
$ docker run -ti --rm usercont/packit-service-worker:prod git config -l
user.name=Packit Service
[email protected]
...but sandcastle doesn't have any
$ docker run -ti --rm usercont/sandcastle:prod git config --get user.name
$ echo $?
1
I thought we use sandcastle only to build SRPM.
...but sandcastle doesn't have any
Can we move this issue to sandcastle then?
sandcastle is being used in multiple places and it seems bumpspec is executed in sandcastle
this definitely needs some investigation
anyway, @nforro this is great for you, your project is getting the credit :))
ping sync2jira
Some more investigation:
updating of the changelog is not happening in sandcastle
the commits in which the changelog entries have these default values have the names in Signed off section set correctly, but not the email (should be [email protected]):
Signed-off-by: Packit Service <packit@packit-worker-2.packit-worker.packit-prod.svc.cluster.local>
Signed-off-by: Packit Service <packit@packit-worker-1.packit-worker.packit-prod.svc.cluster.local> (haven't found record with worker-0)
-> the ~/.gitconfig is present (user.name in commit message correct), values are overwritten for some local git repo?
happened in that time in other projects too - https://src.fedoraproject.org/rpms/python-ogr/blob/f32/f/python-ogr.spec#_58, https://src.fedoraproject.org/rpms/packit/blob/f32/f/packit.spec#_84
what does rpmdev-packager print?
$ rpmdev-packager
Tomas Tomecek <[email protected]>
In workers:
$ rpmdev-packager
id: cannot find name for user ID ...
Packit Service <[email protected]>
:thinking:
Anyway, when updating changelog, the name and email should be obtained from git config command.
It seems that we are using rebase-helper to update the changelog:
def update_changelog_in_spec(self, changelog_entry):
if hasattr(self, "update_changelog"):
# new rebase-helper
self.update_changelog(changelog_entry)
So could the issue be in rebase-helper itself? We should investigate how it obtains the username and email.
So could the issue be in rebase-helper itself? We should investigate how it obtains the username and email.
As mentioned in the first post, rebase-helper just calls git config --get user.name and git config --get user.email (using GitPython, but that shouldn't matter).
It seems that we are using rebase-helper to update the changelog
Yes, I was checking the method calls, that's how I came to the rebase-helper code which I linked in the comment above.
So could the issue be in rebase-helper itself? We should investigate how it obtains the username and email.
I don't think so, as it was said, it just uses GitPython methods.
<packit@packit-worker-2.packit-worker.packit-prod.svc.cluster.local> but these emails in Signed-off are weird as well.
I was checking some sentry issues from times when this was happening and found some relevant logs, the git config --get commands failed in worker in /src dir:
subprocess git config --get user.name
subprocess.cwd: /src
rebasehelper.helpers.git_helper
Failed to get configured git user name, using 'rebase-helper'
md5-44031a8f4288195da8e48c14f6906e1f
subprocess git config --get user.email
subprocess.cwd: /src
md5-44031a8f4288195da8e48c14f6906e1f
rebasehelper.helpers.git_helper
Failed to get configured git user email, using '[email protected]'
Tried to reproduce, but commands return correct values now, and I haven't found any occurrences of this error since 21th September, so I propose to close this issue and possibly revisit it if it happens in future.
@lbarcziova oh my, what a cluster-f... mess; thanks for such a thorough investigation
since we are now confident that the way %changelog user is being populed is via git config --get, would it make sense to have a test case which would run in the worker deployed in p-s and check that we are getting the value from the git-config-get we are expecting?
@lbarcziova this is solved(=not occurring anymore and a test added) by your PR, isn't it?
btw, Thanks for your deep investigation!
@lbarcziova this is solved(=not occurring anymore and a test added) by your PR, isn't it?
Yes, closing.