Page MenuHomeSoftware Heritage

158: Make schema and migration converge so the migration works
ClosedPublic

Authored by ardumont on Jul 11 2020, 8:53 AM.

Details

Summary

In the end, the order of the revision entry matters whether we select * or not.
So the select must match the order defined in the revision_entry type type.
Otherwise, a mismatch type error occurs [1]

[1] psql:sql/upgrades/158.sql:74: ERROR: return type mismatch in function
declared to return revision_entry

Note: it's been running on staging storage to unstuck the failed workers

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Jul 11 2020, 8:53 AM
ardumont added inline comments.Jul 11 2020, 8:54 AM
sql/upgrades/158.sql
14

The enclosing parenthesis did not work either.

ardumont edited the test plan for this revision. (Show Details)Jul 11 2020, 8:54 AM
ardumont added reviewers: douardda, anlambert, olasd.

Build is green

Patch application report for D3504 (id=12388)

Rebasing onto 9219a23606...

Current branch diff-target is up to date.
Changes applied before test
commit 1a8924be8f7da912cc4bcd6ce2f749b9454dcbad
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat Jul 11 08:42:17 2020 +0200

    158: Make schema and migration converge so the migration works
    
    In the end, the order of the revision entry matters whether we select * or not.
    So the select must match the order defined in the revision_entry type type.
    Otherwise, a mismatch type error occurs [1]
    
    [1] psql:sql/upgrades/158.sql:74: ERROR: return type mismatch in function
    declared to return revision_entry

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/445/ for more details.

olasd accepted this revision.Jul 15 2020, 10:48 AM
This revision is now accepted and ready to land.Jul 15 2020, 10:48 AM