qontract-reconcile 0.10.1rc179__py3-none-any.whl → 0.10.1rc181__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc179
3
+ Version: 0.10.1rc181
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
@@ -92,7 +92,7 @@ reconcile/query_validator.py,sha256=oLEZIAsQCzxmmZ7b9dSw-OKuEjpI1dbVu4XfCfjpmi8,
92
92
  reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
93
93
  reconcile/resource_scraper.py,sha256=vo1N9vLJCYWvXlTwFRIpEuWjx_39ZV9zxJlpoPq4g3U,2330
94
94
  reconcile/saas_file_validator.py,sha256=WdRVwAdEWO3uH3atefZhZRiQEZje7SQBfVZI6L6c7cA,1955
95
- reconcile/sendgrid_teammates.py,sha256=SzPY9Sq8da9UWBJPdnfPA5wE9XFRy5oXOHOwiKFbPS0,4578
95
+ reconcile/sendgrid_teammates.py,sha256=oO8QbLb4s1o8A6CGiCagN9CmS05BSS_WLztuY0Ym9D8,4773
96
96
  reconcile/service_dependencies.py,sha256=PMKP9vc6oL-78rzyF_RE8DzLSQMSqN8vCqt9sWpBLAM,4470
97
97
  reconcile/signalfx_endpoint_monitoring.py,sha256=D1m8iq0EAKie0OD59FOcVCtpWWZ7xlo6lwBS9urwMIk,2894
98
98
  reconcile/slack_base.py,sha256=K3fSYx46G1djoPb07_C9j6ChhMCt5LgV5l6v2TFkNZk,3479
@@ -143,7 +143,7 @@ reconcile/cna/assets/asset_factory.py,sha256=7T7X_J6xIsoGETqBRI45_EyIKEdQcnRPt_G
143
143
  reconcile/cna/assets/null.py,sha256=Fby1Fbn7oNRIGNasdyhRDvXJ0ktpxv-pUAPN0lZWSzk,1684
144
144
  reconcile/glitchtip/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
145
145
  reconcile/glitchtip/integration.py,sha256=52TnE8OH3I-GMg7p3IvlbnV-ysgnGBM2Rt57Hi0KI7s,6216
146
- reconcile/glitchtip/reconciler.py,sha256=U0ywAmdKjBU8Y75_YJhKEbTUJmX0IDjHvgLDb31xXPY,11608
146
+ reconcile/glitchtip/reconciler.py,sha256=37XiDur1-6sAkYFju2xLI8ybbtkraLghdV2bibKyEiU,11499
147
147
  reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
148
  reconcile/glitchtip_project_dsn/integration.py,sha256=IvFlSYumDPhUw7gLfFX1P8tg-7Vns0ot2-Nqf2_sE18,7997
149
149
  reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -552,7 +552,7 @@ reconcile/utils/vaultsecretref.py,sha256=3Ed2uBy36TzSvL0B-l4FoWQqB2SbBKDKEuUPIO6
552
552
  reconcile/utils/cloud_resource_best_practice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
553
553
  reconcile/utils/cloud_resource_best_practice/aws_rds.py,sha256=ZMQ7jT1HQbPIw0yJ7dXlDc6IETKUsLX3azWOvf5QLe0,2246
554
554
  reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5__Dcl7yt0,258
555
- reconcile/utils/glitchtip/client.py,sha256=xra8V8R6p0NGISD5PWbl4uSIecoIm7xBqVTILkfRSh8,8454
555
+ reconcile/utils/glitchtip/client.py,sha256=XKJtIDFBQv0q7n6GwVof8nxJNVuqqtRiCSgyuZkho0E,8420
556
556
  reconcile/utils/glitchtip/models.py,sha256=hZphtws-06IJUdd5uTpt22r8cv5Z4MLNE4OTo3zo6Lc,3800
557
557
  reconcile/utils/mr/__init__.py,sha256=KrOHqf4qbF-2Sk73xGYDQxeAC53n0mlXgcYspbeNEkI,2366
558
558
  reconcile/utils/mr/app_interface_reporter.py,sha256=oksi5DjFO2y7dVnj6RTRhbocz-BdOZ25921UWZ9ecpY,1725
