Skip to content
Snippets Groups Projects
Verified Commit 81ee46ca authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

git.loader: fix failing origin visit update step

due to uninitialized state variables

Currently, a failure happens for some reason. As some internal state variables
are not initialized (they are in fetch_data but not in __init__), this
makes the get_snapshot method fails because of it. Then that's making the
visit update step fails.

Adding the proper initialization for those variables in the __init__ method
should fix it. That will allow the failed state of the visit to be updated
properly in the storage. Associating an empty snapshot to the failed visit.

This should fix issues like [1]

https://sentry.softwareheritage.org/share/issue/ace9143c0f6244b49b18cca49a5aa809/
parent f4fcae54
No related branches found
Tags v0.0.60
1 merge request!34git.loader: fix failing origin visit update step due to uninitialized internal state variables
......@@ -242,6 +242,10 @@ class GitLoader(DVCSLoader):
self.base_url = base_url
self.ignore_history = ignore_history
self.repo_representation = repo_representation
# state initialized in fetch_data
self.remote_refs = []
self.local_refs = {}
self.symbolic_refs = {}
def fetch_pack_from_origin(self, origin_url, base_snapshot, do_activity):
"""Fetch a pack from the origin"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment