dbt-platform-helper 13.4.1__py3-none-any.whl → 14.0.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.

Files changed (46) hide show
  1. dbt_platform_helper/COMMANDS.md +26 -57
  2. dbt_platform_helper/commands/config.py +9 -0
  3. dbt_platform_helper/commands/environment.py +3 -7
  4. dbt_platform_helper/commands/notify.py +24 -77
  5. dbt_platform_helper/commands/pipeline.py +6 -12
  6. dbt_platform_helper/commands/secrets.py +1 -1
  7. dbt_platform_helper/constants.py +7 -5
  8. dbt_platform_helper/domain/codebase.py +0 -5
  9. dbt_platform_helper/domain/config.py +16 -9
  10. dbt_platform_helper/domain/copilot_environment.py +3 -3
  11. dbt_platform_helper/domain/database_copy.py +1 -1
  12. dbt_platform_helper/domain/maintenance_page.py +3 -3
  13. dbt_platform_helper/domain/notify.py +64 -0
  14. dbt_platform_helper/domain/pipelines.py +20 -16
  15. dbt_platform_helper/domain/terraform_environment.py +18 -11
  16. dbt_platform_helper/domain/versioning.py +18 -78
  17. dbt_platform_helper/providers/aws/exceptions.py +1 -1
  18. dbt_platform_helper/providers/cloudformation.py +1 -1
  19. dbt_platform_helper/providers/config.py +119 -17
  20. dbt_platform_helper/providers/config_validator.py +4 -31
  21. dbt_platform_helper/providers/copilot.py +3 -3
  22. dbt_platform_helper/providers/io.py +1 -1
  23. dbt_platform_helper/providers/load_balancers.py +6 -6
  24. dbt_platform_helper/providers/platform_config_schema.py +24 -29
  25. dbt_platform_helper/providers/schema_migrations/__init__.py +0 -0
  26. dbt_platform_helper/providers/schema_migrations/schema_v0_to_v1_migration.py +43 -0
  27. dbt_platform_helper/providers/schema_migrator.py +77 -0
  28. dbt_platform_helper/providers/secrets.py +5 -5
  29. dbt_platform_helper/providers/semantic_version.py +6 -1
  30. dbt_platform_helper/providers/slack_channel_notifier.py +62 -0
  31. dbt_platform_helper/providers/terraform_manifest.py +8 -10
  32. dbt_platform_helper/providers/version.py +1 -18
  33. dbt_platform_helper/providers/version_status.py +8 -61
  34. dbt_platform_helper/providers/yaml_file.py +23 -1
  35. dbt_platform_helper/templates/environment-pipelines/main.tf +1 -1
  36. dbt_platform_helper/utils/application.py +1 -1
  37. dbt_platform_helper/utils/aws.py +3 -3
  38. dbt_platform_helper/utils/git.py +0 -15
  39. {dbt_platform_helper-13.4.1.dist-info → dbt_platform_helper-14.0.0.dist-info}/METADATA +4 -4
  40. {dbt_platform_helper-13.4.1.dist-info → dbt_platform_helper-14.0.0.dist-info}/RECORD +44 -41
  41. platform_helper.py +0 -2
  42. dbt_platform_helper/commands/version.py +0 -37
  43. dbt_platform_helper/utils/tool_versioning.py +0 -12
  44. {dbt_platform_helper-13.4.1.dist-info → dbt_platform_helper-14.0.0.dist-info}/LICENSE +0 -0
  45. {dbt_platform_helper-13.4.1.dist-info → dbt_platform_helper-14.0.0.dist-info}/WHEEL +0 -0
  46. {dbt_platform_helper-13.4.1.dist-info → dbt_platform_helper-14.0.0.dist-info}/entry_points.txt +0 -0
@@ -1,13 +1,16 @@
1
1
  from dataclasses import dataclass
2
- from dataclasses import field
3
- from typing import Dict
4
- from typing import Optional
5
2
 
6
- from dbt_platform_helper.constants import PLATFORM_CONFIG_FILE
7
- from dbt_platform_helper.constants import PLATFORM_HELPER_VERSION_FILE
3
+ from dbt_platform_helper.platform_exception import PlatformException
8
4
  from dbt_platform_helper.providers.semantic_version import SemanticVersion
9
5
 
10
6
 
7
+ class UnsupportedVersionException(PlatformException):
8
+ def __init__(self, version: str):
9
+ super().__init__(
10
+ f"""Platform-helper version {version} is not compatible with platform-helper. Please install version platform-helper version 14 or later."""
11
+ )
12
+
13
+
11
14
  @dataclass
12
15
  class VersionStatus:
13
16
  installed: SemanticVersion = None
@@ -22,59 +25,3 @@ class VersionStatus:
22
25
 
