qontract-reconcile 0.9.1rc235__py3-none-any.whl → 0.9.1rc236__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.9.1rc235
3
+ Version: 0.9.1rc236
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
@@ -55,7 +55,6 @@ Requires-Dist: deepdiff6 (==6.2.0)
55
55
  Requires-Dist: jsonpath-ng (~=1.5)
56
56
  Requires-Dist: networkx (~=2.8)
57
57
  Requires-Dist: mypy-boto3-s3 (~=1.24.94)
58
- Requires-Dist: rich (<14.0.0,>=13.3.0)
59
58
  Requires-Dist: dateparser (~=1.1.7)
60
59
 
61
60
  UNKNOWN
@@ -83,8 +83,8 @@ reconcile/openshift_resources.py,sha256=Lkn3KdIqxUCmOzlwoKjM2xVotTbJDfgjMGySvWtB
83
83
  reconcile/openshift_resources_base.py,sha256=RUUySaSdb3fY9isyMG1QnPNHZz9yVypB6C-xa-id8oc,40820
84
84
  reconcile/openshift_rolebindings.py,sha256=1k0o3hb3ZhhlbUjc8cP7IjKFux0oZApT8kLT8Y-pvqI,6579
85
85
  reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
86
- reconcile/openshift_saas_deploy.py,sha256=FyYzQ7YkEg_tIqH5ToaZD8T37eO3q_k0XWGx_2YpfME,9981
87
- reconcile/openshift_saas_deploy_change_tester.py,sha256=dwZ5m0LGGIe630Vxru0EpzAAi9gDRI6kympQn8KjmD8,9353
86
+ reconcile/openshift_saas_deploy.py,sha256=5ELZi8pKji6XIS55aRwusLRNat-RQoSbmw9H1cMN5PM,9949
87
+ reconcile/openshift_saas_deploy_change_tester.py,sha256=cu40xeo1kxNMNiNcPtKd_WKp1d0YC-4HKdqJwPlbuJk,9170
88
88
  reconcile/openshift_saas_deploy_trigger_base.py,sha256=sRrPAgnV9sjwTV7tCR2yULBsNrj6pIr2NIDGKt-f3V8,14315
89
89
  reconcile/openshift_saas_deploy_trigger_cleaner.py,sha256=iFIkmDnN-ZKeIInT_5lWPkjSPwhidzw1GCmdziaagUk,2935
90
90
  reconcile/openshift_saas_deploy_trigger_configs.py,sha256=uWzUV5D5CW0frdi1ys7BObNg-rA-VZKlefd4TD_Z-pY,959
@@ -103,7 +103,7 @@ reconcile/quay_mirror.py,sha256=9pwl1gLzRpsVXF5yPULM4ET_C5F8_xPmH8Mv8AS2AfI,1340
103
103
  reconcile/quay_mirror_org.py,sha256=E1OdRe-ppxTkNCwu20iVRhEdG1fPDBroLY02NgiMN7c,10381
104
104
  reconcile/quay_permissions.py,sha256=_3PCWjNWoU7VHlYgHzUevvL_jJmEMsWfXV_nzjeiyhU,4099
105
105
  reconcile/quay_repos.py,sha256=7609RBVQihis96FNOOe-i9tCTYwcTVy4WpKAL6HpnkU,7031
106
- reconcile/queries.py,sha256=BtW9hPeU0yOdgiH3ppUqstbT3jatzCCEatXeQKtwPJo,49063
106
+ reconcile/queries.py,sha256=aqt-13egNqEoxceifYhEAMU0vqQmlYfo49Jqh2luG9g,54644
107
107
  reconcile/query_validator.py,sha256=oLEZIAsQCzxmmZ7b9dSw-OKuEjpI1dbVu4XfCfjpmi8,1503
108
108
  reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
109
109
  reconcile/resource_scraper.py,sha256=vo1N9vLJCYWvXlTwFRIpEuWjx_39ZV9zxJlpoPq4g3U,2330
@@ -183,8 +183,7 @@ reconcile/gql_definitions/common/ocm_environments.py,sha256=yV4UVjdnNmqbR5trQCOA
183
183
  reconcile/gql_definitions/common/pagerduty_instances.py,sha256=8NBHKRXg_OKG9NsJv6FOj8UVFcjkdJg-9E16ZqZIRPQ,2006
184
184
  reconcile/gql_definitions/common/pgp_reencryption_settings.py,sha256=tS68-tBBd7BJYmfTjtdTlxpABF3f_z9eJdtaKnyZc0Q,2305
