Skip to content

Commit

Permalink
Merge pull request #110 from fedora-infra/wipe
Browse files Browse the repository at this point in the history
Clean up after the removal of requests-based GitLab interactions
  • Loading branch information
gridhead authored Mar 4, 2024
2 parents 03c746d + 5ccbc21 commit ca4c12e
Show file tree
Hide file tree
Showing 48 changed files with 5,550 additions and 5,446 deletions.
4 changes: 0 additions & 4 deletions pagure_exporter/conf/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@
# Time in seconds to wait for when the rate limit for API requests is reached
waittime = 60

# Rate limit for API requests as defined by the destination forge
# See https://github.com/fedora-infra/pagure-exporter/issues/60#issuecomment-1820304156
ratebond = 195

# Current count of branches on the namespaces to be transferred
tnfsindx = 0

Expand Down
17 changes: 0 additions & 17 deletions pagure_exporter/view/tkts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,12 @@


import sys
import time

from pagure_exporter.conf import standard
from pagure_exporter.view.dcrt import failure, general, section, success, warning
from pagure_exporter.work.tkts import MoveTkts


def callwait():
if standard.rateindx == standard.ratebond:
warning(f"Rate limit reached - {standard.ratebond} API requests made...")
general(
f"Waiting for {standard.waittime} second(s) and resetting the counter before resuming the transfer process" # noqa: E501
)
time.sleep(standard.waittime)
standard.rateindx = 0


