Multiple target extids in NPM loader
https://sentry.softwareheritage.org/organizations/swh/issues/8790/?referrer=phabricator_plugin
AssertionError: {CoreSWHID.from_string('swh:1:rel:290ef74e0071cfab4c900be8976bea8ecedd168e'), CoreSWHID.from_string('swh:1:rel:4114bf1f234e911d65e8839ce94ebcab342157bb'), CoreSWHID.from_string('swh:1:rel:516b395f20b747e645439e99821bc116a4eb0773')}
File "swh/loader/package/npm/tasks.py", line 14, in load_npm
return NpmLoader.from_configfile(url=url).load()
File "swh/loader/package/loader.py", line 608, in load
known_extids, p_info, last_snapshot_targets
File "swh/loader/package/loader.py", line 329, in resolve_object_from_extids
extid_target2 = self.select_extid_target(p_info, release_extid_targets)
File "swh/loader/package/loader.py", line 362, in select_extid_target
assert len(extid_targets) == 1, extid_targets
caused by:
softwareheritage=> select name from release where id in ('\x290ef74e0071cfab4c900be8976bea8ecedd168e', '\x4114bf1f234e911d65e8839ce94ebcab342157bb', '\x516b395f20b747e645439e99821bc116a4eb0773');
name
------
(0 ligne)
softwareheritage=> select * from extid where target_type='release' and target in ('\x290ef74e0071cfab4c900be8976bea8ecedd168e', '\x4114bf1f234e911d65e8839ce94ebcab342157bb', '\x516b395f20b747e645439e99821bc116a4eb0773');
extid_type | extid | target_type | target | extid_version
------------------+--------------------------------------------+-------------+--------------------------------------------+---------------
npm-archive-sha1 | \xa23a0751034b7a778122320ca389ef029786281f | release | \x290ef74e0071cfab4c900be8976bea8ecedd168e | 0
npm-archive-sha1 | \xa23a0751034b7a778122320ca389ef029786281f | release | \x4114bf1f234e911d65e8839ce94ebcab342157bb | 0
npm-archive-sha1 | \xa23a0751034b7a778122320ca389ef029786281f | release | \x516b395f20b747e645439e99821bc116a4eb0773 | 0
(3 lignes)
Migrated from T3884 (view on Phabricator)