@@ -611,8 +611,8 @@ tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
611
611
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
612
612
  tools/test/test_sd_app_sre_alert_report.py,sha256=JeLhgzpKCPgLvptwg_4ZvJHLVWKNG1T5845HXTkMBxA,1826
613
613
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
614
- qontract_reconcile-0.10.1rc179.dist-info/METADATA,sha256=4SywciAMRsGbYub1P0P7s2vsNUx-juCLaG1H4p06Lxk,2320
615
- qontract_reconcile-0.10.1rc179.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
616
- qontract_reconcile-0.10.1rc179.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
617
- qontract_reconcile-0.10.1rc179.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
618
- qontract_reconcile-0.10.1rc179.dist-info/RECORD,,
614
+ qontract_reconcile-0.10.1rc181.dist-info/METADATA,sha256=l6FSgHTQm880panBhJvpX_2jEU8kPolK_nc9dfPy5xg,2320
615
+ qontract_reconcile-0.10.1rc181.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
616
+ qontract_reconcile-0.10.1rc181.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
617
+ qontract_reconcile-0.10.1rc181.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
618
+ qontract_reconcile-0.10.1rc181.dist-info/RECORD,,
@@ -35,8 +35,6 @@ class GlitchtipReconciler:
35
35
  if not self.dry_run:
36
36
  self.client.delete_project(
37
37
  organization_slug=organization_slug,
38
- # there is always at least one team
39
- team_slug=project.teams[0].slug,
40
38
  slug=project.slug,
41
39
  )
42
40
 
@@ -44,27 +44,37 @@ def fetch_desired_state(users):
44
44
  @retry()
45
45
  def fetch_current_state(sg_client):
46
46
  state = []
47
+ limit = 100
47
48
 
48
49
  # pending invites
49
- limit = 300
50
- invites = sg_client.teammates.pending.get({"limit": limit}).to_dict["result"]
51
- if len(invites) == limit:
52
- raise RuntimeError(
53
- "too many pending invites and i was too lazy to implement paging. take that future me"
54
- )
55
- for invite in invites:
56
- t = Teammate(invite["email"], pending_token=invite["token"])
57
- state.append(t)
50
+ offset = 0
51
+ while True:
52
+ invites = sg_client.teammates.pending.get(
53
+ query_params={"limit": limit, "offset": offset}
54
+ ).to_dict["result"]
55
+ if not invites:
56
+ break
57
+ for invite in invites:
58
+ t = Teammate(invite["email"], pending_token=invite["token"])
59
+ state.append(t)
60
+ offset += limit
58
61
 
59
62
  # current teammates
60
- teammates = sg_client.teammates.get().to_dict["result"]
61
- for teammate in teammates:
62
- if teammate["user_type"] == "owner":
63
- # we want to ignore the root account (owner account)
64
- continue
65
-
66
- t = Teammate(teammate["email"], username=teammate["username"])
67
- state.append(t)
63
+ offset = 0
64
+ while True:
65
+ teammates = sg_client.teammates.get(
66
+ query_params={"limit": limit, "offset": offset}
67
+ ).to_dict["result"]
68
+ if not teammates:
69
+ break
70
+ for teammate in teammates:
71
+ if teammate["user_type"] == "owner":
72
+ # we want to ignore the root account (owner account)
73
+ continue
74
+
75
+ t = Teammate(teammate["email"], username=teammate["username"])
76
+ state.append(t)
77
+ offset += limit
68
78
 
69
79
  return state
70
80
 
@@ -145,10 +145,10 @@ class GlitchtipClient:
145
145
  )
146
146
  )
147
147
 
148
- def delete_project(self, organization_slug: str, team_slug: str, slug: str) -> None:
148
+ def delete_project(self, organization_slug: str, slug: str) -> None:
149
149
  """Delete a project."""
150
150
  self._delete(
151
- f"/api/0/teams/{organization_slug}/{team_slug}/projects/{slug}/",
151
+ f"/api/0/projects/{organization_slug}/{slug}/",
152
152
  )
153
153
 
154
154
  def project_key(self, organization_slug: str, project_slug: str) -> ProjectKey: