[Artifacts] Fix artifact name missing in metadata during migration [1.6.x] #5747
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
key
of the artifact is used for creating its uid, which is a hash on the artifact dictionary, but must containkey
,iteration
andproducer_id
as they determine the artifact's uniqueness.We saw a bug where a legacy artifact had no
key
in the artifact dictionary, only adb_key
.While migrating all artifacts to the new
artifacts_v2
table, an exception was raised aboutkey
not being populated in the artifacts dictionary.To overcome this, we populate the key with the artifact's
db_key
. This shouldn't cause issues because when reading artifacts from the DB you need to provide the db_key and not the key.Resolves https://iguazio.atlassian.net/browse/IG-22883