qontract-reconcile 0.10.2.dev255__py3-none-any.whl → 0.10.2.dev256__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.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/METADATA +3 -3
- {qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/RECORD +14 -14
- reconcile/gql_definitions/common/users.py +0 -1
- reconcile/gql_definitions/fragments/user.py +0 -1
- reconcile/gql_definitions/membershipsources/roles.py +0 -2
- reconcile/gql_definitions/openshift_groups/managed_roles.py +0 -1
- reconcile/gql_definitions/slack_usergroups/permissions.py +0 -1
- reconcile/gql_definitions/slack_usergroups/users.py +0 -1
- reconcile/queries.py +0 -2
- reconcile/slack_usergroups.py +1 -1
- reconcile/utils/membershipsources/models.py +0 -1
- reconcile/utils/slack_api.py +12 -3
- {qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev256
|
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
|
@@ -392,7 +392,7 @@ these tools for static analysis and type checking:
|
|
392
392
|
The [Makefile](Makefile) contains several targets to help with testing, linting,
|
393
393
|
formatting, and type checking:
|
394
394
|
|
395
|
-
- `make all-
|
395
|
+
- `make all-tests`: Run all available tests.
|
396
396
|
- `make linter-test`: Run the linter and formatter tests.
|
397
397
|
- `make types-test`: Run the type checker tests.
|
398
398
|
- `make qenerate-test`: Run the query classes generation tests.
|
@@ -422,7 +422,7 @@ Start the [qontract-server](https://github.com/app-sre/qontract-server) in a dif
|
|
422
422
|
Run this in the root dir of `qontract-server` repo:
|
423
423
|
|
424
424
|
```shell
|
425
|
-
make dev
|
425
|
+
make build-dev
|
426
426
|
```
|
427
427
|
|
428
428
|
### Trigger integration
|
{qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/RECORD
RENAMED
@@ -88,7 +88,7 @@ reconcile/quay_mirror.py,sha256=PBooiA0ShZpWYfO6oeKFqYYT6Syi7Q8JJD9kj0wRRLg,1403
|
|
88
88
|
reconcile/quay_mirror_org.py,sha256=I-tEqRHLL6uFqbSi7qCfPuDNoae7EAI2U68NbDOhmv8,10809
|
89
89
|
reconcile/quay_permissions.py,sha256=9KOutS1w4RFQqkvMSy54VtsKNx56-phzP6yI_rEW-B8,4244
|
90
90
|
reconcile/quay_repos.py,sha256=cuEYG0HUe0ut5yvLdEwOF5-CmccpXQHRb_wDazvDrvQ,6895
|
91
|
-
reconcile/queries.py,sha256=
|
91
|
+
reconcile/queries.py,sha256=PRlDXp-ViYjky3k4-Cvf6FptraOpzVpsZUluUEJW7II,49886
|
92
92
|
reconcile/query_validator.py,sha256=MSh5pKLBksws4AqfuvT8nrIGucIbqX-IOzYyPYTLO7k,1491
|
93
93
|
reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
|
94
94
|
reconcile/resource_scraper.py,sha256=znXCHrU7YwPfKuxGBiUrV7T1tYtn4vlz9qmZlfy6Flg,2307
|
@@ -99,7 +99,7 @@ reconcile/sendgrid_teammates.py,sha256=oO8QbLb4s1o8A6CGiCagN9CmS05BSS_WLztuY0Ym9
|
|
99
99
|
reconcile/service_dependencies.py,sha256=G2qCuYFc8wQLpRxkdhmibxSAl3nUM3hcan4x50W_mCA,4335
|
100
100
|
reconcile/signalfx_endpoint_monitoring.py,sha256=Nqgsg1cflSd2nNnm89y_e8c--7xLUqTrKOHkDs-qADE,2868
|
101
101
|
reconcile/slack_base.py,sha256=I-msunWxfgu5bSwXYulGbtLjxUB_tRmTCAUCU-3nabI,3484
|
102
|
-
reconcile/slack_usergroups.py,sha256=
|
102
|
+
reconcile/slack_usergroups.py,sha256=HYuzaT4P7mX1EGG9w6rocx2sgTVRbAkIgcBsxNRY2XA,30190
|
103
103
|
reconcile/sql_query.py,sha256=auZCWe6dytsDp83Imfo4zqkpMCLRXU007IUlPeUE3j4,26376
|
104
104
|
reconcile/status.py,sha256=cY4IJFXemhxptRJqR4qaaOWqei9e4jgLXuVSGajMsjg,544
|
105
105
|
reconcile/status_board.py,sha256=3AiFdG-W4sKdU_pq9sKANtpgSoOGi8JwGMEHu3KetDQ,15298
|
@@ -285,7 +285,7 @@ reconcile/gql_definitions/common/saasherder_settings.py,sha256=nqQLcMwYxLseqq0BE
|
|
285
285
|
reconcile/gql_definitions/common/slack_workspaces.py,sha256=2o0kgi4QiaRuNmZJnc_By4F6NsKIdRaXkrufRQw7Nok,1753
|
286
286
|
reconcile/gql_definitions/common/smtp_client_settings.py,sha256=JU6t6D-Qj-z1gLlgUiHKe0W7AxWQdty9jlv-ig_43tM,2248
|
287
287
|
reconcile/gql_definitions/common/state_aws_account.py,sha256=LAdpCG2-ykVpWBPO0Zu1WvG-hwKXyDC0fJQxJRpbqCk,2198
|
288
|
-
reconcile/gql_definitions/common/users.py,sha256=
|
288
|
+
reconcile/gql_definitions/common/users.py,sha256=q5Q1zTJ2SAfXTwU_j4rMT9kDr5_u0zGr7JDBN8X3vfU,1688
|
289
289
|
reconcile/gql_definitions/common/users_with_paths.py,sha256=kOYzIXKG11JI0afgRMA5WLlEwJlvElAKytE8RAeuSco,2726
|
290
290
|
reconcile/gql_definitions/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
291
291
|
reconcile/gql_definitions/cost_report/app_names.py,sha256=fzqYXyiTSll359J1F1o7qapco0MSxgs3sr_Ssb2Kbns,1786
|
@@ -340,7 +340,7 @@ reconcile/gql_definitions/fragments/saas_target_namespace.py,sha256=6f6WaerElaRi
|
|
340
340
|
reconcile/gql_definitions/fragments/serviceaccount_token.py,sha256=2pG4rxAjvT-YsFBnm4zl301i7DCYznp99HOEGA-216I,1117
|
341
341
|
reconcile/gql_definitions/fragments/terraform_state.py,sha256=S5QuTR9YlvUObiU7hevS9ybxZEssWoRGqCR9YtGwePs,1024
|
342
342
|
reconcile/gql_definitions/fragments/upgrade_policy.py,sha256=cVza8zfra1E3yBsHiS-hKbys17fvv572GFnKshJjluE,1246
|
343
|
-
reconcile/gql_definitions/fragments/user.py,sha256=
|
343
|
+
reconcile/gql_definitions/fragments/user.py,sha256=GfR82KoUSiOhXrSqKhgCtc_rBHOSL2kCSW5BVynd668,954
|
344
344
|
reconcile/gql_definitions/fragments/vault_secret.py,sha256=8xoQJNx1jKw_1yradq1iLEYWzuOHra1bEHHU7WHKxqo,833
|
345
345
|
reconcile/gql_definitions/gcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
346
346
|
reconcile/gql_definitions/gcp/gcp_docker_repos.py,sha256=HvNaJxQYNPBTDmk26cOUY5_C5oBfau4bdfuI-L1Vcps,3338
|
@@ -370,7 +370,7 @@ reconcile/gql_definitions/ldap_groups/settings.py,sha256=KR6eKqXQWVYZAUEdatL1RCA
|
|
370
370
|
reconcile/gql_definitions/maintenance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
371
371
|
reconcile/gql_definitions/maintenance/maintenances.py,sha256=ObAoOHUrTxL1l8CUhdOACc1s49Pt5j1fsErXE49fs1g,3042
|
372
372
|
reconcile/gql_definitions/membershipsources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
373
|
-
reconcile/gql_definitions/membershipsources/roles.py,sha256=
|
373
|
+
reconcile/gql_definitions/membershipsources/roles.py,sha256=xcl1kHy7i1RzXlpPtvdbfZwGH5dr4xUYfpFR9s62Bmg,3586
|
374
374
|
reconcile/gql_definitions/ocm_labels/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
375
375
|
reconcile/gql_definitions/ocm_labels/clusters.py,sha256=K0DaTnOEdCZAziDbmq3Ktrxzzmzy6sdb3-9kIDk6yao,2932
|
376
376
|
reconcile/gql_definitions/ocm_labels/organizations.py,sha256=ylNna62pG3XidrLQtMwu0LIOsKh6qyC2QImCbur2tV4,2252
|
@@ -380,7 +380,7 @@ reconcile/gql_definitions/openshift_cluster_bots/__init__.py,sha256=47DEQpj8HBSa
|
|
380
380
|
reconcile/gql_definitions/openshift_cluster_bots/clusters.py,sha256=QshhCQeFRu_o0DLpD-4ltT5X_xZHjsCLc5jB3an3UXs,3688
|
381
381
|
reconcile/gql_definitions/openshift_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
382
382
|
reconcile/gql_definitions/openshift_groups/managed_groups.py,sha256=mBWZX9xxeW3eB1ylnAI5x_7UBacRqJf_H6um-fB_nKc,2013
|
383
|
-
reconcile/gql_definitions/openshift_groups/managed_roles.py,sha256=
|
383
|
+
reconcile/gql_definitions/openshift_groups/managed_roles.py,sha256=9gS7UtTuI2XxxE9d-NEiJ0CSlmqYcPiXfaxw3q-LIQs,2610
|
384
384
|
reconcile/gql_definitions/openshift_serviceaccount_tokens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
385
385
|
reconcile/gql_definitions/openshift_serviceaccount_tokens/tokens.py,sha256=FeraeQThHl2UbhTuCPDwm3ltczF_jfZn5E3Squ8-znw,3313
|
386
386
|
reconcile/gql_definitions/quay_membership/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -400,8 +400,8 @@ reconcile/gql_definitions/skupper_network/site_controller_template.py,sha256=MFJ
|
|
400
400
|
reconcile/gql_definitions/skupper_network/skupper_networks.py,sha256=Gfk1YshRj8WSaXgoImBbeXOZz0KXUTKhtf1jiWYEHxY,6037
|
401
401
|
reconcile/gql_definitions/slack_usergroups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
402
402
|
reconcile/gql_definitions/slack_usergroups/clusters.py,sha256=HUTPLna1jxCSyDbxG-LNj9QQUl6smiXOsuCuFTItLzk,2119
|
403
|
-
reconcile/gql_definitions/slack_usergroups/permissions.py,sha256=
|
404
|
-
reconcile/gql_definitions/slack_usergroups/users.py,sha256
|
403
|
+
reconcile/gql_definitions/slack_usergroups/permissions.py,sha256=6XIZnWxu9j5cANunFszmkjb5uVOEGTkudgcmuXeagkA,5456
|
404
|
+
reconcile/gql_definitions/slack_usergroups/users.py,sha256=0KFLYHYXL_bGIKf5LAJSYxUnMQtwggZKVn-mh59Vk10,2880
|
405
405
|
reconcile/gql_definitions/slo_documents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
406
406
|
reconcile/gql_definitions/slo_documents/slo_documents.py,sha256=pOrm9NXAonlo6Lxq6NkD3mHkZ53ZeBnZOZMkDvOEwds,3746
|
407
407
|
reconcile/gql_definitions/status_board/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -650,7 +650,7 @@ reconcile/utils/ruamel.py,sha256=FzL4_L0FnMOUZmgThrZSMJs5MTdXwiy-E9MZWfk8bh8,397
|
|
650
650
|
reconcile/utils/secret_reader.py,sha256=MaP56KZaAE35EyYbgAitdm6fUSxdzWeGFSOym9qiZkw,10206
|
651
651
|
reconcile/utils/semver_helper.py,sha256=-WfPOMSA2v1h7hT3PwVf-Htg7wOsoKlQC1JdmDX2Ars,1268
|
652
652
|
reconcile/utils/sharding.py,sha256=CNyU9mkSbt7FRANEhOOZpWJl7L-YliHhaxr898gmX8c,573
|
653
|
-
reconcile/utils/slack_api.py,sha256=
|
653
|
+
reconcile/utils/slack_api.py,sha256=IrC4fSqTbXCicfvcZhty4rH-g8HZ9w7RPKSE09XfdIo,17858
|
654
654
|
reconcile/utils/slo_document_manager.py,sha256=CPgM2oH4AVzBqenakWo59R5yfwB62tnxSnSOHgir7l8,9500
|
655
655
|
reconcile/utils/smtp_client.py,sha256=0xefB4I9E5eBB-FlxFJYjvz3Kvuqi_K3Ma_Wk0NAQKM,2779
|
656
656
|
reconcile/utils/sqs_gateway.py,sha256=XNIf3PY4UCPNufP2Ul0UJj3fKlt5larBba-VTT-41Fg,2265
|
@@ -699,7 +699,7 @@ reconcile/utils/jobcontroller/controller.py,sha256=Vh08lZuCSIIceWGSDhBB00iFwTI9e
|
|
699
699
|
reconcile/utils/jobcontroller/models.py,sha256=x9YIvWfYOOvXNKToFVx1H7qDrZb0Sa1KI_4Y0gl7rMM,6336
|
700
700
|
reconcile/utils/membershipsources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
701
701
|
reconcile/utils/membershipsources/app_interface_resolver.py,sha256=MqDFvK3aXhmmMuMiIygC-onFVrrIopKHriaYJQ5jnuY,1988
|
702
|
-
reconcile/utils/membershipsources/models.py,sha256=
|
702
|
+
reconcile/utils/membershipsources/models.py,sha256=yuEbG4HJ3NOEpSS9EH7OAx1U-uiRW-QmNMAZJe1Rb-U,1898
|
703
703
|
reconcile/utils/membershipsources/resolver.py,sha256=meERrCZqeVJZR2lHdZEznaZDsCsUb194UEMOjbE4aYA,3168
|
704
704
|
reconcile/utils/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
705
705
|
reconcile/utils/merge_request_manager/merge_request_manager.py,sha256=3EP6Yw_zB7nY0OkU8D_32nDqta1TITgtRI0cSmOlNQg,3332
|
@@ -796,7 +796,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
796
796
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
797
797
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
798
798
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
799
|
-
qontract_reconcile-0.10.2.
|
800
|
-
qontract_reconcile-0.10.2.
|
801
|
-
qontract_reconcile-0.10.2.
|
802
|
-
qontract_reconcile-0.10.2.
|
799
|
+
qontract_reconcile-0.10.2.dev256.dist-info/METADATA,sha256=DE1u8utlQNOXxQ_1eaqSb6HXHYd3jI2s1RlS-fIkQHA,23827
|
800
|
+
qontract_reconcile-0.10.2.dev256.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
801
|
+
qontract_reconcile-0.10.2.dev256.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
802
|
+
qontract_reconcile-0.10.2.dev256.dist-info/RECORD,,
|
@@ -28,6 +28,5 @@ class User(ConfiguredBaseModel):
|
|
28
28
|
name: str = Field(..., alias="name")
|
29
29
|
org_username: str = Field(..., alias="org_username")
|
30
30
|
github_username: str = Field(..., alias="github_username")
|
31
|
-
slack_username: Optional[str] = Field(..., alias="slack_username")
|
32
31
|
pagerduty_username: Optional[str] = Field(..., alias="pagerduty_username")
|
33
32
|
tag_on_merge_requests: Optional[bool] = Field(..., alias="tag_on_merge_requests")
|
@@ -29,7 +29,6 @@ query MembershipSourceRolesQuery($filter: JSON) {
|
|
29
29
|
org_username
|
30
30
|
github_username
|
31
31
|
quay_username
|
32
|
-
slack_username
|
33
32
|
pagerduty_username
|
34
33
|
aws_username
|
35
34
|
cloudflare_user
|
@@ -62,7 +61,6 @@ class UserV1(ConfiguredBaseModel):
|
|
62
61
|
org_username: str = Field(..., alias="org_username")
|
63
62
|
github_username: str = Field(..., alias="github_username")
|
64
63
|
quay_username: Optional[str] = Field(..., alias="quay_username")
|
65
|
-
slack_username: Optional[str] = Field(..., alias="slack_username")
|
66
64
|
pagerduty_username: Optional[str] = Field(..., alias="pagerduty_username")
|
67
65
|
aws_username: Optional[str] = Field(..., alias="aws_username")
|
68
66
|
cloudflare_user: Optional[str] = Field(..., alias="cloudflare_user")
|
reconcile/queries.py
CHANGED
@@ -1775,7 +1775,6 @@ USERS_QUERY = """
|
|
1775
1775
|
name
|
1776
1776
|
org_username
|
1777
1777
|
github_username
|
1778
|
-
slack_username
|
1779
1778
|
pagerduty_username
|
1780
1779
|
public_gpg_key
|
1781
1780
|
{% if refs %}
|
@@ -1806,7 +1805,6 @@ ROLES_QUERY = """
|
|
1806
1805
|
name
|
1807
1806
|
org_username
|
1808
1807
|
github_username
|
1809
|
-
slack_username
|
1810
1808
|
tag_on_cluster_updates
|
1811
1809
|
labels
|
1812
1810
|
roles {
|
reconcile/slack_usergroups.py
CHANGED
reconcile/utils/slack_api.py
CHANGED
@@ -415,11 +415,19 @@ class SlackApi:
|
|
415
415
|
k: v["name"] for k, v in self._get("channels").items() if k in channels_ids
|
416
416
|
}
|
417
417
|
|
418
|
+
@staticmethod
|
419
|
+
def extract_name_from_user(user: dict[str, Any]) -> str | None:
|
420
|
+
if email := user["profile"].get("email"):
|
421
|
+
return email.split("@")[0]
|
422
|
+
return None
|
423
|
+
|
418
424
|
def get_active_users_by_names(self, user_names: Iterable[str]) -> dict[str, str]:
|
419
425
|
return {
|
420
|
-
k:
|
426
|
+
k: name
|
421
427
|
for k, v in self._get("users").items()
|
422
|
-
if
|
428
|
+
if not v["deleted"]
|
429
|
+
and (name := self.extract_name_from_user(v))
|
430
|
+
and name in user_names
|
423
431
|
}
|
424
432
|
|
425
433
|
def get_users_by_ids(self, users_ids: Iterable[str]) -> dict[str, str]:
|
@@ -428,9 +436,10 @@ class SlackApi:
|
|
428
436
|
self._translate_user_id(user_id) for user_id in users_ids
|
429
437
|
)
|
430
438
|
return {
|
431
|
-
user_id:
|
439
|
+
user_id: name
|
432
440
|
for user_id in translated_user_ids
|
433
441
|
if (user := users.get(user_id))
|
442
|
+
and (name := self.extract_name_from_user(user))
|
434
443
|
}
|
435
444
|
|
436
445
|
def _get(self, resource: str) -> dict[str, Any]:
|
{qontract_reconcile-0.10.2.dev255.dist-info → qontract_reconcile-0.10.2.dev256.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|