23
26
  def is_outdated(self):
24
27
  return self.installed != self.latest
25
-
26
- def validate(self):
27
- pass
28
-
29
-
30
- @dataclass
31
- class PlatformHelperVersionStatus(VersionStatus):
32
- installed: Optional[SemanticVersion] = None
33
- latest: Optional[SemanticVersion] = None
34
- deprecated_version_file: Optional[SemanticVersion] = None
35
- platform_config_default: Optional[SemanticVersion] = None
36
- pipeline_overrides: Optional[Dict[str, str]] = field(default_factory=dict)
37
-
38
- def __str__(self):
39
- semantic_version_attrs = {
40
- key: value for key, value in vars(self).items() if isinstance(value, SemanticVersion)
41
- }
42
-
43
- class_str = ", ".join(f"{key}: {value}" for key, value in semantic_version_attrs.items())
44
-
45
- if self.pipeline_overrides.items():
46
- pipeline_overrides_str = "pipeline_overrides: " + ", ".join(
47
- f"{key}: {value}" for key, value in self.pipeline_overrides.items()
48
- )
49
- class_str = ", ".join([class_str, pipeline_overrides_str])
50
-
51
- return f"{self.__class__.__name__}: {class_str}"
52
-
53
- def validate(self) -> dict:
54
- if self.platform_config_default and not self.deprecated_version_file:
55
- return {}
56
-
57
- warnings = []
58
- errors = []
59
-
60
- missing_default_version_message = f"Create a section in the root of '{PLATFORM_CONFIG_FILE}':\n\ndefault_versions:\n platform-helper: "
61
- deprecation_message = (
62
- f"Please delete '{PLATFORM_HELPER_VERSION_FILE}' as it is now deprecated."
63
- )
64
-
65
- if self.platform_config_default and self.deprecated_version_file:
66
- warnings.append(deprecation_message)
67
-
68
- if not self.platform_config_default and self.deprecated_version_file:
69
- warnings.append(deprecation_message)
70
- warnings.append(f"{missing_default_version_message}{self.deprecated_version_file}\n")
71
-
72
- if not self.platform_config_default and not self.deprecated_version_file:
73
- message = f"Cannot get dbt-platform-helper version from '{PLATFORM_CONFIG_FILE}'.\n"
74
- message += f"{missing_default_version_message}{self.installed}\n"
75
- errors.append(message)
76
-
77
- return {
78
- "warnings": warnings,
79
- "errors": errors,
80
- }
@@ -29,6 +29,7 @@ class DuplicateKeysException(YamlFileProviderException):
29
29
 
30
30
 
31
31
  class YamlFileProvider:
32
+ @staticmethod
32
33
  def load(path: str) -> dict:
