Page MenuHomeSoftware Heritage

Add a 'type' column to origin_visit.
ClosedPublic

Authored by vlorentz on Jun 6 2019, 4:17 PM.

Details

Reviewers
ardumont
Group Reviewers
Reviewers
Maniphest Tasks
T1731: Intrinsic identifiers for origins
Summary

If it is not specified when calling origin_visit_add, it defaults to the origin's type.

Note: I did not test the migration script.

Diff Detail

Repository
rDSTO Storage manager
Branch
origin_visit_type
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6089
Build 8386: tox-on-jenkinsJenkins
Build 8385: arc lint + arc unit

Event Timeline

vlorentz edited the summary of this revision. (Show Details)
vlorentz edited the summary of this revision. (Show Details)

Sound good.

Just a couple of questions.

sql/upgrades/136.sql
12

loader

21

So we keep the type on the origin for now, right?

swh/storage/sql/30-swh-schema.sql
220

loader

swh/storage/storage.py
1278–1281

why did you drop the db and cur parameter?

My understanding was to stay within the same transaction, we need to pass those along.

vlorentz added inline comments.
sql/upgrades/136.sql
21

Yes, we'll keep it while I'm migrating clients.

swh/storage/storage.py
1278–1281

my mistake

vlorentz marked an inline comment as done.

Better migration script

swh/storage/storage.py
1186

I missed db=db, cur=cur here as well.

This revision is now accepted and ready to land.Jun 7 2019, 2:39 PM

Landed as 21b5142164d81abbebbed5d82954f7e4ac1e5556