185
185
  reconcile/gql_definitions/common/pipeline_providers.py,sha256=6GgiGxV4Y25VTlfmhunFO_isU0gHKfid4L0YH9AGf80,9398
186
- reconcile/gql_definitions/common/saas_files.py,sha256=5vz1BY_w7JwW2DD3Spab5dfF1wbEhD9nIKPZ_RMOHEA,14788
187
- reconcile/gql_definitions/common/saas_target_namespaces.py,sha256=paFgL0lRih-caKXqh6HsDi9bD1o9g8OFYAIR5U-AdI4,2536
186
+ reconcile/gql_definitions/common/saas_files.py,sha256=oMR5w7GHxG5QgAzmbB1ZmtzTglwuxnPLNnerVp1JVwY,14975
188
187
  reconcile/gql_definitions/common/saasherder_settings.py,sha256=jxrFr03NmiwV3uegKCxQgB5iveC2IaGZIoguXoiNMgs,1797
189
188
  reconcile/gql_definitions/common/smtp_client_settings.py,sha256=Pb8VgTGFqCh4_rI0BOHoXuicfdNyol1kIN8NLONHaxI,2252
190
189
  reconcile/gql_definitions/common/users.py,sha256=C5EvC5gNBHqWuY4tvOG5oZUiFV4eognyu-KjBRsIkMM,1685
@@ -198,7 +197,6 @@ reconcile/gql_definitions/fragments/oc_connection_cluster.py,sha256=DoAYQLQXB-TY
198
197
  reconcile/gql_definitions/fragments/ocm_environment.py,sha256=DOfBY4fb02UF5R3ZxtwHBTlxhPYOOBJaqGeENElX7oc,1037
199
198
  reconcile/gql_definitions/fragments/resource_requirements.py,sha256=p7bMDzeIMr008A_4skrZjXAwVXA4PtO2rX93iGBYqvk,732
200
199
  reconcile/gql_definitions/fragments/resource_values.py,sha256=DS3KqzgjT_wJ36SWPZ9HyNXOBNvbhhGnh06IMQmrFXQ,746
201
- reconcile/gql_definitions/fragments/saas_target_namespace.py,sha256=LSDaNWa2LNJiUsryeLHsn-mbh9gt2XktYP_XCEetUc0,1518
202
200
  reconcile/gql_definitions/fragments/upgrade_policy.py,sha256=73VyC3kbkZ_g3aXmhD016a0axoJxKlIJSGmcue1A2Ow,1077
203
201
  reconcile/gql_definitions/fragments/user.py,sha256=6RVsHZVHjOrZKcH8rWGQG9V1OtPpACSZ3wNwca3H8pA,943
204
202
  reconcile/gql_definitions/fragments/vault_secret.py,sha256=pXbTPa-ptuT1L5HF83pEGMxhjRVA_b_wfGHS4NoZEW8,837
@@ -223,7 +221,7 @@ reconcile/gql_definitions/openshift_groups/managed_roles.py,sha256=Q9U2hRiAZiCBE
223
221
  reconcile/gql_definitions/quay_membership/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
224
222
  reconcile/gql_definitions/quay_membership/quay_membership.py,sha256=npj_e5xcDfUt_3sPlhZvRElcT2srT2EkBhtwQebKqz8,2842
225
223
  reconcile/gql_definitions/saas_auto_promotions_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
- reconcile/gql_definitions/saas_auto_promotions_manager/saas_files_for_auto_promotion.py,sha256=iHs93a7Mlz90LkXVEWlaqIp8OnJTjOUPFXSw7HTzBsw,4274
224
+ reconcile/gql_definitions/saas_auto_promotions_manager/saas_files_for_auto_promotion.py,sha256=W_q90P72ngiPQaeF-pxmRQlI3tP2M2p1LvjhyadF5G8,4264
227
225
  reconcile/gql_definitions/service_dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
226
  reconcile/gql_definitions/service_dependencies/jenkins_instance_fragment.py,sha256=s2NzPeR0MABYKWp_t9PiAIgiNvVqxQRQvBkfGn1MZ9o,703
229
227
  reconcile/gql_definitions/service_dependencies/service_dependencies.py,sha256=OUjr8-S06vOBmVtTYygbucIms5CwV505q6ZaU8jdWl0,5004
@@ -266,7 +264,7 @@ reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request_manag
266
264
  reconcile/saas_auto_promotions_manager/merge_request_manager/renderer.py,sha256=z0zXicF7mVMJuCmUoRt0LqvGPw6jjtuwa4GSik86-hs,3659