33
34
  """
34
35
  Raises:
@@ -49,10 +50,21 @@ class YamlFileProvider:
49
50
 
50
51
  return yaml_content
51
52
 
53
+ @staticmethod
52
54
  def write(path: str, contents: dict, comment: str = ""):
53
55
  with open(path, "w") as file:
54
56
  file.write(comment)
55
- yaml.dump(contents, file)
57
+ yaml.add_representer(str, account_number_representer)
58
+ yaml.add_representer(type(None), null_value_representer)
59
+
60
+ yaml.dump(
61
+ contents,
62
+ file,
63
+ canonical=False,
64
+ sort_keys=False,
65
+ default_style=None,
66
+ default_flow_style=False,
67
+ )
56
68
 
57
69
  @staticmethod
58
70
  def lint_yaml_for_duplicate_keys(path):
@@ -71,3 +83,13 @@ class YamlFileProvider:
71
83
  ]
72
84
  if duplicate_keys:
73
85
  raise DuplicateKeysException(",".join(duplicate_keys))
86
+
87
+
88
+ def account_number_representer(dumper, data):
89
+ if data.isdigit():
90
+ return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="'")
91
+ return dumper.represent_scalar("tag:yaml.org,2002:str", data, style=None)
92
+
93
+
94
+ def null_value_representer(dumper, data):
95
+ return dumper.represent_scalar("tag:yaml.org,2002:null", "")
@@ -34,7 +34,7 @@ terraform {
34
34
 
35
35
 
36
36
  module "environment-pipelines" {
37
- source = "git::https://github.com/uktrade/terraform-platform-modules.git//environment-pipelines?depth=1&ref={{ terraform_platform_modules_version }}"
37
+ source = "git::https://github.com/uktrade/platform-tools.git//terraform/environment-pipelines?depth=1&ref={{ platform_helper_version }}"
38
38
 
39
39
  for_each = local.pipelines
40
40
 
@@ -125,7 +125,7 @@ def load_application(app=None, default_session=None) -> Application:
125
125
 
126
126
  def get_application_name(abort=abort_with_error):
127
127
  if Path(PLATFORM_CONFIG_FILE).exists():
128
- config = ConfigProvider()
128
+ config = ConfigProvider(installed_version_provider="N/A")
129
129
  try:
130
130
  app_config = config.load_unvalidated_config_file()
131
131
  return app_config["application"]
@@ -220,7 +220,7 @@ def get_account_details(sts_client=None):
220
220
 
221
221
 
222
222
  def get_postgres_connection_data_updated_with_master_secret(session, parameter_name, secret_arn):
223
- # Todo: This is pretty much the same as dbt_platform_helper.providers.secrets.Secrets.get_postgres_connection_data_updated_with_master_secret
223
+ # TODO: DBTP-1968: This is pretty much the same as dbt_platform_helper.providers.secrets.Secrets.get_postgres_connection_data_updated_with_master_secret
224
224
  ssm_client = session.client("ssm")
225
225
  secrets_manager_client = session.client("secretsmanager")
226
226
  response = ssm_client.get_parameter(Name=parameter_name, WithDecryption=True)
@@ -269,10 +269,10 @@ def start_pipeline_and_return_execution_id(codepipeline_client, build_options):
269
269
  return response["pipelineExecutionId"]
270
270
 
271
271
 
272
- # Todo: This should probably be in the AWS Copilot provider
272
+ # TODO: DBTP-1888: This should probably be in the AWS Copilot provider
273
273
  def check_codebase_exists(session: Session, application, codebase: str):
274
274
  try:
275
- # Todo: Can this leverage dbt_platform_helper.providers.secrets.Secrets.get_connection_secret_arn?
275
+ # TODO: DBTP-1968: Can this leverage dbt_platform_helper.providers.secrets.Secrets.get_connection_secret_arn?
276
276
  ssm_client = session.client("ssm")
277
277
  json.loads(
278
278
  ssm_client.get_parameter(
@@ -1,12 +1,6 @@
1
1
  import re
2
2
  import subprocess
3
3
 
4
- from dbt_platform_helper.platform_exception import PlatformException
5
-
6
-
7
- class CommitNotFoundException(PlatformException):
8
- pass
9
-
10
4
 
11
5
  def git_remote():
12
6
  git_repo = subprocess.run(
@@ -20,12 +14,3 @@ def extract_repository_name(repository_url):
20
14
  return
21
15
 
22
16
  return re.search(r"([^/:]*/[^/]*)\.git", repository_url).group(1)
23
-
24
-
25
- def check_if_commit_exists(commit):
26
- branches_containing_commit = subprocess.run(
27
- ["git", "branch", "-r", "--contains", f"{commit}"], capture_output=True, text=True
28
- )
29
-
30
- if branches_containing_commit.stderr:
31
- raise CommitNotFoundException()
@@ -1,21 +1,20 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbt-platform-helper
3
- Version: 13.4.1
3
+ Version: 14.0.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
7
7
  Author-email: sre-team@digital.trade.gov.uk
8
- Requires-Python: >=3.9, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*
8
+ Requires-Python: >=3.9, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*, !=3.13.*
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
14
  Requires-Dist: Jinja2 (==3.1.6)
16
15
  Requires-Dist: PyYAML (==6.0.1)
17
16
  Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
18
- Requires-Dist: boto3 (>=1.28.24,<2.0.0)
17
+ Requires-Dist: boto3 (>=1.35.2,<2.0.0)
19
18
  Requires-Dist: boto3-stubs (>=1.26.148,<2.0.0)
20
19
  Requires-Dist: botocore (>=1.34.85,<2.0.0)
21
20
  Requires-Dist: certifi (>=2023.7.22,<2025.0.0)
@@ -29,6 +28,7 @@ Requires-Dist: jinja2-simple-tags (>=0.5.0,<0.6.0)
29
28
  Requires-Dist: jsonschema (>=4.17.0,<4.18.0)
30
29
  Requires-Dist: mypy-boto3-codebuild (>=1.26.0.post1,<2.0.0)
31
30
  Requires-Dist: prettytable (>=3.9.0,<4.0.0)
31
+ Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
32
32
  Requires-Dist: requests (>=2.31.0,<3.0.0)
33
33
  Requires-Dist: schema (==0.7.5)
34
34
  Requires-Dist: semver (>=3.0.2,<4.0.0)
@@ -1,4 +1,4 @@
1
- dbt_platform_helper/COMMANDS.md,sha256=mjqrylK4O07danqv_D5TD-ecu1B-7g9SuBHxe9L16Xc,22934
1
+ dbt_platform_helper/COMMANDS.md,sha256=gxvvghHlPmcxjhTdXxfSVDI4sYXx95HZrCykoo5DI0I,21731
2
2
  dbt_platform_helper/README.md,sha256=B0qN2_u_ASqqgkGDWY2iwNGZt_9tUgMb9XqtaTuzYjw,1530
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
@@ -6,58 +6,62 @@ dbt_platform_helper/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
6
6
  dbt_platform_helper/commands/application.py,sha256=OUQsahXXHSEKxmXAmK8fSy_bTLNwM_TdLuv6CvffRPk,10126
7
7
  dbt_platform_helper/commands/codebase.py,sha256=oNlZcP2w3XE5YP-JVl0rdqoJuXUrfe1ELZ5xAdgPvBk,3166
8
8
  dbt_platform_helper/commands/conduit.py,sha256=v5geTJzRHkOnbFfOqmjO6b57HXhs4YxTo_zJgDEYB0A,2300
9
- dbt_platform_helper/commands/config.py,sha256=7XRFgLHUg1n-k6DReEouVm9NzOm0zFtnBwDLyDLSBLw,1225
9
+ dbt_platform_helper/commands/config.py,sha256=4pgGgaH7Mp93UWdVoqZDc2eAmjsP7Yw1jjsviNWXsks,1442
10
10
  dbt_platform_helper/commands/copilot.py,sha256=L9UUuqD62q0aFrTTEUla3A1WJBz-vFBfVi6p455TTgQ,1458
11
11
  dbt_platform_helper/commands/database.py,sha256=2RJZEzaSqcNtDG1M2mZw-nB6agAd3GNAJsg2pjFF7vc,4407
12
- dbt_platform_helper/commands/environment.py,sha256=JTCkAVrlIOqgzdlT2y2pXp_9rQHc2In0sxhbQyj3jFw,3975
12
+ dbt_platform_helper/commands/environment.py,sha256=zexiry6_dbOmD8w2lBrgdcFQKAG7XyJg9pvNtwtgPRk,3616
13
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
- dbt_platform_helper/constants.py,sha256=DpHGG54lwjw3XGp2TKCEGNmzaz083lAWMGkEabujDrw,1050
14
+ dbt_platform_helper/commands/notify.py,sha256=H7QHbnYQnCD357Kesq7h16fT19imFI1BLtLA8x3ujTM,2504
15
+ dbt_platform_helper/commands/pipeline.py,sha256=PGpDDmyReVa4gdpXDwJEsHN51f5MgTIbm2AibTkuWrE,2580
16
+ dbt_platform_helper/commands/secrets.py,sha256=haSbF401H4XLzS9LWGLC6h_EcZHLcIF-rW1XkzUOy58,3985
17
+ dbt_platform_helper/constants.py,sha256=Ao2uvVRcxRN5SXqvW6Jq2srd7LuyGz1jPy4fg2N6XSk,1153
19
18
  dbt_platform_helper/default-extensions.yml,sha256=SU1ZitskbuEBpvE7efc3s56eAUF11j70brhj_XrNMMo,493
20
19
  dbt_platform_helper/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- dbt_platform_helper/domain/codebase.py,sha256=8L1MntK26CX8ZW-Nb3MdM5oMa8LdXgiV3t8IDMszIgg,12478
20
+ dbt_platform_helper/domain/codebase.py,sha256=9BTs7PNYaBRqthv5bAR6_dtiwmAQ1CIZjt3jN21aQv8,12228
22
21
  dbt_platform_helper/domain/conduit.py,sha256=5C5GnF5jssJ1rFFCY6qaKgvLjYUkyytRJE4tHlanYa0,4370
23
- dbt_platform_helper/domain/config.py,sha256=au45EnEAjv0RZUEDJ_0IQnsRV7wM0hHi-ZJ6LOnavYc,13361
22
+ dbt_platform_helper/domain/config.py,sha256=NtWAPkopwclKajYzkqbTOQtaMAy2KMU3hc77biBC2eM,13804
24
23
  dbt_platform_helper/domain/copilot.py,sha256=9L4h-WFwgRU8AMjf14PlDqwLqOpIRinkuPvhe-8Uk3c,15034
25
- dbt_platform_helper/domain/copilot_environment.py,sha256=yPt6ZarOvFPo06XwY1sU5MOQsoV7TEsKSQHyM-G8aGc,9058
26
- dbt_platform_helper/domain/database_copy.py,sha256=CKvI9LsHyowg0bPT9jImk07w4TyQLPoInQoU2TUDiJQ,9485
27
- dbt_platform_helper/domain/maintenance_page.py,sha256=CfSJJYXOaBC0S4tKsMl0Pz-_6r0DR5J8BUkBQUTx2nM,14494
28
- dbt_platform_helper/domain/pipelines.py,sha256=mUvGaNMtBAUemsb-fHDcpWV-9LfqGoSogI2LwDnvt0I,6503
29
- dbt_platform_helper/domain/terraform_environment.py,sha256=7ZKLZ8Zk6-V_IPaCDUP8eYTRudqDjHxvFnbG6LIlLO4,1759
30
- dbt_platform_helper/domain/versioning.py,sha256=9AdQ_pW20RUwdvdSgY_OzqlDkFaevLNAeh5WZ-w0Xww,7865
24
+ dbt_platform_helper/domain/copilot_environment.py,sha256=fL3XJCOfO0BJRCrCoBPFCcshrQoX1FeSYNTziOEaH4A,9093
25
+ dbt_platform_helper/domain/database_copy.py,sha256=AedcBTfKDod0OlMqVP6zb9c_9VIc3vqro0oUUhh7nwc,9497
26
+ dbt_platform_helper/domain/maintenance_page.py,sha256=0_dgM5uZvjVNBKcqScspjutinMh-7Hdm7jBEgUPujrk,14529
27
+ dbt_platform_helper/domain/notify.py,sha256=wTWBhFQkZG31V2OlZJVqzUPRTZqJxHtij9PAURXoxnU,1902
28
+ dbt_platform_helper/domain/pipelines.py,sha256=BUoXlV4pIKSw3Ry6oVMzd0mBU6tfl_tvqp-1zxHrQdk,6552
29
+ dbt_platform_helper/domain/terraform_environment.py,sha256=kPfA44KCNnF_7ihQPuxaShLjEnVShrbruLwr5xoCeRc,1825
30
+ dbt_platform_helper/domain/versioning.py,sha256=L1PKuAnGtd1E6WT2cssC9hCVUibllntk-Tut8vdgJfk,5502
31
31
  dbt_platform_helper/jinja2_tags.py,sha256=hKG6RS3zlxJHQ-Op9r2U2-MhWp4s3lZir4Ihe24ApJ0,540
32
32
  dbt_platform_helper/platform_exception.py,sha256=bheZV9lqGvrCVTNT92349dVntNDEDWTEwciZgC83WzE,187
33
33
  dbt_platform_helper/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  dbt_platform_helper/providers/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- dbt_platform_helper/providers/aws/exceptions.py,sha256=I6PQZjTWhJh9tgoKd9bkYwVFDRSgrri-0YhobLVERFo,1731
35
+ dbt_platform_helper/providers/aws/exceptions.py,sha256=TOaUdTySNGZ9fU3kofgIj6upMmd4IT2f0rpbn8YR6fs,1742
36
36
  dbt_platform_helper/providers/aws/interfaces.py,sha256=0JFggcUTJ8zERdxNVVpIiKvaaZeT2c-VECDG--MOi8E,285
37
37
  dbt_platform_helper/providers/aws/opensearch.py,sha256=Qne2SoPllmacVSc7AxtjBlEbSBsRMbR_ySEkEymSF9k,581
38
38
  dbt_platform_helper/providers/aws/redis.py,sha256=i3Kb00_BdqssjQg1wgZ-8GRXcEWQiORWnIEq6qkAXjQ,551
39
39
  dbt_platform_helper/providers/aws/sso_auth.py,sha256=1cE9gVu0XZoE3Nycs1anShistRU_CZCOGMFzFpaAq0w,2275
40
40
  dbt_platform_helper/providers/cache.py,sha256=1hEwp0y9WYbEfgsp-RU9MyzIgCt1-4BxApgd_0uVweE,3615
41
- dbt_platform_helper/providers/cloudformation.py,sha256=SvCZgEVqxdpKfQMRAG3KzFQ43YeOEDqMm2tKmFGtacY,5347
42
- dbt_platform_helper/providers/config.py,sha256=X84xQxTVWDcuLAeGBM4A5uVhEiXIzjiVfCB9nAjqVf8,4249
43
- dbt_platform_helper/providers/config_validator.py,sha256=-n9KjfTQhk2NPK5Vw1Bbz9z-uTSQfWPWUbtRLp1EbTs,11088
44
- dbt_platform_helper/providers/copilot.py,sha256=Pgdh1JS-so2thT7Jqipol5aVkA_CgU6doUmy3YjYSXs,5328
41
+ dbt_platform_helper/providers/cloudformation.py,sha256=syMH6xc-ALRbsYQvlw9RcjX7c1MufFzwEdEzp_ucWig,5359
42
+ dbt_platform_helper/providers/config.py,sha256=7Mq0i-cg_YeAbWOlnDI0GGpszDNPRvFZiX49ETR3YDE,9863
43
+ dbt_platform_helper/providers/config_validator.py,sha256=uF1GB-fl0ZuXVCtLNANgnY22UbiWZniBg1PiXgzGzuU,9923
44
+ dbt_platform_helper/providers/copilot.py,sha256=eruF_ZWWtrJFNQVuzXRMRfqOWGCXpvR7yu50olU4Nk8,5362
45
45
  dbt_platform_helper/providers/ecr.py,sha256=siCGTEXR8Jd_pemPfKI3_U5P3Ix6dPrhWsg94EQiZzA,3266
46
46
  dbt_platform_helper/providers/ecs.py,sha256=XlQHYhZiLGrqR-1ZWMagGH2R2Hy7mCP6676eZL3YbNQ,3842
47
47
  dbt_platform_helper/providers/files.py,sha256=cJdOV6Eupi-COmGUMxZMF10BZnMi3MCCipTVUnE_NPA,857
48
- dbt_platform_helper/providers/io.py,sha256=FrVwWZqm8TFxp4Ph2AqbgsePpt6tryNdaPzc4wyGJmA,1364
48
+ dbt_platform_helper/providers/io.py,sha256=tU0jK8krKvBmdGM-sQXpFEqcUxORjFKFIdMNIe3TKB0,1376
49
49
  dbt_platform_helper/providers/kms.py,sha256=JR2EU3icXePoJCtr7QnqDPj1wWbyn5Uf9CRFq3_4lRs,647
50
- dbt_platform_helper/providers/load_balancers.py,sha256=KTsdpNttdUay_2d_IfC6oWbC8rWfs4Oh2eSgGMyK1Ag,10572
50
+ dbt_platform_helper/providers/load_balancers.py,sha256=G-gqhthaO6ZmpKq6zAqnY1AUtc5YjnI99sQzpeaM0ec,10644
51
51
  dbt_platform_helper/providers/parameter_store.py,sha256=klxDhcQ65Yc2KAc4Gf5P0vhpZOW7_vZalAVb-LLAA4s,1568
52
- dbt_platform_helper/providers/platform_config_schema.py,sha256=yDfZ61qJLpKUJWu3M9HaGninf02dojmlbGRoQ6g5i9o,27588
53
- dbt_platform_helper/providers/secrets.py,sha256=6cYIR15dLdHmqxtWQpM6R71e0_Xgsg9V291HBG-0LV0,5272
54
- dbt_platform_helper/providers/semantic_version.py,sha256=zVEYRnonWs1eENzMULp4VLEH5sRbxLQgiXAEcx-lp1E,2455
55
- dbt_platform_helper/providers/terraform_manifest.py,sha256=65lVbq3nSsMpADoSUse78LCRWFTsQeV6r6Az8sDZWdQ,9459
52
+ dbt_platform_helper/providers/platform_config_schema.py,sha256=ADkEP5PEjZswBKuPvpi1QHW_dXiC-CIAx730c11Uio0,27544
53
+ dbt_platform_helper/providers/schema_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
+ dbt_platform_helper/providers/schema_migrations/schema_v0_to_v1_migration.py,sha256=dplbvEAc8l8F4dEAy3JwLP1Phjkt4QVuQYNX_EKe_Ls,2036
55
+ dbt_platform_helper/providers/schema_migrator.py,sha256=qk14k3hMz1av9VrxHyJw2OKJLQnCBv_ugOoxZr3tFXQ,2854
56
+ dbt_platform_helper/providers/secrets.py,sha256=mOTIrcRRxxV2tS40U8onAjWekfPS3NzCvvyCMjr_yrU,5327
57
+ dbt_platform_helper/providers/semantic_version.py,sha256=VgQ6V6OgSaleuVmMB8Kl_yLoakXl2auapJTDbK00mfc,2679
58
+ dbt_platform_helper/providers/slack_channel_notifier.py,sha256=G8etEcaBQSNHg8BnyC5UPv6l3vUB14cYWjcaAQksaEk,2135
59
+ dbt_platform_helper/providers/terraform_manifest.py,sha256=otqVh_0KCqP35bZstTzd-TEEe0BYvEWmVn_quYumiNs,9345
56
60
  dbt_platform_helper/providers/validation.py,sha256=i2g-Mrd4hy_fGIfGa6ZQy4vTJ40OM44Fe_XpEifGWxs,126
57
- dbt_platform_helper/providers/version.py,sha256=uVPnFdwNhkIj0J-RYgMfJy3zTCoGAb7Y12ZZhpkPGeg,5086
58
- dbt_platform_helper/providers/version_status.py,sha256=6BgUqhqfGFKkne1xd3Zv9MhV9WR7Jt8A295A58mtkAU,2988
61
+ dbt_platform_helper/providers/version.py,sha256=pU1dCXo05Jm0Np6u6HiFFfpHEHNtWyU9fSXDZMqmRpU,4252
62
+ dbt_platform_helper/providers/version_status.py,sha256=-y9-kNvXGHVT6IbMOVu30vNyPOEShH-rAVMFHlJek1U,930
59
63
  dbt_platform_helper/providers/vpc.py,sha256=EIjjD71K1Ry3V1jyaAkAjZwlwu_FSTn-AS7kiJFiipA,2953
60
- dbt_platform_helper/providers/yaml_file.py,sha256=q-1DWtuG9bfR24lOYzwCwzgOpGPwDaoJpLUB1DtdEmE,2179
64
+ dbt_platform_helper/providers/yaml_file.py,sha256=LZ8eCPDQRr1wlck13My5hQa0eE2OVhSomm-pOIuZ9h0,2881
61
65
  dbt_platform_helper/templates/.copilot/config.yml,sha256=J_bA9sCtBdCPBRImpCBRnYvhQd4vpLYIXIU-lq9vbkA,158
62
66
  dbt_platform_helper/templates/.copilot/image_build_run.sh,sha256=adYucYXEB-kAgZNjTQo0T6EIAY8sh_xCEvVhWKKQ8mw,164
63
67
  dbt_platform_helper/templates/.copilot/phases/build.sh,sha256=umKXePcRvx4XyrRY0fAWIyYFtNjqBI2L8vIJk-V7C60,121
@@ -77,24 +81,23 @@ dbt_platform_helper/templates/create-codebuild-role.json,sha256=THJgIKi8rWwDzhg5
77
81
  dbt_platform_helper/templates/custom-codebuild-role-policy.json,sha256=8xyCofilPhV1Yjt3OnQLcI2kZ35mk2c07GcqYrKxuoI,1180
78
82
  dbt_platform_helper/templates/env/manifest.yml,sha256=VCEj_y3jdfnPYi6gmyrwiEqzHYjpaJDANbvswmkiLA0,802
79
83
  dbt_platform_helper/templates/env/terraform-overrides/cfn.patches.yml,sha256=cFlg69fvi9kzpz13ZAeY1asseZ6TuUex-6s76jG3oL4,259
80
- dbt_platform_helper/templates/environment-pipelines/main.tf,sha256=qElclUHb0pv-N7yDuIWxryz3jpjoArMn8cuN2_V63xw,1944
84
+ dbt_platform_helper/templates/environment-pipelines/main.tf,sha256=7AeUENedB5OO80MA6yzIRH7wq1S_HK8_OFK-iVKqBmo,1931
81
85
  dbt_platform_helper/templates/svc/maintenance_pages/default.html,sha256=OTZ-qwwSXu7PFbsgp4kppdm1lsg_iHK7FCFqhPnvrEs,741
82
86
  dbt_platform_helper/templates/svc/maintenance_pages/dmas-migration.html,sha256=qvI6tHuI0UQbMBCuvPgK1a_zLANB6w7KVo9N5d8r-i0,829
83
87
  dbt_platform_helper/templates/svc/maintenance_pages/migration.html,sha256=GiQsOiuaMFb7jG5_wU3V7BMcByHBl9fOBgrNf8quYlw,783
84
88
  dbt_platform_helper/templates/svc/overrides/cfn.patches.yml,sha256=W7-d017akuUq9kda64DQxazavcRcCPDjaAik6t1EZqM,742
85
89
  dbt_platform_helper/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
- dbt_platform_helper/utils/application.py,sha256=_O2ywJRYYdWfBVz4LzD07PLO9hSPJf7FylE6toH19KM,5448
90
+ dbt_platform_helper/utils/application.py,sha256=d7Tg5odZMy9e3o4R0mmU19hrxJuIfS_ATDH4hY8zJvk,5480
87
91
  dbt_platform_helper/utils/arn_parser.py,sha256=BaXzIxSOLdFmP_IfAxRq-0j-0Re1iCN7L4j2Zi5-CRQ,1304
88
- dbt_platform_helper/utils/aws.py,sha256=eqgRvilfgmmJ5UC54Uc0OzJD4ef3XZpkZ8gwXKOqPn4,12677
92
+ dbt_platform_helper/utils/aws.py,sha256=O3L5Lg2idq597WYNe0GQiW9gHfoeL5XiQbtJ1r_1K-o,12710
89
93
  dbt_platform_helper/utils/click.py,sha256=Fx4y4bbve1zypvog_sgK7tJtCocmzheoEFLBRv1lfdM,2943
90
- dbt_platform_helper/utils/git.py,sha256=pVa6K9LFscAHFpVEOZFoUwj-uHZP-52MFH7_C-uPQGs,782
94
+ dbt_platform_helper/utils/git.py,sha256=9jyLhv37KKE6r-_hb3zvjhTbluA81kdrOdNeG6MB-_M,384
91
95
  dbt_platform_helper/utils/messages.py,sha256=nWA7BWLb7ND0WH5TejDN4OQUJSKYBxU4tyCzteCrfT0,142
92
96
  dbt_platform_helper/utils/template.py,sha256=g-Db-0I6a6diOHkgK1nYA0IxJSO4TRrjqOvlyeOR32o,950
93
- dbt_platform_helper/utils/tool_versioning.py,sha256=UXrICUnnWCSpOdIIJaVnZcN2U3pgCUbpjvL4exevDbw,510
94
97
  dbt_platform_helper/utils/validation.py,sha256=coN7WsKW_nPGW9EU23AInBkAuvUl1NfQvc2bjVtgs14,1188
95
- platform_helper.py,sha256=_YNNGtMkH5BcpC_mQQYJrmlf2mt7lkxTYeH7ZgflPoA,1925
96
- dbt_platform_helper-13.4.1.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
97
- dbt_platform_helper-13.4.1.dist-info/METADATA,sha256=oR-YiD_AFk8sL-CZ6CnbMziVA9mZG1SpXOnpTy3hTJw,3243
98
- dbt_platform_helper-13.4.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
99
- dbt_platform_helper-13.4.1.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
100
- dbt_platform_helper-13.4.1.dist-info/RECORD,,
98
+ platform_helper.py,sha256=M0fDSY5f5NnlC6NESb4LMMuu5c1vsSPZQAXJoJj4suM,1802
99
+ dbt_platform_helper-14.0.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
100
+ dbt_platform_helper-14.0.0.dist-info/METADATA,sha256=oQP-ueQeFUaVIia3lfJGIvfbePZqZnQI-RQQtLbl6aQ,3249
101
+ dbt_platform_helper-14.0.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
102
+ dbt_platform_helper-14.0.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
103
+ dbt_platform_helper-14.0.0.dist-info/RECORD,,
platform_helper.py CHANGED
@@ -15,7 +15,6 @@ from dbt_platform_helper.commands.generate import generate as generate_commands
15
15
  from dbt_platform_helper.commands.notify import notify as notify_commands
16
16
  from dbt_platform_helper.commands.pipeline import pipeline as pipeline_commands
17
17
  from dbt_platform_helper.commands.secrets import secrets as secrets_commands
18
- from dbt_platform_helper.commands.version import version as version_commands
19
18
  from dbt_platform_helper.utils.click import ClickDocOptGroup
20
19
 
21
20
 
@@ -39,7 +38,6 @@ platform_helper.add_command(pipeline_commands)
39
38
  platform_helper.add_command(secrets_commands)
40
39
  platform_helper.add_command(notify_commands)
41
40
  platform_helper.add_command(database_commands)
42
- platform_helper.add_command(version_commands)
43
41
 
44
42
  if __name__ == "__main__":
45
43
  platform_helper(auto_envvar_prefix="DBT_PLATFORM")
@@ -1,37 +0,0 @@
1
- import click
2
-
3
- from dbt_platform_helper.domain.versioning import PlatformHelperVersioning
4
- from dbt_platform_helper.platform_exception import PlatformException
5
- from dbt_platform_helper.providers.io import ClickIOProvider
6
- from dbt_platform_helper.utils.click import ClickDocOptGroup
7
-
8
-
9
- @click.group(chain=True, cls=ClickDocOptGroup)
10
- def version():
11
- """Contains subcommands for getting version information about the current
12
- project."""
13
-
14
-
15
- @version.command(help="Print the version of platform-tools required by the current project")
16
- @click.option(
17
- "--pipeline",
18
- required=False,
19
- type=str,
20
- help="Take into account platform-tools version overrides in the specified pipeline",
21
- )
22
- def get_platform_helper_for_project(pipeline):
23
- """
24
- Version precedence is in this order:
25
- - if the --pipeline option is supplied, the version in 'platform-config.yml' in:
26
- environment_pipelines:
27
- <pipeline>:
28
- ...
29
- versions:
30
- platform-helper
31
- - The version from default_versions/platform-helper in 'platform-config.yml'
32
- - Fall back on the version in the deprecated '.platform-helper-version' file
33
- """
34
- try:
35
- PlatformHelperVersioning().get_required_version(pipeline)
36
- except PlatformException as err:
37
- ClickIOProvider().abort_with_error(str(err))
@@ -1,12 +0,0 @@
1
- from dbt_platform_helper.constants import DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION
2
-
3
-
4
- def get_required_terraform_platform_modules_version(
5
- cli_terraform_platform_modules_version, platform_config_terraform_modules_default_version
6
- ):
7
- version_preference_order = [
8
- cli_terraform_platform_modules_version,
9
- platform_config_terraform_modules_default_version,
10
- DEFAULT_TERRAFORM_PLATFORM_MODULES_VERSION,
11
- ]
12
- return [version for version in version_preference_order if version][0]