remote: MySQLdb.OperationalError: (1020, "Record has changed since last read in table 'PackageSources'")
Checklist
NOTE: This bug template is meant to provide bug issues for code existing in the aurweb repository.
This bug template is not meant to handle bugs with user-uploaded packages. To report issues you might have found in a user-uploaded package, contact the package's maintainer in comments.
-
I confirm that this is an issue with aurweb's code and not a user-uploaded package. -
I have described the bug in complete detail in the Description section. -
I have specified steps in the Reproduction section. -
I have included any logs related to the bug in the Logs section. -
I have included the versions which are affected in the Version(s) section.
Description
I'm using GitHub actions to update about 100 i18n packages for firefox-nightly. However, when the job runs to using git to publish to aur, it fails with remote: MySQLdb.OperationalError: (1020, "Record has changed since last read in table 'PackageSources'")
.
Someone in the IRC channel suggested that I publish the packages one by one. However, the situation still happens.
Reproduction
Try publishing a larger number of packages (about 100) in a short time.
Logs
Pushing to ssh://aur.archlinux.org/firefox-nightly-i18n-fy-nl.git
remote: Traceback (most recent call last):
remote: File "/srv/http/aurweb/.venv/bin/aurweb-git-update", line 6, in <module>
remote: sys.exit(main())
remote: ^^^^^^
remote: File "/srv/http/aurweb/aurweb/git/update.py", line 474, in main
remote: save_metadata(metadata, conn, user)
remote: File "/srv/http/aurweb/aurweb/git/update.py", line 107, in save_metadata
remote: conn.execute(
remote: File "/srv/http/aurweb/aurweb/db.py", line 429, in execute
remote: return self._conn.execute(query, params)
remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
remote: File "/srv/http/aurweb/aurweb/db.py", line 379, in execute
remote: cur.execute(query, params)
remote: File "/srv/http/aurweb/.venv/lib/python3.12/site-packages/MySQLdb/cursors.py", line 179, in execute
remote: res = self._query(mogrified_query)
remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
remote: File "/srv/http/aurweb/.venv/lib/python3.12/site-packages/MySQLdb/cursors.py", line 330, in _query
remote: db.query(q)
remote: File "/srv/http/aurweb/.venv/lib/python3.12/site-packages/MySQLdb/connections.py", line 261, in query
remote: _mysql.connection.query(self, query)
remote: MySQLdb.OperationalError: (1020, "Record has changed since last read in table 'PackageSources'")
remote: error: hook declined to update refs/heads/master
To ssh://aur.archlinux.org/firefox-nightly-i18n-fy-nl.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://aur.archlinux.org/firefox-nightly-i18n-fy-nl.git'
You can find the origin logs here: Serial publishing parallel publishing
Version(s)
aurweb v6.2.15