Page MenuHomeSoftware Heritage

Use origin_add instead of deprecated origin_add_one endpoint
ClosedPublic

Authored by ardumont on Mon, Jun 29, 4:11 PM.

Details

Summary

It's deprecated and triggers lots on warning in staging (storage at least):

Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)
Jun 29 13:55:06 storage0 gunicorn3[15758]: /usr/lib/python3/dist-packages/swh/core/api/__init__.py:453: DeprecationWarning: Call to deprecated method origin_add_one. (Use origin_add([origin]) instead)
Jun 29 13:55:06 storage0 gunicorn3[15758]:   return obj_meth(**kw)

Depends on D3368

Test Plan

tox
(failing same reason as depending diff for now)

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
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.Mon, Jun 29, 4:11 PM

Build has FAILED

Patch application report for D3370 (id=11958)

Could not rebase; Attempt merge onto dc4946ad1a...

Updating dc4946a..316f912
Fast-forward
 requirements-swh.txt                    | 2 +-
 swh/loader/core/loader.py               | 2 +-
 swh/loader/core/tests/test_loader.py    | 4 ++--
 swh/loader/package/loader.py            | 9 +++++----
 swh/loader/package/tests/test_loader.py | 6 +++---
 5 files changed, 12 insertions(+), 11 deletions(-)
Changes applied before test
commit 316f9129dcad43e21a6a1f7db05aa1552c359cef
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 29 15:59:31 2020 +0200

    Use origin_add instead of deprecated origin_add_one endpoint
    
    It's deprecated and triggers lots on warning in staging.

commit 62aad2943238d2c1adfab91c2e4d32129a41eb75
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 29 11:46:56 2020 +0200

    Migrate to use object's "object_type" field when computing objects
    
    Related to D3152

Link to build: https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/89/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/89/console

ardumont edited the summary of this revision. (Show Details)Mon, Jun 29, 4:19 PM
ardumont edited the test plan for this revision. (Show Details)
vlorentz accepted this revision.Mon, Jun 29, 4:41 PM
This revision is now accepted and ready to land.Mon, Jun 29, 4:41 PM

Build is green

Patch application report for D3370 (id=11958)

Could not rebase; Attempt merge onto dc4946ad1a...

Updating dc4946a..316f912
Fast-forward
 requirements-swh.txt                    | 2 +-
 swh/loader/core/loader.py               | 2 +-
 swh/loader/core/tests/test_loader.py    | 4 ++--
 swh/loader/package/loader.py            | 9 +++++----
 swh/loader/package/tests/test_loader.py | 6 +++---
 5 files changed, 12 insertions(+), 11 deletions(-)
Changes applied before test
commit 316f9129dcad43e21a6a1f7db05aa1552c359cef
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 29 15:59:31 2020 +0200

    Use origin_add instead of deprecated origin_add_one endpoint
    
    It's deprecated and triggers lots on warning in staging.

commit 62aad2943238d2c1adfab91c2e4d32129a41eb75
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 29 11:46:56 2020 +0200

    Migrate to use object's "object_type" field when computing objects
    
    Related to D3152

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