Page MenuHomeSoftware Heritage

indexer: Change confusing name policy_update to skip_existing boolean
ClosedPublic

Authored by ardumont on Nov 16 2018, 4:01 PM.

Details

Summary

policy_update is a variable to determine whether to update or ignore
duplicates. Prior to this commit, this was conflated with the
incremental nature of the indexer. This declares a meaningful name
instead 'incremental' and force the db policy update writing to always
update conflicting data (if any).

This policy_update variable should probably go away.

Test Plan

tox

Diff Detail

Repository
rDCIDX Metadata indexer
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2428
Build 2979: tox-on-jenkinsJenkins
Build 2978: arc lint + arc unit

Event Timeline

vlorentz added inline comments.
swh/indexer/indexer.py
440

Parse error: "Either the indexer is incremental [...] drop or not"

Build has FAILED

because issue to retrieve the new storage's v0.0.110 in pypi.

Collecting swh.storage>=0.0.110 (from swh.indexer==0.0.55.post51)
  Could not find a version that satisfies the requirement swh.storage>=0.0.110 (from swh.indexer==0.0.55.post51) (from versions: 0.0.107, 0.0.108, 0.0.109)
No matching distribution found for swh.storage>=0.0.110 (from swh.indexer==0.0.55.post51)

Change from incremental to skip_existing

ardumont retitled this revision from indexer: Change confusing name policy_update to incremental boolean to indexer: Change confusing name policy_update to skip_existing boolean.Nov 16 2018, 6:51 PM
ardumont marked an inline comment as done.
This revision is now accepted and ready to land.Nov 16 2018, 8:43 PM

Change branch then diff update (before merging)

This revision was automatically updated to reflect the committed changes.