dbt-platform-helper 13.1.2__py3-none-any.whl → 13.2.0__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.
Potentially problematic release.
This version of dbt-platform-helper might be problematic. Click here for more details.
- dbt_platform_helper/commands/application.py +2 -4
- dbt_platform_helper/commands/codebase.py +1 -3
- dbt_platform_helper/commands/conduit.py +1 -3
- dbt_platform_helper/commands/config.py +14 -14
- dbt_platform_helper/commands/copilot.py +6 -4
- dbt_platform_helper/commands/environment.py +5 -5
- dbt_platform_helper/commands/generate.py +2 -3
- dbt_platform_helper/commands/notify.py +1 -3
- dbt_platform_helper/commands/pipeline.py +1 -3
- dbt_platform_helper/commands/secrets.py +1 -3
- dbt_platform_helper/commands/version.py +2 -2
- dbt_platform_helper/domain/codebase.py +10 -2
- dbt_platform_helper/domain/copilot.py +3 -0
- dbt_platform_helper/domain/maintenance_page.py +42 -15
- dbt_platform_helper/domain/pipelines.py +1 -1
- dbt_platform_helper/domain/terraform_environment.py +1 -1
- dbt_platform_helper/domain/versioning.py +125 -35
- dbt_platform_helper/providers/aws/interfaces.py +13 -0
- dbt_platform_helper/providers/aws/opensearch.py +23 -0
- dbt_platform_helper/providers/aws/redis.py +21 -0
- dbt_platform_helper/providers/cache.py +40 -4
- dbt_platform_helper/providers/config_validator.py +15 -14
- dbt_platform_helper/providers/copilot.py +1 -1
- dbt_platform_helper/providers/io.py +3 -0
- dbt_platform_helper/providers/kms.py +22 -0
- dbt_platform_helper/providers/load_balancers.py +26 -15
- dbt_platform_helper/providers/semantic_version.py +7 -4
- dbt_platform_helper/providers/version.py +21 -3
- dbt_platform_helper/providers/yaml_file.py +0 -1
- dbt_platform_helper/utils/aws.py +27 -4
- dbt_platform_helper/utils/files.py +0 -6
- dbt_platform_helper/utils/{versioning.py → tool_versioning.py} +11 -6
- {dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/METADATA +1 -1
- {dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/RECORD +38 -37
- dbt_platform_helper/providers/opensearch.py +0 -36
- dbt_platform_helper/providers/platform_helper_versioning.py +0 -107
- dbt_platform_helper/providers/redis.py +0 -34
- /dbt_platform_helper/providers/{aws.py → aws/exceptions.py} +0 -0
- {dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/LICENSE +0 -0
- {dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/WHEEL +0 -0
- {dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/entry_points.txt +0 -0
|
@@ -51,9 +51,3 @@ def generate_override_files_from_template(base_path, overrides_path, output_dir,
|
|
|
51
51
|
|
|
52
52
|
generate_files_for_dir("*")
|
|
53
53
|
generate_files_for_dir("bin/*")
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
# TODO: we've moved this from versioning utils and removed the duplication in platform_helper_versioning
|
|
57
|
-
# Need to review if this is the correct place for this function to reside longer-term
|
|
58
|
-
def running_as_installed_package():
|
|
59
|
-
return "site-packages" in __file__
|
|
@@ -3,14 +3,16 @@ import subprocess
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
from dbt_platform_helper.constants import DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION
|
|
6
|
-
from dbt_platform_helper.
|
|
7
|
-
|
|
8
|
-
)
|
|
6
|
+
from dbt_platform_helper.domain.versioning import PlatformHelperVersioning
|
|
7
|
+
from dbt_platform_helper.providers.config import ConfigProvider
|
|
9
8
|
from dbt_platform_helper.providers.semantic_version import PlatformHelperVersionStatus
|
|
10
9
|
from dbt_platform_helper.providers.semantic_version import SemanticVersion
|
|
11
10
|
from dbt_platform_helper.providers.semantic_version import VersionStatus
|
|
12
11
|
from dbt_platform_helper.providers.validation import ValidationException
|
|
12
|
+
from dbt_platform_helper.providers.version import DeprecatedVersionFileVersionProvider
|
|
13
13
|
from dbt_platform_helper.providers.version import GithubVersionProvider
|
|
14
|
+
from dbt_platform_helper.providers.version import InstalledVersionProvider
|
|
15
|
+
from dbt_platform_helper.providers.version import PyPiVersionProvider
|
|
14
16
|
from dbt_platform_helper.providers.yaml_file import YamlFileProvider
|
|
15
17
|
|
|
16
18
|
|
|
@@ -19,9 +21,12 @@ def get_platform_helper_version_status(
|
|
|
19
21
|
include_project_versions=True,
|
|
20
22
|
yaml_provider=YamlFileProvider,
|
|
21
23
|
) -> PlatformHelperVersionStatus:
|
|
22
|
-
return PlatformHelperVersioning(
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
return PlatformHelperVersioning(
|
|
25
|
+
pypi_provider=PyPiVersionProvider,
|
|
26
|
+
installed_version_provider=InstalledVersionProvider(),
|
|
27
|
+
version_file_version_provider=DeprecatedVersionFileVersionProvider(yaml_provider),
|
|
28
|
+
config_provider=ConfigProvider(),
|
|
29
|
+
)._get_version_status(include_project_versions=include_project_versions)
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
def get_required_terraform_platform_modules_version(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dbt-platform-helper
|
|
3
|
-
Version: 13.
|
|
3
|
+
Version: 13.2.0
|
|
4
4
|
Summary: Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Department for Business and Trade Platform Team
|
|
@@ -3,55 +3,56 @@ dbt_platform_helper/README.md,sha256=B0qN2_u_ASqqgkGDWY2iwNGZt_9tUgMb9XqtaTuzYjw
|
|
|
3
3
|
dbt_platform_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
dbt_platform_helper/addon-plans.yml,sha256=O46a_ODsGG9KXmQY_1XbSGqrpSaHSLDe-SdROzHx8Go,4545
|
|
5
5
|
dbt_platform_helper/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
dbt_platform_helper/commands/application.py,sha256=
|
|
7
|
-
dbt_platform_helper/commands/codebase.py,sha256
|
|
8
|
-
dbt_platform_helper/commands/conduit.py,sha256=
|
|
9
|
-
dbt_platform_helper/commands/config.py,sha256=
|
|
10
|
-
dbt_platform_helper/commands/copilot.py,sha256=
|
|
6
|
+
dbt_platform_helper/commands/application.py,sha256=OUQsahXXHSEKxmXAmK8fSy_bTLNwM_TdLuv6CvffRPk,10126
|
|
7
|
+
dbt_platform_helper/commands/codebase.py,sha256=Hl1QW1_9WbgRtcyfN3iN9OXl0pVzD78k9czT2graRyo,2355
|
|
8
|
+
dbt_platform_helper/commands/conduit.py,sha256=v5geTJzRHkOnbFfOqmjO6b57HXhs4YxTo_zJgDEYB0A,2300
|
|
9
|
+
dbt_platform_helper/commands/config.py,sha256=hyOPbLkO-DEh_gcNbpYq-J2zo7e_FAMUZws3lknmYbg,11791
|
|
10
|
+
dbt_platform_helper/commands/copilot.py,sha256=YYYcS-PHJ8IQ_aCyqTzcswwx745gd8OQH9OSssljILs,1521
|
|
11
11
|
dbt_platform_helper/commands/database.py,sha256=aG3zcMHL5PE96b7LSAu0FGCbgcycQej3AGRcd-bpXUo,4115
|
|
12
|
-
dbt_platform_helper/commands/environment.py,sha256=
|
|
13
|
-
dbt_platform_helper/commands/generate.py,sha256=
|
|
14
|
-
dbt_platform_helper/commands/notify.py,sha256=
|
|
15
|
-
dbt_platform_helper/commands/pipeline.py,sha256=
|
|
16
|
-
dbt_platform_helper/commands/secrets.py,sha256=
|
|
17
|
-
dbt_platform_helper/commands/version.py,sha256=
|
|
12
|
+
dbt_platform_helper/commands/environment.py,sha256=kOmS6NQnl2X21eYpEhajvAIBeg5KyQ5Mm81SaOBkjqE,4003
|
|
13
|
+
dbt_platform_helper/commands/generate.py,sha256=4M0ZiGN2w-bwgPMxeItFfT6vA7sOMjuceHEN7RAYkhc,735
|
|
14
|
+
dbt_platform_helper/commands/notify.py,sha256=MWVlNalASSq0WghE5LjMrM6C7cGv8QosbmU5iXuI2bo,3864
|
|
15
|
+
dbt_platform_helper/commands/pipeline.py,sha256=tw6pE429FVGj8JoAvDnrpkJzC-qi6JJch7PDz2cKBvM,2983
|
|
16
|
+
dbt_platform_helper/commands/secrets.py,sha256=ommqp__Vus_OaJAJYzUdC-08xpomx01deyT0NljsTNs,3974
|
|
17
|
+
dbt_platform_helper/commands/version.py,sha256=gRQkmcFTz90SbYhO1L-j727AuZ_gnjQfcnsNN7CzBs4,1376
|
|
18
18
|
dbt_platform_helper/constants.py,sha256=DpHGG54lwjw3XGp2TKCEGNmzaz083lAWMGkEabujDrw,1050
|
|
19
19
|
dbt_platform_helper/default-extensions.yml,sha256=SU1ZitskbuEBpvE7efc3s56eAUF11j70brhj_XrNMMo,493
|
|
20
20
|
dbt_platform_helper/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
dbt_platform_helper/domain/codebase.py,sha256=
|
|
21
|
+
dbt_platform_helper/domain/codebase.py,sha256=sdQ9qL-HZ5NbVEXWCqyDhlRsDrJsoO_CdFE0Yf97a1A,10808
|
|
22
22
|
dbt_platform_helper/domain/conduit.py,sha256=5C5GnF5jssJ1rFFCY6qaKgvLjYUkyytRJE4tHlanYa0,4370
|
|
23
|
-
dbt_platform_helper/domain/copilot.py,sha256=
|
|
23
|
+
dbt_platform_helper/domain/copilot.py,sha256=K6nw3BvZ0DyFHQCBTl3BRqMB4Iu5zjFdEOcmA2sMLdo,14648
|
|
24
24
|
dbt_platform_helper/domain/copilot_environment.py,sha256=yPt6ZarOvFPo06XwY1sU5MOQsoV7TEsKSQHyM-G8aGc,9058
|
|
25
25
|
dbt_platform_helper/domain/database_copy.py,sha256=CKvI9LsHyowg0bPT9jImk07w4TyQLPoInQoU2TUDiJQ,9485
|
|
26
|
-
dbt_platform_helper/domain/maintenance_page.py,sha256=
|
|
27
|
-
dbt_platform_helper/domain/pipelines.py,sha256=
|
|
28
|
-
dbt_platform_helper/domain/terraform_environment.py,sha256=
|
|
29
|
-
dbt_platform_helper/domain/versioning.py,sha256=
|
|
26
|
+
dbt_platform_helper/domain/maintenance_page.py,sha256=h7uYlUi4rlaDV9DvdElb2yD4H6Nz7dHMx3RIQfjHFZw,14258
|
|
27
|
+
dbt_platform_helper/domain/pipelines.py,sha256=mUvGaNMtBAUemsb-fHDcpWV-9LfqGoSogI2LwDnvt0I,6503
|
|
28
|
+
dbt_platform_helper/domain/terraform_environment.py,sha256=7ZKLZ8Zk6-V_IPaCDUP8eYTRudqDjHxvFnbG6LIlLO4,1759
|
|
29
|
+
dbt_platform_helper/domain/versioning.py,sha256=JLIvonvZvjdaTdBF6bt9Tbrhu4GE8gHg8o9u3b6Djsg,6154
|
|
30
30
|
dbt_platform_helper/jinja2_tags.py,sha256=hKG6RS3zlxJHQ-Op9r2U2-MhWp4s3lZir4Ihe24ApJ0,540
|
|
31
31
|
dbt_platform_helper/platform_exception.py,sha256=bheZV9lqGvrCVTNT92349dVntNDEDWTEwciZgC83WzE,187
|
|
32
32
|
dbt_platform_helper/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
dbt_platform_helper/providers/aws.py,sha256=mlorH0fni6m8aUpm1x2jQPhaI3T0QsDMWpoGiSURBcI,1387
|
|
34
|
-
dbt_platform_helper/providers/
|
|
33
|
+
dbt_platform_helper/providers/aws/exceptions.py,sha256=mlorH0fni6m8aUpm1x2jQPhaI3T0QsDMWpoGiSURBcI,1387
|
|
34
|
+
dbt_platform_helper/providers/aws/interfaces.py,sha256=0JFggcUTJ8zERdxNVVpIiKvaaZeT2c-VECDG--MOi8E,285
|
|
35
|
+
dbt_platform_helper/providers/aws/opensearch.py,sha256=Qne2SoPllmacVSc7AxtjBlEbSBsRMbR_ySEkEymSF9k,581
|
|
36
|
+
dbt_platform_helper/providers/aws/redis.py,sha256=i3Kb00_BdqssjQg1wgZ-8GRXcEWQiORWnIEq6qkAXjQ,551
|
|
37
|
+
dbt_platform_helper/providers/cache.py,sha256=1hEwp0y9WYbEfgsp-RU9MyzIgCt1-4BxApgd_0uVweE,3615
|
|
35
38
|
dbt_platform_helper/providers/cloudformation.py,sha256=SvCZgEVqxdpKfQMRAG3KzFQ43YeOEDqMm2tKmFGtacY,5347
|
|
36
39
|
dbt_platform_helper/providers/config.py,sha256=nGpL2_-ko94Dd4YM5vDEpME_8IGEhWpFcLQqKkb_h8E,4145
|
|
37
|
-
dbt_platform_helper/providers/config_validator.py,sha256=
|
|
38
|
-
dbt_platform_helper/providers/copilot.py,sha256=
|
|
40
|
+
dbt_platform_helper/providers/config_validator.py,sha256=o67poy69XeCujefUodvRIz5FWTGcBNepuvBivP0IidQ,11139
|
|
41
|
+
dbt_platform_helper/providers/copilot.py,sha256=Pgdh1JS-so2thT7Jqipol5aVkA_CgU6doUmy3YjYSXs,5328
|
|
39
42
|
dbt_platform_helper/providers/ecr.py,sha256=lmLKGR5OQT8EyGsX-9M7oO0DHIyoMqgchBAVQBeoBZs,639
|
|
40
43
|
dbt_platform_helper/providers/ecs.py,sha256=XlQHYhZiLGrqR-1ZWMagGH2R2Hy7mCP6676eZL3YbNQ,3842
|
|
41
44
|
dbt_platform_helper/providers/files.py,sha256=cJdOV6Eupi-COmGUMxZMF10BZnMi3MCCipTVUnE_NPA,857
|
|
42
|
-
dbt_platform_helper/providers/io.py,sha256=
|
|
43
|
-
dbt_platform_helper/providers/
|
|
44
|
-
dbt_platform_helper/providers/
|
|
45
|
+
dbt_platform_helper/providers/io.py,sha256=KurX_2yfst8IzWkKaeUe3TG612Jy7OamIJHQzcsLERU,1344
|
|
46
|
+
dbt_platform_helper/providers/kms.py,sha256=JR2EU3icXePoJCtr7QnqDPj1wWbyn5Uf9CRFq3_4lRs,647
|
|
47
|
+
dbt_platform_helper/providers/load_balancers.py,sha256=KTsdpNttdUay_2d_IfC6oWbC8rWfs4Oh2eSgGMyK1Ag,10572
|
|
45
48
|
dbt_platform_helper/providers/platform_config_schema.py,sha256=1PjqzdOnhSncyX3BPpewl0be9xOBauCfnLLHOW40f2c,26972
|
|
46
|
-
dbt_platform_helper/providers/platform_helper_versioning.py,sha256=_2iKrghWh9JzEbDq5ZgH5o50r1L5bNCyXTNsQXlSvZE,4332
|
|
47
|
-
dbt_platform_helper/providers/redis.py,sha256=aj8pitxG9IKrMkL3fIYayQhcHPPzApdaXq0Uq_0yblg,1217
|
|
48
49
|
dbt_platform_helper/providers/secrets.py,sha256=6cYIR15dLdHmqxtWQpM6R71e0_Xgsg9V291HBG-0LV0,5272
|
|
49
|
-
dbt_platform_helper/providers/semantic_version.py,sha256=
|
|
50
|
+
dbt_platform_helper/providers/semantic_version.py,sha256=slUKfSgHbLSQP-vqcfaTzZCw6EIGc8yIlmEvh0Qx6zo,5266
|
|
50
51
|
dbt_platform_helper/providers/terraform_manifest.py,sha256=hrCjkuQIV0Ymt5MPLkh-BfXHtuAScXhWwNkVEp9K5Jg,9354
|
|
51
52
|
dbt_platform_helper/providers/validation.py,sha256=i2g-Mrd4hy_fGIfGa6ZQy4vTJ40OM44Fe_XpEifGWxs,126
|
|
52
|
-
dbt_platform_helper/providers/version.py,sha256=
|
|
53
|
+
dbt_platform_helper/providers/version.py,sha256=qdwoRi5_EHvDG2dKOWgNPQ_sZtsAuGmu9DCbarbtxs0,2888
|
|
53
54
|
dbt_platform_helper/providers/vpc.py,sha256=EIjjD71K1Ry3V1jyaAkAjZwlwu_FSTn-AS7kiJFiipA,2953
|
|
54
|
-
dbt_platform_helper/providers/yaml_file.py,sha256=
|
|
55
|
+
dbt_platform_helper/providers/yaml_file.py,sha256=q-1DWtuG9bfR24lOYzwCwzgOpGPwDaoJpLUB1DtdEmE,2179
|
|
55
56
|
dbt_platform_helper/templates/.copilot/config.yml,sha256=J_bA9sCtBdCPBRImpCBRnYvhQd4vpLYIXIU-lq9vbkA,158
|
|
56
57
|
dbt_platform_helper/templates/.copilot/image_build_run.sh,sha256=adYucYXEB-kAgZNjTQo0T6EIAY8sh_xCEvVhWKKQ8mw,164
|
|
57
58
|
dbt_platform_helper/templates/.copilot/phases/build.sh,sha256=umKXePcRvx4XyrRY0fAWIyYFtNjqBI2L8vIJk-V7C60,121
|
|
@@ -81,19 +82,19 @@ dbt_platform_helper/templates/svc/overrides/cfn.patches.yml,sha256=W7-d017akuUq9
|
|
|
81
82
|
dbt_platform_helper/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
83
|
dbt_platform_helper/utils/application.py,sha256=_O2ywJRYYdWfBVz4LzD07PLO9hSPJf7FylE6toH19KM,5448
|
|
83
84
|
dbt_platform_helper/utils/arn_parser.py,sha256=BaXzIxSOLdFmP_IfAxRq-0j-0Re1iCN7L4j2Zi5-CRQ,1304
|
|
84
|
-
dbt_platform_helper/utils/aws.py,sha256=
|
|
85
|
+
dbt_platform_helper/utils/aws.py,sha256=2QqONqwivHTLa18p5DlpnYO-5ZspzhuhmXE4iusRSn4,17767
|
|
85
86
|
dbt_platform_helper/utils/click.py,sha256=Fx4y4bbve1zypvog_sgK7tJtCocmzheoEFLBRv1lfdM,2943
|
|
86
87
|
dbt_platform_helper/utils/cloudfoundry.py,sha256=GnQ4fVLnDfOdNSrsJjI6ElZHqpgwINeoPn77cUH2UFY,484
|
|
87
|
-
dbt_platform_helper/utils/files.py,sha256=
|
|
88
|
+
dbt_platform_helper/utils/files.py,sha256=adQtG2E1IQHDKfeX06l6j1B7UTYukwBuR_uhJHaoi5M,1873
|
|
88
89
|
dbt_platform_helper/utils/git.py,sha256=7JGZMaI8-cU6-GjXIXjOlsYfKu_RppLOGyAicBd4n_8,704
|
|
89
90
|
dbt_platform_helper/utils/manifests.py,sha256=ji3UYHCxq9tTpkm4MlRa2y0-JOYYqq1pWZ2h_zpj0UU,507
|
|
90
91
|
dbt_platform_helper/utils/messages.py,sha256=nWA7BWLb7ND0WH5TejDN4OQUJSKYBxU4tyCzteCrfT0,142
|
|
91
92
|
dbt_platform_helper/utils/template.py,sha256=g-Db-0I6a6diOHkgK1nYA0IxJSO4TRrjqOvlyeOR32o,950
|
|
93
|
+
dbt_platform_helper/utils/tool_versioning.py,sha256=iepmQJkiXS2jPDnJcoR1T4PYrRbt3OIdvddJcG3ZVOU,4206
|
|
92
94
|
dbt_platform_helper/utils/validation.py,sha256=coN7WsKW_nPGW9EU23AInBkAuvUl1NfQvc2bjVtgs14,1188
|
|
93
|
-
dbt_platform_helper/utils/versioning.py,sha256=hlZdHSpPtOrHZmkA3kiE-rALX02ZUXWGCpZT2xcS4G8,3726
|
|
94
95
|
platform_helper.py,sha256=lUGBsVgsGGJSDXxRvtvZCo2ybRAWuJXosbzfTzkIxU8,1892
|
|
95
|
-
dbt_platform_helper-13.
|
|
96
|
-
dbt_platform_helper-13.
|
|
97
|
-
dbt_platform_helper-13.
|
|
98
|
-
dbt_platform_helper-13.
|
|
99
|
-
dbt_platform_helper-13.
|
|
96
|
+
dbt_platform_helper-13.2.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
|
|
97
|
+
dbt_platform_helper-13.2.0.dist-info/METADATA,sha256=jtiVbjA6HBJYRorbDd_aHvMwq-zcMN00UnXsIOiAE2Y,3243
|
|
98
|
+
dbt_platform_helper-13.2.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
99
|
+
dbt_platform_helper-13.2.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
|
|
100
|
+
dbt_platform_helper-13.2.0.dist-info/RECORD,,
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from dbt_platform_helper.providers.cache import CacheProvider
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class OpensearchProvider:
|
|
5
|
-
|
|
6
|
-
def __init__(self, opensearch_client):
|
|
7
|
-
self.opensearch_client = opensearch_client
|
|
8
|
-
|
|
9
|
-
def get_supported_opensearch_versions(self) -> list[str]:
|
|
10
|
-
|
|
11
|
-
cache_provider = self.__get_cache_provider()
|
|
12
|
-
|
|
13
|
-
if cache_provider.cache_refresh_required("opensearch"):
|
|
14
|
-
|
|
15
|
-
response = self.opensearch_client.list_versions()
|
|
16
|
-
all_versions = response["Versions"]
|
|
17
|
-
|
|
18
|
-
opensearch_versions = [
|
|
19
|
-
version for version in all_versions if not version.startswith("Elasticsearch_")
|
|
20
|
-
]
|
|
21
|
-
supported_versions = [
|
|
22
|
-
version.removeprefix("OpenSearch_") for version in opensearch_versions
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
cache_provider.update_cache("opensearch", supported_versions)
|
|
26
|
-
|
|
27
|
-
return supported_versions
|
|
28
|
-
|
|
29
|
-
else:
|
|
30
|
-
return cache_provider.read_supported_versions_from_cache("opensearch")
|
|
31
|
-
|
|
32
|
-
# TODO - cache provider instantiated here rather than via dependancy injection since it will likely only be used in the get_supported_opensearch_versions method.
|
|
33
|
-
# If another method is added which needs a CacheProvider, it should be injected into the constructor instead.
|
|
34
|
-
@staticmethod
|
|
35
|
-
def __get_cache_provider():
|
|
36
|
-
return CacheProvider()
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
|
|
4
|
-
from dbt_platform_helper.constants import PLATFORM_HELPER_VERSION_FILE
|
|
5
|
-
from dbt_platform_helper.providers.config import ConfigProvider
|
|
6
|
-
from dbt_platform_helper.providers.files import FileProvider
|
|
7
|
-
from dbt_platform_helper.providers.io import ClickIOProvider
|
|
8
|
-
from dbt_platform_helper.providers.semantic_version import (
|
|
9
|
-
IncompatibleMajorVersionException,
|
|
10
|
-
)
|
|
11
|
-
from dbt_platform_helper.providers.semantic_version import (
|
|
12
|
-
IncompatibleMinorVersionException,
|
|
13
|
-
)
|
|
14
|
-
from dbt_platform_helper.providers.semantic_version import PlatformHelperVersionStatus
|
|
15
|
-
from dbt_platform_helper.providers.semantic_version import SemanticVersion
|
|
16
|
-
from dbt_platform_helper.providers.version import LocalVersionProvider
|
|
17
|
-
from dbt_platform_helper.providers.version import LocalVersionProviderException
|
|
18
|
-
from dbt_platform_helper.providers.version import PyPiVersionProvider
|
|
19
|
-
from dbt_platform_helper.providers.yaml_file import FileProviderException
|
|
20
|
-
from dbt_platform_helper.providers.yaml_file import YamlFileProvider
|
|
21
|
-
from dbt_platform_helper.utils.files import running_as_installed_package
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class PlatformHelperVersioning:
|
|
25
|
-
def __init__(
|
|
26
|
-
self,
|
|
27
|
-
io: ClickIOProvider = ClickIOProvider(),
|
|
28
|
-
file_provider: FileProvider = YamlFileProvider,
|
|
29
|
-
config_provider: ConfigProvider = ConfigProvider(),
|
|
30
|
-
pypi_provider: PyPiVersionProvider = PyPiVersionProvider,
|
|
31
|
-
local_version_provider: LocalVersionProvider = LocalVersionProvider(),
|
|
32
|
-
):
|
|
33
|
-
self.io = io
|
|
34
|
-
self.file_provider = file_provider
|
|
35
|
-
self.config_provider = config_provider
|
|
36
|
-
self.pypi_provider = pypi_provider
|
|
37
|
-
self.local_version_provider = local_version_provider
|
|
38
|
-
|
|
39
|
-
def get_status(
|
|
40
|
-
self,
|
|
41
|
-
include_project_versions: bool = True,
|
|
42
|
-
) -> PlatformHelperVersionStatus:
|
|
43
|
-
try:
|
|
44
|
-
locally_installed_version = self.local_version_provider.get_installed_tool_version(
|
|
45
|
-
"dbt-platform-helper"
|
|
46
|
-
)
|
|
47
|
-
except LocalVersionProviderException:
|
|
48
|
-
locally_installed_version = None
|
|
49
|
-
|
|
50
|
-
latest_release = self.pypi_provider.get_latest_version("dbt-platform-helper")
|
|
51
|
-
|
|
52
|
-
if not include_project_versions:
|
|
53
|
-
return PlatformHelperVersionStatus(
|
|
54
|
-
local=locally_installed_version,
|
|
55
|
-
latest=latest_release,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
deprecated_version_file = Path(PLATFORM_HELPER_VERSION_FILE)
|
|
59
|
-
try:
|
|
60
|
-
loaded_version = self.file_provider.load(deprecated_version_file)
|
|
61
|
-
version_from_file = SemanticVersion.from_string(loaded_version)
|
|
62
|
-
except FileProviderException:
|
|
63
|
-
version_from_file = None
|
|
64
|
-
|
|
65
|
-
platform_config_default, pipeline_overrides = None, {}
|
|
66
|
-
|
|
67
|
-
platform_config = self.config_provider.load_unvalidated_config_file()
|
|
68
|
-
|
|
69
|
-
if platform_config:
|
|
70
|
-
platform_config_default = SemanticVersion.from_string(
|
|
71
|
-
platform_config.get("default_versions", {}).get("platform-helper")
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
pipeline_overrides = {
|
|
75
|
-
name: pipeline.get("versions", {}).get("platform-helper")
|
|
76
|
-
for name, pipeline in platform_config.get("environment_pipelines", {}).items()
|
|
77
|
-
if pipeline.get("versions", {}).get("platform-helper")
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
out = PlatformHelperVersionStatus(
|
|
81
|
-
local=locally_installed_version,
|
|
82
|
-
latest=latest_release,
|
|
83
|
-
deprecated_version_file=version_from_file,
|
|
84
|
-
platform_config_default=platform_config_default,
|
|
85
|
-
pipeline_overrides=pipeline_overrides,
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
return out
|
|
89
|
-
|
|
90
|
-
def check_if_needs_update(self):
|
|
91
|
-
if not running_as_installed_package() or "PLATFORM_TOOLS_SKIP_VERSION_CHECK" in os.environ:
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
version_status = self.get_status(include_project_versions=False)
|
|
95
|
-
|
|
96
|
-
message = (
|
|
97
|
-
f"You are running platform-helper v{version_status.local}, upgrade to "
|
|
98
|
-
f"v{version_status.latest} by running run `pip install "
|
|
99
|
-
"--upgrade dbt-platform-helper`."
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
try:
|
|
103
|
-
version_status.local.validate_compatibility_with(version_status.latest)
|
|
104
|
-
except IncompatibleMajorVersionException:
|
|
105
|
-
self.io.error(message)
|
|
106
|
-
except IncompatibleMinorVersionException:
|
|
107
|
-
self.io.warn(message)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from dbt_platform_helper.providers.cache import CacheProvider
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class RedisProvider:
|
|
5
|
-
def __init__(self, elasticache_client):
|
|
6
|
-
self.elasticache_client = elasticache_client
|
|
7
|
-
|
|
8
|
-
def get_supported_redis_versions(self):
|
|
9
|
-
|
|
10
|
-
cache_provider = self.__get_cache_provider()
|
|
11
|
-
|
|
12
|
-
if cache_provider.cache_refresh_required("redis"):
|
|
13
|
-
|
|
14
|
-
supported_versions_response = self.elasticache_client.describe_cache_engine_versions(
|
|
15
|
-
Engine="redis"
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
supported_versions = [
|
|
19
|
-
version["EngineVersion"]
|
|
20
|
-
for version in supported_versions_response["CacheEngineVersions"]
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
cache_provider.update_cache("redis", supported_versions)
|
|
24
|
-
|
|
25
|
-
return supported_versions
|
|
26
|
-
|
|
27
|
-
else:
|
|
28
|
-
return cache_provider.read_supported_versions_from_cache("redis")
|
|
29
|
-
|
|
30
|
-
# TODO - cache provider instantiated here rather than via dependancy injection since it will likely only be used in the get_supported_redis_versions method.
|
|
31
|
-
# If another method is added which needs a CacheProvider, it should be injected into the constructor instead.
|
|
32
|
-
@staticmethod
|
|
33
|
-
def __get_cache_provider():
|
|
34
|
-
return CacheProvider()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-13.1.2.dist-info → dbt_platform_helper-13.2.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|