267
265
  reconcile/saas_auto_promotions_manager/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
268
266
  reconcile/saas_auto_promotions_manager/utils/deployment_state.py,sha256=rJbYBD4Omq_ZLToSwKBuiE2B_TobTdvTm1pIUpqPuWQ,1349
269
- reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py,sha256=NmjIUIPOXlsF7neJBWPyPi8_PcMz2gtpcYIVt_aD6fs,8581
267
+ reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py,sha256=IZvhroSPXwfLl3L8IaLpyAqJZM4zorWOOJJ1RXIKsYY,8383
270
268
  reconcile/saas_auto_promotions_manager/utils/vcs.py,sha256=f8fvlkssO73T2QDU_7959oIiNSKvvb6OfGJOg5ROa5c,4823
271
269
  reconcile/skupper_network/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
272
270
  reconcile/skupper_network/integration.py,sha256=jF5uPhePnWq4axnxxarEQ_tw71WBxYoTZZUoi9JrZ6M,9831
@@ -332,8 +330,8 @@ reconcile/test/test_quay_repos.py,sha256=TdkcRF_a8PLp01Kti9eZZN-vGup2yPBT4Iba3k0
332
330
  reconcile/test/test_queries.py,sha256=SpH3RmNpBjEr_ne3VjAMCgKK8RE1z1zo7bypkT5uoO4,1946
333
331
  reconcile/test/test_repo_owners.py,sha256=uRYMLbMmh-9usF0TerabZTZV-Z1CS4I6ybT-LQqCLe8,1423
334
332
  reconcile/test/test_requests_sender.py,sha256=7fd9C2kEFS0-CYtlsif66N1kO9c44pzuBPAJKR9igqU,5385
335
- reconcile/test/test_saasherder.py,sha256=ozBRTN3b6HZAejBOL9tT9fi4Whb0bav_YuUYW0x9TeU,36854
336
- reconcile/test/test_saasherder_allowed_secret_paths.py,sha256=86ffYbbN0Xng8CTiXf3yR_3VD8qyqRpVTByJFycdXp0,4899
333
+ reconcile/test/test_saasherder.py,sha256=0eH84fV-FBwMWM3McFp9T4oCcXyatOVl18hZyAmptEk,32861
334
+ reconcile/test/test_saasherder_allowed_secret_paths.py,sha256=L9xoTm2BF76RfMacGgi9bHUQ9RUsobIBU83Yh47xxK8,4914
337
335
  reconcile/test/test_secret_reader.py,sha256=kz7nzcPjvA08cytnvcA_PMA98AEyqJWsESkYeRn5xCk,4994
338
336
  reconcile/test/test_slack_base.py,sha256=UqMjYt4hPmStJfog06qwJM_afbf-E9uzy-GX741KgTY,5058
339
337
  reconcile/test/test_slack_usergroups.py,sha256=prq1gOyBpKLQJodG59OvXOjwvualzQNLYNhmY4i92No,23652
@@ -345,6 +343,7 @@ reconcile/test/test_terraform_resources.py,sha256=dEpJwaTzE_FzkRjCozDtGzE4egBrb-
345
343
  reconcile/test/test_terraform_users.py,sha256=Yt4iN5FMtn7cfVlVqBJ1MMH94Z0DGchyByhpfNUJFxM,1570
346
344
  reconcile/test/test_terraform_vpc_peerings.py,sha256=-NXgufo1GCYhbWyVWbtK4KfPNIY6_02GQR53ynwMJZ4,18135
347
345
  reconcile/test/test_terraform_vpc_peerings_build_desired_state.py,sha256=43EIGnrm5xAdtuSL6tKDh-nepk4WOKkONMNUOU1BN_Y,37236
346
+ reconcile/test/test_typed_queries.py,sha256=yxLkHCQ2sf7PlWSe9GVk7eJoN3dMezWfuvi30QhVUTM,1059
348
347
  reconcile/test/test_unleash.py,sha256=a4jT0Hzlje6AEkwhMmeDUkzo6rsD_WGSZicwFg47mmM,4192
349
348
  reconcile/test/test_utils_aws_api.py,sha256=UT1dhPvdW8hTqKrMMQv0JP84dMH9jrBG_-cJ02QfknY,7173
350
349
  reconcile/test/test_utils_aws_helper.py,sha256=2FjZ3cY2VLuHpkt2t-6S0xkJnpTbesx8pprP_75-7xI,2307
