qontract-reconcile 0.10.2.dev156__py3-none-any.whl → 0.10.2.dev157__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.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev156
3
+ Version: 0.10.2.dev157
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -89,7 +89,7 @@ reconcile/openshift_upgrade_watcher.py,sha256=9IB321hlRZZhzdaR9G3zoWAhVv0-KzNiEq
89
89
  reconcile/openshift_users.py,sha256=JUWLb13USlQ4KvXZVsi3JES4csZnXlH0plhxskg_p6A,5300
90
90
  reconcile/openshift_vault_secrets.py,sha256=9rTqV6wzCQx2Oh712E_Xj8wMG7u8Oh-pY8DWjlv4mZw,1660
91
91
  reconcile/quay_base.py,sha256=h5xNjb7EZm8L2JgpO42r6w0UA4im5dabZXJSIW69zKU,1987
92
- reconcile/quay_membership.py,sha256=YDLY7ayDsatEpYCe_iMdf3pkvrbmN8mAwrDKUJUa4Lg,6260
92
+ reconcile/quay_membership.py,sha256=cmeoRdr3-wVlymNHVhzhW0W-Tq6qt1hd2OOIhGXsmrY,6398
93
93
  reconcile/quay_mirror.py,sha256=0KtQFwrvMNtlsPJ9F_-ICaVIjgIUjFxqipvAPcvyg3Q,15338
94
94
  reconcile/quay_mirror_org.py,sha256=tXKuF6JtmaNRwu8_g_65U_Vpd6sFBYeXmJA-flVhylE,10764
95
95
  reconcile/quay_permissions.py,sha256=9KOutS1w4RFQqkvMSy54VtsKNx56-phzP6yI_rEW-B8,4244
@@ -227,7 +227,7 @@ reconcile/glitchtip_project_alerts/integration.py,sha256=BgMx-NyV9mTuv7Sotb2OioC
227
227
  reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
228
  reconcile/glitchtip_project_dsn/integration.py,sha256=2iugub-kHYkHNK33n0v9_TeWonuxCPah_VkoTPvaajE,8077
229
229
  reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
- reconcile/gql_definitions/introspection.json,sha256=8tA2_ZuvhmWLNRV1-JvZeVTdyUDYAVvdSe0mvxm_Uag,2286927
230
+ reconcile/gql_definitions/introspection.json,sha256=cO8ytMUFP2x_mD8oq0pkcrgSFSj7epYDcdQTJCGTw-I,2289286
231
231
  reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
232
  reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
233
233
  reconcile/gql_definitions/acs/acs_policies.py,sha256=bN5i4mks10Z23KJSj7jqp966Osq2dps4d-sPH9gjxEA,7008
@@ -392,7 +392,7 @@ reconcile/gql_definitions/openshift_groups/managed_roles.py,sha256=rsHMgDWwnh0RR
392
392
  reconcile/gql_definitions/openshift_serviceaccount_tokens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
393
393
  reconcile/gql_definitions/openshift_serviceaccount_tokens/tokens.py,sha256=FeraeQThHl2UbhTuCPDwm3ltczF_jfZn5E3Squ8-znw,3313
394
394
  reconcile/gql_definitions/quay_membership/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
- reconcile/gql_definitions/quay_membership/quay_membership.py,sha256=H2xHvdNr3K0QzB2dituwStUIWCqePt35dkgeUZycECM,2824
395
+ reconcile/gql_definitions/quay_membership/quay_membership.py,sha256=MKBkrE-1YYelaAAxOdpqUwCo45kOVC8q29vXArqK_zM,3075
396
396
  reconcile/gql_definitions/rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
397
397
  reconcile/gql_definitions/rhidp/organizations.py,sha256=dW9y3ewFu3E-DFrZAi_SEewHYR0MWYeOB52vwnVcq5E,2580
398
398
  reconcile/gql_definitions/service_dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -797,7 +797,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
797
797
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
798
798
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
799
799
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
800
- qontract_reconcile-0.10.2.dev156.dist-info/METADATA,sha256=j3xvjWZiv45YI5cdQQPptbUILTtSgSWO_HpQvg_0O48,24627
801
- qontract_reconcile-0.10.2.dev156.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
802
- qontract_reconcile-0.10.2.dev156.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
803
- qontract_reconcile-0.10.2.dev156.dist-info/RECORD,,
800
+ qontract_reconcile-0.10.2.dev157.dist-info/METADATA,sha256=a0v4VwAX4CUOblutkjBWxC1LUvx_HwYZUsCE6exNgto,24627
801
+ qontract_reconcile-0.10.2.dev157.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
802
+ qontract_reconcile-0.10.2.dev157.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
803
+ qontract_reconcile-0.10.2.dev157.dist-info/RECORD,,
@@ -11541,6 +11541,30 @@
11541
11541
  },
11542
11542
  "isDeprecated": false,
11543
11543
  "deprecationReason": null
