dbt-platform-helper 10.7.1__py3-none-any.whl → 10.7.2__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.

@@ -14,21 +14,24 @@ phases:
14
14
  echo "Cannot find .copilot-version file"
15
15
  exit 1
16
16
  fi
17
+ - COPILOT_VERSION=$(cat .copilot-version)
18
+ # Install pyyaml and dbt-platform-helper
19
+ - pip install PyYAML dbt-platform-helper
20
+ # Reinstall if we require a different version to the latest
21
+ - CURRENT_PLATFORM_HELPER_VERSION=$(platform-helper --version)
22
+ - export PLATFORM_HELPER_VERSION=$(platform-helper version get-platform-helper-for-project)
17
23
  - |
18
- if [ ! -f .platform-helper-version ]; then
19
- echo "Cannot find .platform-helper-version file"
20
- exit 1
24
+ if [ ! "${PLATFORM_HELPER_VERSION}" == "${CURRENT_PLATFORM_HELPER_VERSION}" ]
25
+ then
26
+ pip uninstall dbt-platform-helper
27
+ pip install dbt-platform-helper==$PLATFORM_HELPER_VERSION
21
28
  fi
22
- - COPILOT_VERSION=`cat .copilot-version`
23
- - PLATFORM_HELPER_VERSION=`cat .platform-helper-version`
24
29
  - mkdir ./build-tools
25
30
  - cd ./build-tools
26
31
  # Install copilot
27
32
  - wget -q "https://ecs-cli-v2-release.s3.amazonaws.com/copilot-linux-v${COPILOT_VERSION}"
28
33
  - mv "./copilot-linux-v${COPILOT_VERSION}" ./copilot
29
34
  - chmod +x ./copilot
30
- # Install pyyaml and dbt-platform-helper
31
- - pip install PyYAML dbt-platform-helper==$PLATFORM_HELPER_VERSION
32
35
  # Install dyff - yaml differ
33
36
  - wget -q "https://github.com/homeport/dyff/releases/download/v${DYFF_VERSION}/dyff_${DYFF_VERSION}_linux_amd64.tar.gz"
34
37
  - tar -zxvf "dyff_${DYFF_VERSION}_linux_amd64.tar.gz"
@@ -36,7 +39,6 @@ phases:
36
39
  build:
37
40
  commands:
38
41
  - cd $CODEBUILD_SRC_DIR
39
- - PLATFORM_HELPER_VERSION=`cat .platform-helper-version`
40
42
  - cp -r copilot/ current-copilot/
41
43
  - platform-helper copilot make-addons
42
44
  - >
@@ -40,7 +40,7 @@ class PlatformHelperVersions:
40
40
  self.latest_release = latest_release
41
41
  self.platform_helper_file_version = platform_helper_file_version
42
42
  self.platform_config_default = platform_config_default
43
- self.pipeline_overrides = pipeline_overrides
43
+ self.pipeline_overrides = pipeline_overrides if pipeline_overrides else {}
44
44
 
45
45
 
46
46
  def string_version(input_version: VersionTuple) -> str:
@@ -164,12 +164,12 @@ def _process_version_file_warnings(versions: PlatformHelperVersions):
164
164
  )
165
165
 
166
166
  if not versions.platform_config_default and not versions.platform_helper_file_version:
167
- messages.append(f"Cannot get dbt-platform-helper version from '{PLATFORM_CONFIG_FILE}'.")
168
- messages.append(
169
- f"{missing_default_version_message}{string_version(versions.local_version)}\n"
170
- )
167
+ message = f"Cannot get dbt-platform-helper version from '{PLATFORM_CONFIG_FILE}'.\n"
168
+ message += f"{missing_default_version_message}{string_version(versions.local_version)}\n"
169
+ click.secho(message, fg="red")
171
170
 
172
- click.secho("\n".join(messages), fg="yellow")
171
+ if messages:
172
+ click.secho("\n".join(messages), fg="yellow")
173
173
 
174
174
 