def showtkts():
moveobjc = MoveTkts()
section("Attempting source namespace issue ticket count...")
Expand Down Expand Up @@ -67,7 +56,6 @@ def showtkts():
f"page in {pagerslt[2]} second(s)"
)
for jndx in standard.pagerslt:
callwait()
issurslt = moveobjc.itertkts(jndx)
section(
f"Migrating issue ticket {'with' if standard.movetags else 'without'} " # noqa: E501
Expand All @@ -77,7 +65,6 @@ def showtkts():
if issurslt[0] == 201:
general(f"Migrated to {issurslt[1]} in {issurslt[2]} second(s)")
if standard.movestat:
callwait()
section("Asserting issue ticket status...")
statrslt = moveobjc.iterstat()
if statrslt[0] == 200:
Expand All @@ -103,7 +90,6 @@ def showtkts():
f"Found {len(standard.issucmts)} entities in 0.00 second(s)"
)
for kndx in standard.issucmts:
callwait()
cmtsrslt = moveobjc.itercmts(kndx)
section(
f"Transferring comment (Entity {standard.cmtsqant} of "
Expand Down Expand Up @@ -156,7 +142,6 @@ def showtkts():
if tkidrslt[0] == 200:
if not tkidrslt[1]:
general(f"Information retrieved in {tkidrslt[2]} second(s)")
callwait()
issurslt = moveobjc.itertkts(standard.issurslt)
section(
f"Migrating issue ticket {'with' if standard.movetags else 'without'} "
Expand All @@ -166,7 +151,6 @@ def showtkts():
if issurslt[0] == 201:
general(f"Migrated to {issurslt[1]} in {issurslt[2]} second(s)")
if standard.movestat:
callwait()
section("Asserting issue ticket status...")
statrslt = moveobjc.iterstat()
if statrslt[0] == 200:
Expand All @@ -190,7 +174,6 @@ def showtkts():
standard.issucmts = standard.issurslt["comments"]
general(f"Found {len(standard.issucmts)} entities in 0.00 second(s)")
for kndx in standard.issucmts:
callwait()
cmtsrslt = moveobjc.itercmts(kndx)
section(
f"Transferring comment (Entity {standard.cmtsqant} of {len(standard.issucmts)})..." # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ interactions:
Content-Length:
- '902'
Content-Security-Policy:
- default-src 'self';script-src 'self' 'nonce-3iQkbdjullDxP2az3fv0yjZd5'; style-src
'self' 'nonce-3iQkbdjullDxP2az3fv0yjZd5'; object-src 'none';base-uri 'self';img-src
- default-src 'self';script-src 'self' 'nonce-EevIx0Ka0FRoI0p6gATbOMHJW'; style-src
'self' 'nonce-EevIx0Ka0FRoI0p6gATbOMHJW'; object-src 'none';base-uri 'self';img-src
'self' https:;connect-src 'self' https://pagure.io:8088;frame-src https://docs.pagure.org;frame-ancestors
https://pagure.io;
Content-Type:
- application/json
Date:
- Thu, 22 Feb 2024 09:31:02 GMT
- Mon, 04 Mar 2024 11:20:45 GMT
Keep-Alive:
- timeout=5, max=100
Referrer-Policy:
Expand Down Expand Up @@ -84,19 +84,19 @@ interactions:
CF-Cache-Status:
- MISS
CF-RAY:
- 859636be2a8f94bf-CCU
- 85f17aa0985d93c5-CCU
Connection:
- keep-alive
Content-Length:
- '30'
Content-Type:
- application/json
Date:
- Thu, 22 Feb 2024 09:31:03 GMT
- Mon, 04 Mar 2024 11:20:47 GMT
NEL:
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
Report-To:
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BYbUf%2BqttsXwZSTmmhMzV6BQUPxhUTdOHWhguzRe7l9CsqDuLrrOr4ZVLjy2ZajD5NEkuapDoBQKSJ1vmx4i%2Fvxl65wdyFEqGH1lOf6b718CZyShUB%2F81oPkIl1JUBbKuf3KMqDq%2Bxs%3D"}],"group":"cf-nel","max_age":604800}'
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=i18MUvBU0VxApaaL9X%2B%2BZa81j4yo1C1Qxro%2FMJKd7ehOMyF6kkYwOKoLZx5s1fE7%2FuG3gW2WckjraCkeb0WgeBmLfh0XVUdSWH8xEAxlZRwYwGSGD%2FL9B05WHODKWMTDlt7Gh5SmDAU%3D"}],"group":"cf-nel","max_age":604800}'
Server:
- cloudflare
Set-Cookie: ''
Expand All @@ -105,7 +105,7 @@ interactions:
content-security-policy:
- default-src 'none'
gitlab-lb:
- haproxy-main-33-lb-gprd
- haproxy-main-12-lb-gprd
gitlab-sv:
- api-gke-us-east1-b
referrer-policy:
Expand All @@ -119,11 +119,11 @@ interactions:
x-frame-options:
- SAMEORIGIN
x-gitlab-meta:
- '{"correlation_id":"197a17051210f1a341629ee0271ca983","version":"1"}'
- '{"correlation_id":"b5e1a7dacc7759a08ecb68794a542d3f","version":"1"}'
x-request-id:
- 197a17051210f1a341629ee0271ca983
- b5e1a7dacc7759a08ecb68794a542d3f
x-runtime:
- '0.019982'
- '0.021484'
status:
code: 401
message: Unauthorized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ interactions:
Content-Length:
- '66'
Content-Security-Policy:
- default-src 'self';script-src 'self' 'nonce-1cPl45KPL1XljMh6HeTWqtX1f'; style-src
'self' 'nonce-1cPl45KPL1XljMh6HeTWqtX1f'; object-src 'none';base-uri 'self';img-src
- default-src 'self';script-src 'self' 'nonce-EqK8qBKV7VbLC2XnbkRMkm6EV'; style-src
'self' 'nonce-EqK8qBKV7VbLC2XnbkRMkm6EV'; object-src 'none';base-uri 'self';img-src
'self' https:;connect-src 'self' https://pagure.io:8088;frame-src https://docs.pagure.org;frame-ancestors
https://pagure.io;
Content-Type:
- application/json
Date:
- Thu, 22 Feb 2024 09:31:25 GMT
- Mon, 04 Mar 2024 11:21:14 GMT
Keep-Alive:
- timeout=5, max=100
Referrer-Policy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ interactions:
Content-Length:
- '902'
Content-Security-Policy:
- default-src 'self';script-src 'self' 'nonce-yT5SVeHoBnIMuKGJTYFJbnvIP'; style-src
'self' 'nonce-yT5SVeHoBnIMuKGJTYFJbnvIP'; object-src 'none';base-uri 'self';img-src
- default-src 'self';script-src 'self' 'nonce-Mdd9YBY4dlVGRKqd1Wl7udTfR'; style-src
'self' 'nonce-Mdd9YBY4dlVGRKqd1Wl7udTfR'; object-src 'none';base-uri 'self';img-src
'self' https:;connect-src 'self' https://pagure.io:8088;frame-src https://docs.pagure.org;frame-ancestors
https://pagure.io;
Content-Type:
- application/json
Date:
- Thu, 22 Feb 2024 09:31:26 GMT
- Mon, 04 Mar 2024 11:21:16 GMT
Keep-Alive:
- timeout=5, max=100
Referrer-Policy:
Expand Down Expand Up @@ -84,19 +84,19 @@ interactions:
CF-Cache-Status:
- MISS
CF-RAY:
- 859637569bf594be-CCU
- 85f17b55ad9894b0-CCU
Connection:
- keep-alive
Content-Length:
- '35'
Content-Type:
- application/json
Date:
- Thu, 22 Feb 2024 09:31:27 GMT
- Mon, 04 Mar 2024 11:21:16 GMT
NEL:
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
Report-To:
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=H80VxgDn4kpKGhUHBDs3gCiuUS6E6IndHiUCGTsyvLjUMVe2S8qgRjYh2ueRiHdPtVVl9eXJalSCU%2F5sZ%2BSYWuGGcXroBxRFY7K3%2FM4s9LwwnnvFpYHe4Rj74oO9QhE9uk2LdkTsZqw%3D"}],"group":"cf-nel","max_age":604800}'
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=usHSKh04sFoN4KG5mEr8dRVoTN%2BrarHqh7dClHkXD6w7fH%2FkndkqF5kDUR3eyXB3ELDSHvXTE%2FLjPuCS2shTgU5MdCM67KbOlSJeAouWJ9yjK4tMa9fibtKU1Zd2C3zDIiez8IwW5bc%3D"}],"group":"cf-nel","max_age":604800}'
Server:
- cloudflare
Set-Cookie: ''
Expand All @@ -105,9 +105,9 @@ interactions:
content-security-policy:
- default-src 'none'
gitlab-lb:
- haproxy-main-39-lb-gprd
- haproxy-main-55-lb-gprd
gitlab-sv:
- api-gke-us-east1-b
- api-gke-us-east1-c
referrer-policy:
- strict-origin-when-cross-origin
strict-transport-security:
Expand All @@ -119,11 +119,11 @@ interactions:
x-frame-options:
- SAMEORIGIN
x-gitlab-meta:
- '{"correlation_id":"8d0db6fcfc55f80560df54fd9392fab8","version":"1"}'
- '{"correlation_id":"88f21d2ebcf80fc92b28937c6eb2e1a3","version":"1"}'
x-request-id:
- 8d0db6fcfc55f80560df54fd9392fab8
- 88f21d2ebcf80fc92b28937c6eb2e1a3
x-runtime:
- '0.044481'
- '0.045448'
status:
code: 404
message: Not Found
Expand Down
Loading

0 comments on commit ca4c12e

Please sign in to comment.