11544
+ },
11545
+ {
11546
+ "name": "external_users",
11547
+ "description": null,
11548
+ "args": [],
11549
+ "type": {
11550
+ "kind": "NON_NULL",
11551
+ "name": null,
11552
+ "ofType": {
11553
+ "kind": "LIST",
11554
+ "name": null,
11555
+ "ofType": {
11556
+ "kind": "NON_NULL",
11557
+ "name": null,
11558
+ "ofType": {
11559
+ "kind": "OBJECT",
11560
+ "name": "ExternalUser_v1",
11561
+ "ofType": null
11562
+ }
11563
+ }
11564
+ }
11565
+ },
11566
+ "isDeprecated": false,
11567
+ "deprecationReason": null
11544
11568
  }
11545
11569
  ],
11546
11570
  "inputFields": null,
@@ -27145,13 +27169,21 @@
27145
27169
  "description": null,
27146
27170
  "args": [],
27147
27171
  "type": {
27148
- "kind": "NON_NULL",
27149
- "name": null,
27150
- "ofType": {
27151
- "kind": "SCALAR",
27152
- "name": "String",
27153
- "ofType": null
27154
- }
27172
+ "kind": "SCALAR",
27173
+ "name": "String",
27174
+ "ofType": null
27175
+ },
27176
+ "isDeprecated": false,
27177
+ "deprecationReason": null
27178
+ },
27179
+ {
27180
+ "name": "quay_username",
27181
+ "description": null,
27182
+ "args": [],
27183
+ "type": {
27184
+ "kind": "SCALAR",
27185
+ "name": "String",
27186
+ "ofType": null
27155
27187
  },
27156
27188
  "isDeprecated": false,
27157
27189
  "deprecationReason": null
@@ -27179,6 +27211,26 @@
27179
27211
  },
27180
27212
  "isDeprecated": false,
27181
27213
  "deprecationReason": null
27214
+ },
27215
+ {
27216
+ "name": "roles",
27217
+ "description": null,
27218
+ "args": [],
27219
+ "type": {
27220
+ "kind": "LIST",
27221
+ "name": null,
27222
+ "ofType": {
27223
+ "kind": "NON_NULL",
27224
+ "name": null,
27225
+ "ofType": {
27226
+ "kind": "OBJECT",
27227
+ "name": "Role_v1",
27228
+ "ofType": null
27229
+ }
27230
+ }
27231
+ },
27232
+ "isDeprecated": false,
27233
+ "deprecationReason": null
27182
27234
  }
27183
27235
  ],
27184
27236
  "inputFields": null,
@@ -37,6 +37,9 @@ query QuayMembership {
37
37
  bots {
38
38
  quay_username
39
39
  }
40
+ external_users {
41
+ quay_username
42
+ }
40
43
  expirationDate
41
44
  }
42
45
  }
@@ -72,9 +75,14 @@ class BotV1(ConfiguredBaseModel):
72
75
  quay_username: Optional[str] = Field(..., alias="quay_username")
73
76
 
74
77
 
78
+ class ExternalUserV1(ConfiguredBaseModel):
79
+ quay_username: Optional[str] = Field(..., alias="quay_username")
80
+
81
+
75
82
  class RoleV1(ConfiguredBaseModel):
76
83
  users: list[UserV1] = Field(..., alias="users")
77
84
  bots: list[BotV1] = Field(..., alias="bots")
85
+ external_users: list[ExternalUserV1] = Field(..., alias="external_users")
78
86
  expiration_date: Optional[str] = Field(..., alias="expirationDate")
79
87
 
80
88
 
@@ -5,6 +5,7 @@ from collections.abc import Sequence
5
5
  from reconcile.gql_definitions.quay_membership import quay_membership
6
6
  from reconcile.gql_definitions.quay_membership.quay_membership import (
7
7
  BotV1,
8
+ ExternalUserV1,
8
9
  PermissionQuayOrgTeamV1,
9
10
  UserV1,
10
11
  )
@@ -80,7 +81,7 @@ def fetch_current_state(quay_api_store):
80
81
  return state
81
82
 
82
83
 
83
- def get_usernames(users: Sequence[UserV1 | BotV1]) -> list[str]:
84
+ def get_usernames(users: Sequence[UserV1 | BotV1 | ExternalUserV1]) -> list[str]:
84
85
  return [u.quay_username for u in users if u.quay_username]
85
86
 
86
87
 
@@ -92,7 +93,11 @@ def fetch_desired_state():
92
93
  p = process_permission(permission)
93
94
  members: list[str] = []
94
95
  for role in expiration.filter(permission.roles):
95
- members += get_usernames(role.users) + get_usernames(role.bots)
96
+ members += (
97
+ get_usernames(role.users)
98
+ + get_usernames(role.bots)
99
+ + get_usernames(role.external_users)
100
+ )
96
101
 
97
102
  state.add(p, members)
98
103