175
175
  def validate_version_compatibility(
@@ -245,7 +245,9 @@ def check_platform_helper_version_mismatch():
245
245
 
246
246
  versions = get_platform_helper_versions()
247
247
  local_version = versions.local_version
248
- platform_helper_file_version = versions.platform_helper_file_version
248
+ platform_helper_file_version = parse_version(
249
+ get_required_platform_helper_version(versions=versions)
250
+ )
249
251
 
250
252
  if not check_version_on_file_compatibility(local_version, platform_helper_file_version):
251
253
  message = (
@@ -259,8 +261,11 @@ def running_as_installed_package():
259
261
  return "site-packages" in __file__
260
262
 
261
263
 
262
- def get_required_platform_helper_version(pipeline: str = None) -> str:
263
- versions = get_platform_helper_versions()
264
+ def get_required_platform_helper_version(
265
+ pipeline: str = None, versions: PlatformHelperVersions = None
266
+ ) -> str:
267
+ if not versions:
268
+ versions = get_platform_helper_versions()
264
269
  pipeline_version = versions.pipeline_overrides.get(pipeline)
265
270
  version_precedence = [
266
271
  pipeline_version,
@@ -271,4 +276,9 @@ def get_required_platform_helper_version(pipeline: str = None) -> str:
271
276
  string_version(v) if isinstance(v, tuple) else v for v in version_precedence if v
272
277
  ]
273
278
 
274
- return non_null_version_precedence[0] if non_null_version_precedence else None
279
+ out = non_null_version_precedence[0] if non_null_version_precedence else None
280
+
281
+ if not out:
282
+ raise SystemExit(1)
283
+
284
+ return out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbt-platform-helper
3
- Version: 10.7.1
3
+ Version: 10.7.2
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
@@ -71,7 +71,7 @@ dbt_platform_helper/templates/pipelines/codebase/overrides/package.json,sha256=X
71
71
  dbt_platform_helper/templates/pipelines/codebase/overrides/stack.ts,sha256=vJNqtku74BEJ_sew1485_JQLKxpozI4md08tokg2LgE,20895
72
72
  dbt_platform_helper/templates/pipelines/codebase/overrides/tsconfig.json,sha256=k6KabP-WwhFNgA1AFHNuonTEAnES6eR74jUuYUJEGOM,651
73
73
  dbt_platform_helper/templates/pipelines/codebase/overrides/types.ts,sha256=Sp4nEppsreaY1nKZC2q3lditLtMP9lUOKAIzdd4M2yM,1214
74
- dbt_platform_helper/templates/pipelines/environments/buildspec.yml,sha256=NPeoJQA1GYXdtiyz3kfThWIqlE93E52H3G2lNTqPPjA,3199
74
+ dbt_platform_helper/templates/pipelines/environments/buildspec.yml,sha256=hTCUhSfrnTUMOpUo8EjQmvit2aX7J0cKNeqV2DChaA0,3365
75
75
  dbt_platform_helper/templates/pipelines/environments/manifest.yml,sha256=UyHL6wH2mznldZIyjPSbG72yO6zErglNcaoliHOKYvM,1765
76
76
  dbt_platform_helper/templates/pipelines/environments/overrides/cfn.patches.yml,sha256=VLjm3Dz4clUz44B5RSQy7mu1sRzm7Yf2S_TSnor_b_k,638
77
77
  dbt_platform_helper/templates/svc/maintenance_pages/default.html,sha256=OTZ-qwwSXu7PFbsgp4kppdm1lsg_iHK7FCFqhPnvrEs,741
@@ -94,10 +94,10 @@ dbt_platform_helper/utils/messages.py,sha256=aLx6s9utt__IqlDdeIYq4n82ERwludu2Zfq
94
94
  dbt_platform_helper/utils/platform_config.py,sha256=dEGB6peHB1ywYSdS71JGxbWIuTFRaeQfWelksX9v6bQ,608
95
95
  dbt_platform_helper/utils/template.py,sha256=raRx4QUCVJtKfvJK08Egg6gwWcs3r3V4nPWcJW4xNhA,574
96
96
  dbt_platform_helper/utils/validation.py,sha256=OPajVss8pWth_3FD_1iPodNjeysTZ28-dMEvMRc4I1c,22735
97
- dbt_platform_helper/utils/versioning.py,sha256=T11gQN9CHHFkYJj62xQ97F-pwGOIHqR7LkjWZKkEQPs,10199
97
+ dbt_platform_helper/utils/versioning.py,sha256=ceLM5yvhfDl2PpY6yNoZlKUgqE_xZ9NyasLdVN1b3F0,10435
98
98
  platform_helper.py,sha256=zjsZKcbyrEQbKfERi0JG8JEL-MgG6EjxIMiWT66kCVg,2299
99
- dbt_platform_helper-10.7.1.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
100
- dbt_platform_helper-10.7.1.dist-info/METADATA,sha256=B__pvWe9JEScwFVynPILRoRfw6lvv_am8vx9F44tMZg,3126
101
- dbt_platform_helper-10.7.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
102
- dbt_platform_helper-10.7.1.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
103
- dbt_platform_helper-10.7.1.dist-info/RECORD,,
99
+ dbt_platform_helper-10.7.2.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
100
+ dbt_platform_helper-10.7.2.dist-info/METADATA,sha256=Vr8eLzkCy6xS_5_xbo9HxGDZSov9dR93VheqccO-2Rs,3126
101
+ dbt_platform_helper-10.7.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
102
+ dbt_platform_helper-10.7.2.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
103
+ dbt_platform_helper-10.7.2.dist-info/RECORD,,