@@ -430,7 +429,7 @@ reconcile/typed_queries/namespaces_minimal.py,sha256=rUtqNQ0ORXXUTQfnpsMURymAJ4g
430
429
  reconcile/typed_queries/ocp_release_mirror.py,sha256=jwX29Tcdvov8oEDNkE4t1j-2Hz8QJrjg9ITppP-panQ,313
431
430
  reconcile/typed_queries/pagerduty_instances.py,sha256=QCHqEAakiH6eSob0Pnnn3IBd8Ga0zpEp1Z6Qu3v2uH4,733
432
431
  reconcile/typed_queries/repos.py,sha256=RKBsf7IDS6NsXTtXxJ9Ol9G3bxG9sr3vW9QQ2bahEHo,512
433
- reconcile/typed_queries/saas_files.py,sha256=IXqCTzCkjmchdjs9pE4eNB6aJhAELCHVsWarW14-3Fw,10562
432
+ reconcile/typed_queries/saas_files.py,sha256=ZCf_Zo1mXjpnsoSzogPSzzFATKkHZvJAsJVtZdQkwEk,2112
434
433
  reconcile/typed_queries/saas_files_for_auto_promotions.py,sha256=HxGESxXPUfh7LNNcZs0oXo2PAGYTMN2T8q0miUTUvdc,649
435
434
  reconcile/typed_queries/smtp.py,sha256=aSLglYa5bHKmlGwKkxq2RZqyMWuAf0a4S_mOuhDa084,542
436
435
  reconcile/typed_queries/tekton_pipeline_providers.py,sha256=2mpHBdsNPQB94tw0H9aenGuqj8EEjYolQ03YEq1CpiY,546
@@ -536,9 +535,9 @@ reconcile/utils/runtime/integration.py,sha256=iUPlei8Kx1ulrN379i9k8b_Npw4zVTZa9u
536
535
  reconcile/utils/runtime/meta.py,sha256=hQ_jHPY0zbyA08hzpfu4FzOw25NqMg_fgCr2r9gGXx8,246
537
536
  reconcile/utils/runtime/runner.py,sha256=72cc-I6yXyPov8UCLHpyERRy1eiMLpGite2roO0yUlo,7979
538
537
  reconcile/utils/saasherder/__init__.py,sha256=J3MBZBFa5YmhqYm08QsjBXz8mFcVOCiOCkyIcw41t7E,343
539
- reconcile/utils/saasherder/interfaces.py,sha256=IMvRElC80if_BedjBn8VLUsgBhqphQkGZloPGhazh0E,8460
538
+ reconcile/utils/saasherder/interfaces.py,sha256=9q-PbOIki3uVm2Slk02ac7gg4ZVvv_ntZ60WIxBH1Zc,8443
540
539
  reconcile/utils/saasherder/models.py,sha256=pmHYafLyasZHeVz_HvHraIb_9ITj4j6S9K604LRtDHg,4700
541
- reconcile/utils/saasherder/saasherder.py,sha256=yCWDCrQNMoutXCUT0TlND2M0YBC-XR2C0xpUE5FSfAI,78498
540
+ reconcile/utils/saasherder/saasherder.py,sha256=hXwCbDIR9GsMV8sJXxN2pH5kXlsknMS5M-FX43Siv2Y,76909
542
541
  reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
543
542
  reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
544
543
  reconcile/utils/terraform/config_client.py,sha256=t4novdX7GeYPMYms97C_BBtLmt0M8CJCmCT7QHENwxg,4687
@@ -551,10 +550,10 @@ release/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
551
550
  release/test_version.py,sha256=jOMn3Qx-mZC5pnJR0LU9ieIdNaYZSmr1kQ6aCkPngAU,2053
552
551
  release/version.py,sha256=Ud36t9FxGHLubMrE2o5aaaZRGB9_9hU_z0RN9go0TQM,3876
553
552
  tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
554
- tools/app_interface_reporter.py,sha256=QTQUbI1eLhRKahpQAcoTkWgaXNIems2Gh5CIt7h6Ll4,21985
553
+ tools/app_interface_reporter.py,sha256=DIWu0dpBDk_cBweaf2Qun5HnyrLER1bu-pv3kHM5YGY,21861
555
554
  tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
556
555
  tools/glitchtip_access_revalidation.py,sha256=PXN5wxl6OX8sxddPaakDF3X79nFLvpm-lz0mWLVelw0,2806
