In effect, it just allows to add credentials to cgit, cran and pypi listers.
This fixes instances of error [1]
[1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/
Related to T2998
Differential D4961
Make stateless lister constructors compatible with credentials ardumont on Jan 28 2021, 1:34 PM. Authored by
Details
In effect, it just allows to add credentials to cgit, cran and pypi listers. This fixes instances of error [1] [1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/ Related to T2998 Tested on staging and it worked.
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D4961 (id=17702)Rebasing onto 72be074a79... Current branch diff-target is up to date. Changes applied before testcommit b6ec36a44e1c73a55079b157ece9379aef3aa2c4 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Jan 28 13:31:45 2021 +0100 cgit: Make lister constructor compatible In effect, it just allows to add credentials even though those are not used. This fixes issue [1] [1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/ Related to T2998 See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/212/ for more details. Comment Actions LGTM. Other ported listers might have the same issue so I guess they should be fixed too. Could you also update the celery tasks tests by mocking credentials configuration coming from configuration file ? Comment Actions
good idea, i'll check that. Independently from this diff but still i think possibly related to stateless lister in general, you might be interested by [1] Comment Actions load_from_envvar = mocker.patch("swh.lister.pattern.load_from_envvar") load_from_envvar.return_value = {"credentials": {}} Comment Actions
I had checked the phabricator and gitea one which are already ok btw. Comment Actions
yes, pypi and cran needs that patch as well. Thanks for the heads up. Comment Actions
Well, we can't really do that, we currently totally inhibit the lister.from_configfile call. Comment Actions Ah right, I guess we should add the test in test_lister.py then. I will update D4962 then. Comment Actions
yes, indeed and that's what i'm currently doing ;) (great news about launchpad ;) Comment Actions FYI, I did it like this for launchpad. def test_lister_from_configfile(swh_scheduler_config, mocker): load_from_envvar = mocker.patch("swh.lister.pattern.load_from_envvar") load_from_envvar.return_value = { "scheduler": {"cls": "local", **swh_scheduler_config}, "credentials": {}, } lister = LaunchpadLister.from_configfile() assert lister.scheduler is not None assert lister.credentials is not None Comment Actions Update cgit/cran/pypi lister to allow credentials to be passed along during instantiation Comment Actions Build has FAILED Patch application report for D4961 (id=17705)Rebasing onto 72be074a79... Current branch diff-target is up to date. Changes applied before testcommit f1d69d969f24fa643b3419bb6ef513beff93d3b9 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Jan 28 13:31:45 2021 +0100 cgit: Make lister constructor compatible In effect, it just allows to add credentials even though those are not used. This fixes issue [1] [1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/ Related to T2998 Link to build: https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/214/ Comment Actions Build is green Patch application report for D4961 (id=17706)Rebasing onto 72be074a79... Current branch diff-target is up to date. Changes applied before testcommit 3e25c6197dc3138534d98b95b6837c076f300caf Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Jan 28 13:31:45 2021 +0100 cgit: Make lister constructor compatible In effect, it just allows to add credentials even though those are not used. This fixes issue [1] [1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/ Related to T2998 See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/215/ for more details. Comment Actions Build is green Patch application report for D4961 (id=17708)Rebasing onto 72be074a79... Current branch diff-target is up to date. Changes applied before testcommit ae17b6b9a04a473eb5957572ea2063f685bcf194 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Thu Jan 28 13:31:45 2021 +0100 Make stateless lister constructors compatible with credentials In effect, it just allows to add credentials to cgit, cran and pypi listers. This fixes instances of error [1] [1] https://sentry.softwareheritage.org/share/issue/2c35a9f129cf4982a2dd003a232d507a/ Related to T2998 See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/217/ for more details. |