Page MenuHomeSoftware Heritage

bitbucket: Allow to specify the number of repos per api request
ClosedPublic

Authored by ardumont on Jun 21 2019, 5:28 PM.

Details

Summary

This is independent but still, it somehow fixes the issue occurring on T1826
(at least for the full lister... which is weird...)

Related T1826

Depends on D1628
Depends on D1629

Test Plan

tox
docker-dev

Diff Detail

Repository
rDLS Listers
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6416
Build 8905: tox-on-jenkinsJenkins
Build 8904: arc lint + arc unit

Event Timeline

olasd added inline comments.
swh/lister/bitbucket/lister.py
30–31

Hmmm the building of query parameters with a template leaves a strong aftertaste.

88–89

there's one level of parentheses too many now

This revision is now accepted and ready to land.Jun 21 2019, 5:30 PM
swh/lister/bitbucket/lister.py
30–31

Yes, it's ugly.
I did as in another lister though (gitlab one, i believe it's ugly as well, mind you ;)

I could maybe check the request_params method override (or something called similarly).

88–89

ack

swh/lister/bitbucket/lister.py
30–31

Yeah, I'm not suggesting fixing it in that diff at all, just something that we could improve upon at some point.

Build has FAILED

oh, that's why i did not open it earlier ;)
nice catch jenkins, thanks.

swh/lister/bitbucket/lister.py
30–31

Hmmm the building of query parameters with a template leaves a strong aftertaste.

Oh the complete PATH_TEMPLATE stanza, you mean.
Right!

A priori, down to the core class (the http ones), this uses within requests (for http listers at least which is... all?).
Thus, we may be able to use those params as a dict...
Avoiding the need for use to build ourselves the query params... and letting requests do it.
(Maybe)

But indeed, for later ;)

Fix one level of parentheses too many

This revision was automatically updated to reflect the committed changes.