557
- tools/qontract_cli.py,sha256=EeWMeBqfc6PBwP4Ork_85YbQpMY09hOmtelmWTeTEVY,87995
556
+ tools/qontract_cli.py,sha256=B-NOezDLeFjr1-m9dsLAa9fcBe7WVl4YRIYHakYLjw4,85754
558
557
  tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
559
558
  tools/cli_commands/gpg_encrypt.py,sha256=JryinrDdvztN931enUY3FuDeLVnfs6y58mnK7itNK6Y,4940
560
559
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
@@ -562,8 +561,8 @@ tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y
562
561
  tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
563
562
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
564
563
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
565
- qontract_reconcile-0.9.1rc235.dist-info/METADATA,sha256=n6fXcNNGxO2Iz4NGU4b7-Te84CgxanPC3i-aQJHHDk4,2287
566
- qontract_reconcile-0.9.1rc235.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
567
- qontract_reconcile-0.9.1rc235.dist-info/entry_points.txt,sha256=aIVvB7OTCxYu0QkONzBPfFEyg68Pr8KUVKEEm4ChDVc,333
568
- qontract_reconcile-0.9.1rc235.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
569
- qontract_reconcile-0.9.1rc235.dist-info/RECORD,,
564
+ qontract_reconcile-0.9.1rc236.dist-info/METADATA,sha256=fyUnMe9o7NZHsZ-eqev-921QXSwOXb0Wc5QJwDZG8N8,2248
565
+ qontract_reconcile-0.9.1rc236.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
566
+ qontract_reconcile-0.9.1rc236.dist-info/entry_points.txt,sha256=aIVvB7OTCxYu0QkONzBPfFEyg68Pr8KUVKEEm4ChDVc,333
567
+ qontract_reconcile-0.9.1rc236.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
568
+ qontract_reconcile-0.9.1rc236.dist-info/RECORD,,
@@ -20,9 +20,6 @@ from pydantic import ( # noqa: F401 # pylint: disable=W0611
20
20
  from reconcile.gql_definitions.fragments.oc_connection_cluster import (
21
21
  OcConnectionCluster,
22
22
  )
23
- from reconcile.gql_definitions.fragments.saas_target_namespace import (
24
- SaasTargetNamespace,
25
- )
26
23
  from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
27
24
 
28
25
 
@@ -58,26 +55,6 @@ fragment OcConnectionCluster on Cluster_v1 {
58
55
  }
59
56
  }
60
57
 
