qontract-reconcile 0.10.1rc953__py3-none-any.whl → 0.10.1rc955__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/RECORD +11 -11
- reconcile/gitlab_housekeeping.py +5 -1
- reconcile/test/test_gitlab_housekeeping.py +1 -0
- reconcile/utils/gitlab_api.py +6 -4
- reconcile/utils/saasherder/saasherder.py +3 -2
- reconcile/utils/terrascript_aws_client.py +1 -1
- tools/qontract_cli.py +5 -1
- {qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc955
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
{qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/RECORD
RENAMED
@@ -30,7 +30,7 @@ reconcile/github_repo_permissions_validator.py,sha256=dcbXdUx6imjNchjp3pg9-z1i7l
|
|
30
30
|
reconcile/github_users.py,sha256=nfTq78QRONIfDVj-5O3bD6psllJjzWFnog-EJ1WqFPU,3672
|
31
31
|
reconcile/github_validator.py,sha256=cVTVxJIGR4a1Jz8wrdXEAb_CMpXUzvykVmUURX4cook,917
|
32
32
|
reconcile/gitlab_fork_compliance.py,sha256=5joAIGOOLhHme1ipa7ZQeQkUOVe3dKbRO1wJtTwyNR4,4178
|
33
|
-
reconcile/gitlab_housekeeping.py,sha256=
|
33
|
+
reconcile/gitlab_housekeeping.py,sha256=1ewS9HQRK-m14Uvok8ZbSb_yn_TksMontSk3blTe7ZM,22043
|
34
34
|
reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4534
|
35
35
|
reconcile/gitlab_members.py,sha256=PrJE9OhDRdGG_gHM_77nQojLb4B18jtUu8DxgLsRS88,8417
|
36
36
|
reconcile/gitlab_mr_sqs_consumer.py,sha256=O46mdziPgGOndbU-0_UJKJVUaiEoVzJPEgKm4_UvYoI,2571
|
@@ -501,7 +501,7 @@ reconcile/test/test_gabi_authorized_users.py,sha256=6XnV5Q9inxP81ktGMVKyWucjBTUj
|
|
501
501
|
reconcile/test/test_gcr_mirror.py,sha256=A0y8auKZzr62-mGoxSQ__JnN0-ijZUltzjwR5miBgso,490
|
502
502
|
reconcile/test/test_github_org.py,sha256=j3KeB4OnSln1gm2hidce49xdMru-j75NS3cM-AEgzZc,4511
|
503
503
|
reconcile/test/test_github_repo_invites.py,sha256=UVaDlxSxi5iooyUbz8F11d7cvINHLK32Qx9b7xrDd-k,3347
|
504
|
-
reconcile/test/test_gitlab_housekeeping.py,sha256=
|
504
|
+
reconcile/test/test_gitlab_housekeeping.py,sha256=WQJ79gGQ-OixLH9JIo16fyTZC7QG7ItlCY16MGEkV-s,10064
|
505
505
|
reconcile/test/test_gitlab_labeler.py,sha256=PmYXiU2g0_O5OTdMGPzdeqBAfat92U9bhjjfeyiGSmQ,4336
|
506
506
|
reconcile/test/test_gitlab_members.py,sha256=kaCOA02eZSrSMkzHmaLwWW3LY6Af0ciLSEP4PlMLvOU,9949
|
507
507
|
reconcile/test/test_gitlab_permissions.py,sha256=vPFEsdjyP-lO8pc2rN6acMns3Sjz9YJs16msbBR8DZc,2736
|
@@ -657,7 +657,7 @@ reconcile/utils/filtering.py,sha256=S4PbMHuFr3ED0P2Q_ea5CAaB7FimI62B-F5YTaKrphA,
|
|
657
657
|
reconcile/utils/git.py,sha256=actOWI2HiNpMIV6nHCzinhRa6b04Y9plWOCcPQa8lNA,1437
|
658
658
|
reconcile/utils/git_secrets.py,sha256=y1rEhwA8DyDpBSAEuhMS7Y2X3mpxT2zQ4zyDFkhLe_g,1936
|
659
659
|
reconcile/utils/github_api.py,sha256=R8OvqyPdnRqvP-Efnv9RvIcbBlb4M0KC4RlbnJMD0Tg,2426
|
660
|
-
reconcile/utils/gitlab_api.py,sha256=
|
660
|
+
reconcile/utils/gitlab_api.py,sha256=6ZU77wzwYKVbJcuXrG0ZMvAsB-_N9On84LQiT_yZdeE,30556
|
661
661
|
reconcile/utils/gpg.py,sha256=EKG7_fdMv8BMlV5yUdPiqoTx-KrzmVSEAl2sLkaKwWI,1123
|
662
662
|
reconcile/utils/gql.py,sha256=IGhxzBcuebbapDKLseevEThSsxa_eDCPNpo3A4VnOS4,14066
|
663
663
|
reconcile/utils/grouping.py,sha256=vr9SFHZ7bqmHYrvYcEZt-Er3-yQYfAAdq5sHLZVmXPY,456
|
@@ -706,7 +706,7 @@ reconcile/utils/state.py,sha256=sJbfxvSTnHlHfgQRc_vRz-U_9NnVFGq-W8DX3ZHkfeY,1635
|
|
706
706
|
reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
|
707
707
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
708
708
|
reconcile/utils/terraform_client.py,sha256=hyMtNVBuDHbqQNSsdG5kTIvJRyOt23tFuWAspPf_Lqo,32161
|
709
|
-
reconcile/utils/terrascript_aws_client.py,sha256=
|
709
|
+
reconcile/utils/terrascript_aws_client.py,sha256=i0ubNIacvKv4pvWfXoO4mkAJumED3DCTgCD8n7TlFXA,276720
|
710
710
|
reconcile/utils/three_way_diff_strategy.py,sha256=OniTnogBkdgy_7Xg51N1MgjS-Qtk8uM1ccjWaiXxiV8,4895
|
711
711
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
712
712
|
reconcile/utils/vault.py,sha256=f4mJLKE5vGMvNBbo8Xe0dPFLF5-Vchs5Ry5lyf0FuMg,14902
|
@@ -795,7 +795,7 @@ reconcile/utils/runtime/sharding.py,sha256=r0ieUtNed7NvknSw6qQrCkKpVXE1shuHGnfFc
|
|
795
795
|
reconcile/utils/saasherder/__init__.py,sha256=J3MBZBFa5YmhqYm08QsjBXz8mFcVOCiOCkyIcw41t7E,343
|
796
796
|
reconcile/utils/saasherder/interfaces.py,sha256=C2wrw34OXypshVocAsPrVZsSHptgw4g9u7Haa2wulZQ,9087
|
797
797
|
reconcile/utils/saasherder/models.py,sha256=z8ln03zi2a8cu716NcNUDHp8Dv1VcVbhqdWVxCl7x9A,10148
|
798
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
798
|
+
reconcile/utils/saasherder/saasherder.py,sha256=v5j0BG9dvX5xNj4c-WuOfl6YLT9sMsttlKU_tgyd77E,84506
|
799
799
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
800
800
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
801
801
|
reconcile/utils/terraform/config_client.py,sha256=3gUIIIEv52Vx7-VgQ2FZYfCCrfqUv_5gw_TQ3mbLcTs,4666
|
@@ -815,7 +815,7 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
|
|
815
815
|
tools/app_interface_reporter.py,sha256=uy9eRHf6EdvD8ZY2WYdroGXm18DOdnqVZyxaWN3Bm_0,17724
|
816
816
|
tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
|
817
817
|
tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
|
818
|
-
tools/qontract_cli.py,sha256=
|
818
|
+
tools/qontract_cli.py,sha256=R2Qo_zDwTBTkDDuYREa2lG7xUxwkjW_lrTIk6mVT2gY,124485
|
819
819
|
tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
|
820
820
|
tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
|
821
821
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -846,8 +846,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
|
|
846
846
|
tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
|
847
847
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
848
848
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
849
|
-
qontract_reconcile-0.10.
|
850
|
-
qontract_reconcile-0.10.
|
851
|
-
qontract_reconcile-0.10.
|
852
|
-
qontract_reconcile-0.10.
|
853
|
-
qontract_reconcile-0.10.
|
849
|
+
qontract_reconcile-0.10.1rc955.dist-info/METADATA,sha256=eUH9cYY22pXGAL4R6D7LJv-xWkQ-Wh76a3AotT3qApY,2262
|
850
|
+
qontract_reconcile-0.10.1rc955.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
851
|
+
qontract_reconcile-0.10.1rc955.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
852
|
+
qontract_reconcile-0.10.1rc955.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
853
|
+
qontract_reconcile-0.10.1rc955.dist-info/RECORD,,
|
reconcile/gitlab_housekeeping.py
CHANGED
@@ -277,7 +277,11 @@ def is_good_to_merge(labels):
|
|
277
277
|
|
278
278
|
def is_rebased(mr, gl: GitLabApi) -> bool:
|
279
279
|
target_branch = mr.target_branch
|
280
|
-
head = gl.project.commits.list(
|
280
|
+
head = gl.project.commits.list(
|
281
|
+
ref_name=target_branch,
|
282
|
+
per_page=1,
|
283
|
+
page=1,
|
284
|
+
)[0].id
|
281
285
|
result = gl.project.repository_compare(mr.sha, head)
|
282
286
|
return len(result["commits"]) == 0
|
283
287
|
|
reconcile/utils/gitlab_api.py
CHANGED
@@ -694,7 +694,7 @@ class GitLabApi: # pylint: disable=too-many-public-methods
|
|
694
694
|
|
695
695
|
def get_user(self, username):
|
696
696
|
gitlab_request.labels(integration=INTEGRATION_NAME).inc()
|
697
|
-
user = self.gl.users.list(search=username)
|
697
|
+
user = self.gl.users.list(search=username, page=1, per_page=1)
|
698
698
|
if len(user) == 0:
|
699
699
|
logging.error(username + " user not found")
|
700
700
|
return
|
@@ -707,7 +707,8 @@ class GitLabApi: # pylint: disable=too-many-public-methods
|
|
707
707
|
if p is None:
|
708
708
|
return []
|
709
709
|
gitlab_request.labels(integration=INTEGRATION_NAME).inc()
|
710
|
-
|
710
|
+
# TODO: get_all may send multiple requests, update metrics accordingly
|
711
|
+
return p.hooks.list(per_page=100, get_all=True)
|
711
712
|
|
712
713
|
def create_project_hook(self, repo_url, data):
|
713
714
|
p = self.get_project(repo_url)
|
@@ -773,7 +774,8 @@ class GitLabApi: # pylint: disable=too-many-public-methods
|
|
773
774
|
break
|
774
775
|
# labels
|
775
776
|
gitlab_request.labels(integration=INTEGRATION_NAME).inc()
|
776
|
-
|
777
|
+
# TODO: this may send multiple requests, update metrics accordingly
|
778
|
+
label_events = mr.resourcelabelevents.list(get_all=True)
|
777
779
|
for label in reversed(label_events):
|
778
780
|
if label.action == "add" and label.label["name"] in hold_labels:
|
779
781
|
username = label.user["username"]
|
@@ -854,7 +856,7 @@ class GitLabApi: # pylint: disable=too-many-public-methods
|
|
854
856
|
def get_commit_sha(self, ref: str, repo_url: str) -> str:
|
855
857
|
gitlab_request.labels(integration=INTEGRATION_NAME).inc()
|
856
858
|
project = self.get_project(repo_url)
|
857
|
-
commits = project.commits.list(ref_name=ref, per_page=1)
|
859
|
+
commits = project.commits.list(ref_name=ref, per_page=1, page=1)
|
858
860
|
return commits[0].id
|
859
861
|
|
860
862
|
def repository_compare(
|
@@ -812,7 +812,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
812
812
|
if not self.gitlab:
|
813
813
|
raise Exception("gitlab is not initialized")
|
814
814
|
project = self.gitlab.get_project(url)
|
815
|
-
commits = project.commits.list(ref_name=ref, per_page=1)
|
815
|
+
commits = project.commits.list(ref_name=ref, per_page=1, page=1)
|
816
816
|
commit_sha = commits[0].id
|
817
817
|
|
818
818
|
return commit_sha
|
@@ -969,7 +969,8 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
969
969
|
else True
|
970
970
|
)
|
971
971
|
consolidated_parameters = spec.parameters(adjust=False)
|
972
|
-
|
972
|
+
image = consolidated_parameters.get("image", {})
|
973
|
+
if isinstance(image, dict) and not image.get("tag"):
|
973
974
|
commit_sha = self._get_commit_sha(url, ref, github)
|
974
975
|
image_tag = commit_sha[:hash_length]
|
975
976
|
consolidated_parameters.setdefault("image", {})["tag"] = image_tag
|
@@ -5391,7 +5391,7 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
5391
5391
|
if "gitlab" in url:
|
5392
5392
|
gitlab = self.init_gitlab()
|
5393
5393
|
project = gitlab.get_project(url)
|
5394
|
-
commits = project.commits.list(ref_name=ref, per_page=1)
|
5394
|
+
commits = project.commits.list(ref_name=ref, per_page=1, page=1)
|
5395
5395
|
return commits[0].id
|
5396
5396
|
|
5397
5397
|
return ""
|
tools/qontract_cli.py
CHANGED
@@ -2187,7 +2187,11 @@ def app_interface_merge_history(ctx):
|
|
2187
2187
|
settings = queries.get_app_interface_settings()
|
2188
2188
|
instance = queries.get_gitlab_instance()
|
2189
2189
|
gl = GitLabApi(instance, project_url=settings["repoUrl"], settings=settings)
|
2190
|
-
merge_requests = gl.project.mergerequests.list(
|
2190
|
+
merge_requests = gl.project.mergerequests.list(
|
2191
|
+
state=MRState.MERGED,
|
2192
|
+
per_page=100,
|
2193
|
+
get_all=True,
|
2194
|
+
)
|
2191
2195
|
|
2192
2196
|
columns = [
|
2193
2197
|
"id",
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc953.dist-info → qontract_reconcile-0.10.1rc955.dist-info}/top_level.txt
RENAMED
File without changes
|