Page MenuHomeSoftware Heritage

Add a 'type' column to origin_visit.
ClosedPublic

Authored by vlorentz on Thu, Jun 6, 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 6090
Build 8388: tox-on-jenkinsJenkins
Build 8387: arc lint + arc unit

Event Timeline

vlorentz created this revision.Thu, Jun 6, 4:17 PM
vlorentz edited the summary of this revision. (Show Details)
vlorentz edited the summary of this revision. (Show Details)
vlorentz updated this revision to Diff 5119.Thu, Jun 6, 4:40 PM

update api client

Sound good.

Just a couple of questions.

sql/upgrades/136.sql
13

loader

22

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

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

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 updated this revision to Diff 5135.Fri, Jun 7, 2:21 PM

fix typos + cur/db.

vlorentz marked 3 inline comments as done.Fri, Jun 7, 2:22 PM
vlorentz added inline comments.
sql/upgrades/136.sql
22

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

swh/storage/storage.py
1278–1281

my mistake

vlorentz updated this revision to Diff 5138.Fri, Jun 7, 2:35 PM
vlorentz marked an inline comment as done.

Better migration script

vlorentz updated this revision to Diff 5139.Fri, Jun 7, 2:37 PM

Better migration script

ardumont added inline comments.Fri, Jun 7, 2:37 PM
swh/storage/storage.py
1187

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

ardumont accepted this revision.Fri, Jun 7, 2:39 PM
This revision is now accepted and ready to land.Fri, Jun 7, 2:39 PM
vlorentz updated this revision to Diff 5140.Fri, Jun 7, 2:40 PM

Pass db/cur

vlorentz marked an inline comment as done.Fri, Jun 7, 2:40 PM