Commands like "manage.py update_product_details_files" and "manage.py update_security_advisories" rely on git repositories for their data and update them when checking for new data. The problem is that they can succeed in updating the repo, but possibly fail on importing the data into the DB. If this happens then the next run of the command will think nothing needs importing since the git repo is up to date. We should try to reset the git repo back to its original state on db import failure.
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/6c91d7b5abd1c04ee3135f4cba5ae3280a08b170 Fix bug 1315082: Retry git repos on failed db updates Store the last successfully updated git hash in the database. As long as we only update said hash upon successful completion of an import it should try again next time. Also switch product-details and security- advisory import commands to simply update all files when a git update is detected. https://github.com/mozilla/bedrock/commit/adaf8518473a099ce96f0880eef4bba6a5dc0c98 Merge pull request #4452 from pmac/revert-git-repos-on-db-update-failure-1315082 Fix bug 1315082: Reset git repos on failed db updates
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/d962ef4b771f8ee13ea071143a237f5a8c54e6e6 Revert "Fix bug 1315082: Reset git repos on failed db updates"
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/841f1a53611a4135df33aa5080ace4c477ae78e7 Fix bug 1315082: Store git repo state in the db This reverts commit d962ef4b771f8ee13ea071143a237f5a8c54e6e6 which itself reverted an earlier attempt at this but which caused some tests to fail. https://github.com/mozilla/bedrock/commit/a1d5ffc1f52c10f0200e3f91677db85ce50a25ba Merge pull request #4526 from pmac/git-repo-state-in-db Fix bug 1315082: Store git repo state in the db
You need to log in before you can comment on or make changes to this bug.