Page MenuHomeSoftware Heritage

Generate the gitlab's instance name from the api_baseurl by default
ClosedPublic

Authored by douardda on Jan 9 2019, 5:11 PM.

Details

Summary

using the host of the given url.

This allows to create a lister task by simply specify the API base url
and prevent 'inconsistent by default' behavior, eg. with:

swh-scheduler task add swh-lister-gitlab-full \
    api_baseurl=https://0xacab.org/api/v4

the created task does not use 'gitlab' as instance name (but '0xacab.org'
here).

It's still possible to explicitely specify the instance name if needed.

depends on D893

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Jan 9 2019, 5:11 PM

I like the idea.

Thanks.

It's still possible to explicitely specify the instance name if needed.

Is it still needed though?
Maybe we could simply drop the instance name now and always derive it from the url as you introduced here.

This comment was removed by ardumont.
ardumont accepted this revision.Jan 10 2019, 9:46 AM

forgot to accept.

Is it still needed though?
Maybe we could simply drop the instance name now and always derive it from the url as you introduced here.

In any case, that's not a blocker ;)

This revision is now accepted and ready to land.Jan 10 2019, 9:46 AM
douardda updated this revision to Diff 2902.Jan 10 2019, 4:00 PM

fix tests

This revision was automatically updated to reflect the committed changes.