61
- fragment SaasTargetNamespace on Namespace_v1 {
62
- name
63
- environment {
64
- name
65
- parameters
66
- secretParameters {
67
- name
68
- secret {
69
- ...VaultSecret
70
- }
71
- }
72
- }
73
- app {
74
- name
75
- }
76
- cluster {
77
- ...OcConnectionCluster
78
- }
79
- }
80
-
81
58
  fragment VaultSecret on VaultSecret_v1 {
82
59
  path
83
60
  field
@@ -188,15 +165,24 @@ query SaasFiles {
188
165
  path
189
166
  name
190
167
  namespace {
191
- ...SaasTargetNamespace
192
- }
193
- namespaceSelector {
194
- jsonPathSelectors {
195
- include
196
- exclude
168
+ name
169
+ environment {
170
+ name
171
+ parameters
172
+ secretParameters {
173
+ name
174
+ secret {
175
+ ...VaultSecret
176
+ }
177
+ }
178
+ }
179
+ app {
180
+ name
181
+ }
182
+ cluster {
183
+ ...OcConnectionCluster
197
184
  }
198
185
  }
199
- provider
200
186
  ref
201
187
  promotion {
202
188
  auto
@@ -374,13 +360,28 @@ class SaasResourceTemplateV2_SaasSecretParametersV1(ConfiguredBaseModel):
374
360
  secret: VaultSecret = Field(..., alias="secret")
375
361
 
376
362
 
377
- class JsonPathSelectorsV1(ConfiguredBaseModel):
378
- include: list[str] = Field(..., alias="include")
379
- exclude: Optional[list[str]] = Field(..., alias="exclude")
363
+ class EnvironmentV1_SaasSecretParametersV1(ConfiguredBaseModel):
364
+ name: str = Field(..., alias="name")
365
+ secret: VaultSecret = Field(..., alias="secret")
366
+
367
+
368
+ class EnvironmentV1(ConfiguredBaseModel):
369
+ name: str = Field(..., alias="name")
370
+ parameters: Optional[Json] = Field(..., alias="parameters")
371
+ secret_parameters: Optional[list[EnvironmentV1_SaasSecretParametersV1]] = Field(
372
+ ..., alias="secretParameters"
373
+ )
374
+
375
+
376
+ class SaasResourceTemplateTargetV2_NamespaceV1_AppV1(ConfiguredBaseModel):
377
+ name: str = Field(..., alias="name")
380
378
 
381
379
 
382
- class SaasResourceTemplateTargetNamespaceSelectorV1(ConfiguredBaseModel):
383
- json_path_selectors: JsonPathSelectorsV1 = Field(..., alias="jsonPathSelectors")
380
+ class SaasResourceTemplateTargetV2_NamespaceV1(ConfiguredBaseModel):
381
+ name: str = Field(..., alias="name")
382
+ environment: EnvironmentV1 = Field(..., alias="environment")
383
+ app: SaasResourceTemplateTargetV2_NamespaceV1_AppV1 = Field(..., alias="app")
384
+ cluster: OcConnectionCluster = Field(..., alias="cluster")
384
385
 
385
386
 
386
387
  class PromotionChannelDataV1(ConfiguredBaseModel):
@@ -438,11 +439,7 @@ class SaasResourceTemplateTargetImageV1(ConfiguredBaseModel):
438
439
  class SaasResourceTemplateTargetV2(ConfiguredBaseModel):
439
440
  path: Optional[str] = Field(..., alias="path")
440
441
  name: Optional[str] = Field(..., alias="name")
441
- namespace: Optional[SaasTargetNamespace] = Field(..., alias="namespace")
442
- namespace_selector: Optional[SaasResourceTemplateTargetNamespaceSelectorV1] = Field(
443
- ..., alias="namespaceSelector"
444
- )
445
- provider: Optional[str] = Field(..., alias="provider")
442
+ namespace: SaasResourceTemplateTargetV2_NamespaceV1 = Field(..., alias="namespace")
446
443
  ref: str = Field(..., alias="ref")
447
444
  promotion: Optional[SaasResourceTemplateTargetPromotionV1] = Field(
448
445
  ..., alias="promotion"
@@ -108,7 +108,7 @@ class SaasResourceTemplateTargetPromotionV1(ConfiguredBaseModel):
108
108
  class SaasResourceTemplateTargetV2(ConfiguredBaseModel):
109
109
  ref: str = Field(..., alias="ref")
110
110
  path: Optional[str] = Field(..., alias="path")
111
- namespace: Optional[NamespaceV1] = Field(..., alias="namespace")
111
+ namespace: NamespaceV1 = Field(..., alias="namespace")
112
112
  promotion: Optional[SaasResourceTemplateTargetPromotionV1] = Field(
113
113
  ..., alias="promotion"
114
114
  )
@@ -9,7 +9,10 @@ from reconcile import (
9
9
  mr_client_gateway,
10
10
  queries,
11
11
  )
12
- from reconcile.gql_definitions.common.saas_files import PipelinesProviderTektonV1
12
+ from reconcile.gql_definitions.common.saas_files import (
13
+ PipelinesProviderTektonV1,
14
+ SaasFileV2,
15
+ )
13
16
  from reconcile.openshift_tekton_resources import build_one_per_saas_file_tkn_object_name
14
17
  from reconcile.slack_base import slackapi_from_slack_workspace
15
18
  from reconcile.status import ExitCodes
@@ -24,7 +27,6 @@ from reconcile.utils.defer import defer
24
27
  from reconcile.utils.gitlab_api import GitLabApi
25
28
  from reconcile.utils.openshift_resource import ResourceInventory
26
29
  from reconcile.utils.saasherder import SaasHerder
27
- from reconcile.utils.saasherder.interfaces import SaasFile
28
30
  from reconcile.utils.secret_reader import create_secret_reader
29
31
  from reconcile.utils.semver_helper import make_semver
30
32
  from reconcile.utils.slack_api import SlackApi
@@ -34,7 +36,7 @@ QONTRACT_INTEGRATION = "openshift-saas-deploy"
34
36
  QONTRACT_INTEGRATION_VERSION = make_semver(0, 1, 0)
35
37
 
36
38
 
37
- def compose_console_url(saas_file: SaasFile, env_name: str) -> str:
39
+ def compose_console_url(saas_file: SaasFileV2, env_name: str) -> str:
38
40
  if not isinstance(saas_file.pipelines_provider, PipelinesProviderTektonV1):
39
41
  raise ValueError(
40
42
  f"Unsupported pipelines_provider: {saas_file.pipelines_provider}"
@@ -9,10 +9,6 @@ from sretoolbox.utils import threaded
9
9
 
10
10
  import reconcile.openshift_saas_deploy as osd
11
11
  from reconcile import queries
12
- from reconcile.typed_queries.saas_files import (
13
- export_model,
14
- get_saas_files,
15
- )
16
12
  from reconcile.utils import gql
17
13
  from reconcile.utils.gitlab_api import GitLabApi
18
14
  from reconcile.utils.semver_helper import make_semver
@@ -210,13 +206,10 @@ def run(
210
206
 
211
207
  # find the differences in saas-file state
212
208
  comparison_saas_file_state = collect_state(
213
- [
214
- export_model(saas_file)
215
- for saas_file in get_saas_files(query_func=comparison_gql_api.query)
216
- ]
209
+ queries.get_saas_files(gqlapi=comparison_gql_api)
217
210
  )
218
211
  desired_saas_file_state = collect_state(
219
- [export_model(saas_file) for saas_file in get_saas_files()]
212
+ queries.get_saas_files(gqlapi=gql.get_api())
220
213
  )
221
214
  saas_file_state_diffs = [
222
215
  s for s in desired_saas_file_state if s not in comparison_saas_file_state
reconcile/queries.py CHANGED
@@ -2089,6 +2089,288 @@ def get_app_interface_sql_queries():
2089
2089
  return gqlapi.query(APP_INTERFACE_SQL_QUERIES_QUERY)["sql_queries"]
2090
2090
 
2091
2091
 
2092
+ SAAS_FILES_QUERY_V2 = """
2093
+ {
2094
+ saas_files: saas_files_v2 {
2095
+ path
2096
+ name
2097
+ app {
2098
+ name
2099
+ }
2100
+ pipelinesProvider {
2101
+ name
2102
+ provider
2103
+ ...on PipelinesProviderTekton_v1 {
2104
+ namespace {
2105
+ name
2106
+ cluster {
2107
+ name
2108
+ consoleUrl
2109
+ serverUrl
2110
+ insecureSkipTLSVerify
2111
+ jumpHost {
2112
+ %s
2113
+ }
2114
+ automationToken {
2115
+ path
2116
+ field
2117
+ version
2118
+ format
2119
+ }
2120
+ internal
2121
+ disable {
2122
+ integrations
2123
+ }
2124
+ }
2125
+ }
2126
+ defaults {
2127
+ pipelineTemplates {
2128
+ openshiftSaasDeploy {
2129
+ name
2130
+ }
2131
+ }
2132
+ }
2133
+ pipelineTemplates {
2134
+ openshiftSaasDeploy {
2135
+ name
2136
+ }
2137
+ }
2138
+ }
2139
+ }
2140
+ deployResources {
2141
+ requests {
2142
+ cpu
2143
+ memory
2144
+ }
2145
+ limits {
2146
+ cpu
2147
+ memory
2148
+ }
2149
+ }
2150
+ slack {
2151
+ output
2152
+ workspace {
2153
+ name
2154
+ integrations {
2155
+ name
2156
+ token {
2157
+ path
2158
+ field
2159
+ version
2160
+ format
2161
+ }
2162
+ channel
2163
+ icon_emoji
2164
+ username
2165
+ }
2166
+ }
2167
+ channel
2168
+ notifications {
2169
+ start
2170
+ }
2171
+ }
2172
+ managedResourceTypes
2173
+ takeover
2174
+ deprecated
2175
+ compare
2176
+ timeout
2177
+ publishJobLogs
2178
+ clusterAdmin
2179
+ imagePatterns
2180
+ allowedSecretParameterPaths
2181
+ use_channel_in_image_tag
2182
+ authentication {
2183
+ code {
2184
+ path
2185
+ field
2186
+ version
2187
+ format
2188
+ }
2189
+ image {
2190
+ path
2191
+ field
2192
+ version
2193
+ format
2194
+ }
2195
+ }
2196
+ parameters
2197
+ secretParameters {
2198
+ name
2199
+ secret {
2200
+ path
2201
+ field
2202
+ version
2203
+ format
2204
+ }
2205
+ }
2206
+ resourceTemplates {
2207
+ name
2208
+ url
2209
+ path
2210
+ provider
2211
+ hash_length
2212
+ parameters
2213
+ secretParameters {
2214
+ name
2215
+ secret {
2216
+ path
2217
+ field
2218
+ version
2219
+ format
2220
+ }
2221
+ }
2222
+ targets {
2223
+ path
2224
+ name
2225
+ namespace {
2226
+ name
2227
+ environment {
2228
+ name
2229
+ parameters
2230
+ secretParameters {
2231
+ name
2232
+ secret {
2233
+ path
2234
+ field
2235
+ version
2236
+ format
2237
+ }
2238
+ }
2239
+ }
2240
+ app {
2241
+ name
2242
+ }
2243
+ cluster {
2244
+ name
2245
+ serverUrl
2246
+ insecureSkipTLSVerify
2247
+ jumpHost {
2248
+ %s
2249
+ }
2250
+ automationToken {
2251
+ path
2252
+ field
2253
+ version
2254
+ format
2255
+ }
2256
+ clusterAdminAutomationToken {
2257
+ path
2258
+ field
2259
+ version
2260
+ format
2261
+ }
2262
+ internal
2263
+ disable {
2264
+ integrations
2265
+ }
2266
+ }
2267
+ }
2268
+ ref
2269
+ promotion {
2270
+ auto
2271
+ publish
2272
+ subscribe
2273
+ promotion_data {
2274
+ channel
2275
+ data {
2276
+ type
2277
+ ... on ParentSaasPromotion_v1 {
2278
+ parent_saas
2279
+ target_config_hash
2280
+ }
2281
+ }
2282
+ }
2283
+ }
2284
+ parameters
2285
+ secretParameters {
2286
+ name
2287
+ secret {
2288
+ path
2289
+ field
2290
+ version
2291
+ format
2292
+ }
2293
+ }
2294
+ upstream {
2295
+ instance {
2296
+ name
2297
+ serverUrl
2298
+ }
2299
+ name
2300
+ }
2301
+ image {
2302
+ org {
2303
+ name
2304
+ instance {
2305
+ url
2306
+ }
2307
+ }
2308
+ name
2309
+ }
2310
+ disable
2311
+ delete
2312
+ }
2313
+ }
2314
+ selfServiceRoles {
2315
+ users {
2316
+ org_username
2317
+ tag_on_merge_requests
2318
+ }
2319
+ bots {
2320
+ org_username
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ """ % (
2326
+ indent(JUMPHOST_FIELDS, 14 * " "),
2327
+ indent(JUMPHOST_FIELDS, 14 * " "),
2328
+ )
2329
+
2330
+
2331
+ def get_saas_files(
2332
+ saas_file_name: Optional[str] = None,
2333
+ env_name: Optional[str] = None,
2334
+ app_name: Optional[str] = None,
2335
+ gqlapi: Optional[gql.GqlApi] = None,
2336
+ ):
2337
+ """Returns SaasFile resources defined in app-interface."""
2338
+ if gqlapi is None:
2339
+ gqlapi = gql.get_api()
2340
+ saas_files = gqlapi.query(SAAS_FILES_QUERY_V2)["saas_files"]
2341
+
2342
+ if saas_file_name is None and env_name is None and app_name is None:
2343
+ return saas_files
2344
+ if saas_file_name == "" or env_name == "" or app_name == "":
2345
+ return []
2346
+
2347
+ for saas_file in saas_files[:]:
2348
+ if saas_file_name:
2349
+ if saas_file["name"] != saas_file_name:
2350
+ saas_files.remove(saas_file)
2351
+ continue
2352
+ if env_name:
2353
+ resource_templates = saas_file["resourceTemplates"]
2354
+ for rt in resource_templates[:]:
2355
+ targets = rt["targets"]
2356
+ for target in targets[:]:
2357
+ namespace = target["namespace"]
2358
+ environment = namespace["environment"]
2359
+ if environment["name"] != env_name:
2360
+ targets.remove(target)
2361
+ if not targets:
2362
+ resource_templates.remove(rt)
2363
+ if not resource_templates:
2364
+ saas_files.remove(saas_file)
2365
+ continue
2366
+ if app_name:
2367
+ if saas_file["app"]["name"] != app_name:
2368
+ saas_files.remove(saas_file)
2369
+ continue
2370
+
2371
+ return saas_files
2372
+
2373
+
2092
2374
  PIPELINES_PROVIDERS_QUERY = """
2093
2375
  {
2094
2376
  pipelines_providers: pipelines_providers_v1 {
@@ -94,9 +94,6 @@ class SaasFilesInventory:
94
94
  continue
95
95
  if not target.promotion.auto:
96
96
  continue
97
- if not target.namespace:
98
- # this should never happen - it's just to make mypy happy
99
- raise RuntimeError("target.namespace is None")
100
97
  subscriber = Subscriber(
101
98
  saas_name=saas_file.name,
102
99
  template_name=resource_template.name,