Page MenuHomeSoftware Heritage

Make revision_add and release_add validate their input.
ClosedPublic

Authored by vlorentz on Aug 20 2019, 5:25 PM.

Diff Detail

Repository
rDSTO Storage manager
Branch
revision-release_add-validation
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7509
Build 10735: tox-on-jenkinsJenkins
Build 10734: arc lint + arc unit

Event Timeline

ardumont added inline comments.
swh/storage/in_memory.py
1696

person.to_dict()?

swh/storage/sql/60-swh-indexes.sql
148

from where does that rule come from?

I'm not against it, i'm not sure what that entails.

For the sake of the discussion about that release rule i'm not sure i understand.

This revision now requires changes to proceed.Aug 27 2019, 10:19 AM
vlorentz added inline comments.
swh/storage/in_memory.py
1696

Nope, it stores instances of Person, like for all other objects.

swh/storage/sql/60-swh-indexes.sql
148

It comes from @olasd. I remember the rational is something along the lines of:

  • author is null iff it's a lightweight release
  • lightweight releases don't have dates
  • non-lightweight releases may have a null date
This revision is now accepted and ready to land.Aug 27 2019, 11:58 AM
This revision was automatically updated to reflect the committed changes.