New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all HTTP requests to be made with Python bindings for GitLab #100
Conversation
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Here's the first run-through with regular pauses when several requests have been made. Successful run after porting HTTP requests to Python bindings for GitLab
I plan on getting rid of these safety nets now to see if the Python bindings for GitLab take care of the HTTP exceptions by itself - especially the one that arise due to rate limits and transient errors. |
So it seems that Successful run after porting HTTP requests to Python bindings for GitLab
Time to take it up a notch and get rid of all EDIT - This import run took 28 minutes and 12 seconds to complete. |
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
533b32e
to
c971a4c
Compare
I moved the Successful run after porting HTTP requests to Python bindings for GitLab
|
The sharing of the same GitLab object worked and this run took 20 minutes and 21 seconds to complete. |
This looks great! 🎉 Nice work @gridhead. I will be able to test this out once it is merged and cut into a new release. The easiest way for me to run this would be with a new RPM package update sent to the Fedora repositories, but I could try something out with a new Pip package update too. I would prefer the RPM package update though. |
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
…ject objects Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Add exception handling code as much as possible Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
The code has been restored to its former glory.
Current things to do
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found two things that seem weird to me, otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
I am gonna close that ticket by referencing this ticket.
from pagure_exporter.main import main | ||
|
||
|
||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -29,7 +29,7 @@ | |||
from pagure_exporter.main import main | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
from pagure_exporter.work.tkts import MoveTkts | ||
|
||
|
||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
standard.gpro = keepsake_gpro | ||
|
||
|
||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
standard.gpro = keepsake_gpro | ||
|
||
|
||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -229,7 +229,7 @@ def test_unit_iterpage_expt(caplog, srce, dest, pkey, gkey, fusr, tusr, indx, ro | |||
standard.pagulink = "https://pagure.io/api/0" | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -285,7 +285,7 @@ def test_unit_iteriden(caplog, srce, dest, pkey, gkey, fusr, tusr, indx, stat, s | |||
assert skip == test_iteriden[1] # noqa: S101 | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -339,7 +339,7 @@ def test_unit_iteriden_expt(caplog, srce, dest, pkey, gkey, fusr, tusr, indx, ro | |||
standard.pagulink = "https://pagure.io/api/0" | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -492,7 +452,7 @@ def test_unit_itertkts(caplog, srce, dest, pkey, gkey, fusr, tusr, data, root, t | |||
standard.gtlblink = "https://gitlab.com/api/v4/projects" | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
@@ -581,7 +513,7 @@ def test_unit_itercmts(caplog, srce, dest, pkey, gkey, fusr, tusr, data, root, t | |||
standard.gtlblink = "https://gitlab.com/api/v4/projects" | |||
|
|||
|
|||
@pytest.mark.vcr(filter_headers=["Authorization"]) | |||
@pytest.mark.vcr(filter_headers=["Authorization", "PRIVATE-TOKEN"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #89.
session=requests.Session(), | ||
url="https://gitlab.com", | ||
private_token=self.code, | ||
retry_transient_errors=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all HTTP requests to be made with Python bindings for GitLab
This should fix #60.