dbt-platform-helper 13.1.0__py3-none-any.whl → 15.16.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.
Files changed (95) hide show
  1. dbt_platform_helper/COMMANDS.md +107 -27
  2. dbt_platform_helper/commands/application.py +5 -6
  3. dbt_platform_helper/commands/codebase.py +31 -10
  4. dbt_platform_helper/commands/conduit.py +3 -5
  5. dbt_platform_helper/commands/config.py +20 -311
  6. dbt_platform_helper/commands/copilot.py +18 -391
  7. dbt_platform_helper/commands/database.py +17 -9
  8. dbt_platform_helper/commands/environment.py +20 -14
  9. dbt_platform_helper/commands/generate.py +0 -3
  10. dbt_platform_helper/commands/internal.py +140 -0
  11. dbt_platform_helper/commands/notify.py +58 -78
  12. dbt_platform_helper/commands/pipeline.py +23 -19
  13. dbt_platform_helper/commands/secrets.py +39 -93
  14. dbt_platform_helper/commands/version.py +7 -12
  15. dbt_platform_helper/constants.py +52 -7
  16. dbt_platform_helper/domain/codebase.py +89 -39
  17. dbt_platform_helper/domain/conduit.py +335 -76
  18. dbt_platform_helper/domain/config.py +381 -0
  19. dbt_platform_helper/domain/copilot.py +398 -0
  20. dbt_platform_helper/domain/copilot_environment.py +8 -8
  21. dbt_platform_helper/domain/database_copy.py +2 -2
  22. dbt_platform_helper/domain/maintenance_page.py +254 -430
  23. dbt_platform_helper/domain/notify.py +64 -0
  24. dbt_platform_helper/domain/pipelines.py +43 -35
  25. dbt_platform_helper/domain/plans.py +41 -0
  26. dbt_platform_helper/domain/secrets.py +279 -0
  27. dbt_platform_helper/domain/service.py +570 -0
  28. dbt_platform_helper/domain/terraform_environment.py +14 -13
  29. dbt_platform_helper/domain/update_alb_rules.py +412 -0
  30. dbt_platform_helper/domain/versioning.py +249 -0
  31. dbt_platform_helper/{providers → entities}/platform_config_schema.py +75 -82
  32. dbt_platform_helper/entities/semantic_version.py +83 -0
  33. dbt_platform_helper/entities/service.py +339 -0
  34. dbt_platform_helper/platform_exception.py +4 -0
  35. dbt_platform_helper/providers/autoscaling.py +24 -0
  36. dbt_platform_helper/providers/aws/__init__.py +0 -0
  37. dbt_platform_helper/providers/aws/exceptions.py +70 -0
  38. dbt_platform_helper/providers/aws/interfaces.py +13 -0
  39. dbt_platform_helper/providers/aws/opensearch.py +23 -0
  40. dbt_platform_helper/providers/aws/redis.py +21 -0
  41. dbt_platform_helper/providers/aws/sso_auth.py +75 -0
  42. dbt_platform_helper/providers/cache.py +40 -4
  43. dbt_platform_helper/providers/cloudformation.py +1 -1
  44. dbt_platform_helper/providers/config.py +137 -19
  45. dbt_platform_helper/providers/config_validator.py +112 -51
  46. dbt_platform_helper/providers/copilot.py +24 -16
  47. dbt_platform_helper/providers/ecr.py +89 -7
  48. dbt_platform_helper/providers/ecs.py +228 -36
  49. dbt_platform_helper/providers/environment_variable.py +24 -0
  50. dbt_platform_helper/providers/files.py +1 -1
  51. dbt_platform_helper/providers/io.py +36 -4
  52. dbt_platform_helper/providers/kms.py +22 -0
  53. dbt_platform_helper/providers/load_balancers.py +402 -42
  54. dbt_platform_helper/providers/logs.py +72 -0
  55. dbt_platform_helper/providers/parameter_store.py +134 -0
  56. dbt_platform_helper/providers/s3.py +21 -0
  57. dbt_platform_helper/providers/schema_migrations/__init__.py +0 -0
  58. dbt_platform_helper/providers/schema_migrations/schema_v0_to_v1_migration.py +43 -0
  59. dbt_platform_helper/providers/schema_migrator.py +77 -0
  60. dbt_platform_helper/providers/secrets.py +5 -5
  61. dbt_platform_helper/providers/slack_channel_notifier.py +62 -0
  62. dbt_platform_helper/providers/terraform_manifest.py +121 -19
  63. dbt_platform_helper/providers/version.py +106 -23
  64. dbt_platform_helper/providers/version_status.py +27 -0
  65. dbt_platform_helper/providers/vpc.py +36 -5
  66. dbt_platform_helper/providers/yaml_file.py +58 -2
  67. dbt_platform_helper/templates/environment-pipelines/main.tf +4 -3
  68. dbt_platform_helper/templates/svc/overrides/cfn.patches.yml +5 -0
  69. dbt_platform_helper/utilities/decorators.py +103 -0
  70. dbt_platform_helper/utils/application.py +119 -22
  71. dbt_platform_helper/utils/aws.py +39 -150
  72. dbt_platform_helper/utils/deep_merge.py +10 -0
  73. dbt_platform_helper/utils/git.py +1 -14
  74. dbt_platform_helper/utils/validation.py +1 -1
  75. {dbt_platform_helper-13.1.0.dist-info → dbt_platform_helper-15.16.0.dist-info}/METADATA +11 -20
  76. dbt_platform_helper-15.16.0.dist-info/RECORD +118 -0
  77. {dbt_platform_helper-13.1.0.dist-info → dbt_platform_helper-15.16.0.dist-info}/WHEEL +1 -1
  78. platform_helper.py +3 -1
  79. terraform/elasticache-redis/plans.yml +85 -0
  80. terraform/opensearch/plans.yml +71 -0
  81. terraform/postgres/plans.yml +128 -0
  82. dbt_platform_helper/addon-plans.yml +0 -224
  83. dbt_platform_helper/providers/aws.py +0 -37
  84. dbt_platform_helper/providers/opensearch.py +0 -36
  85. dbt_platform_helper/providers/redis.py +0 -34
  86. dbt_platform_helper/providers/semantic_version.py +0 -126
  87. dbt_platform_helper/templates/svc/manifest-backend.yml +0 -69
  88. dbt_platform_helper/templates/svc/manifest-public.yml +0 -109
  89. dbt_platform_helper/utils/cloudfoundry.py +0 -14
  90. dbt_platform_helper/utils/files.py +0 -53
  91. dbt_platform_helper/utils/manifests.py +0 -18
  92. dbt_platform_helper/utils/versioning.py +0 -238
  93. dbt_platform_helper-13.1.0.dist-info/RECORD +0 -96
  94. {dbt_platform_helper-13.1.0.dist-info → dbt_platform_helper-15.16.0.dist-info}/entry_points.txt +0 -0
  95. {dbt_platform_helper-13.1.0.dist-info → dbt_platform_helper-15.16.0.dist-info/licenses}/LICENSE +0 -0
@@ -12,6 +12,7 @@
12
12
  - [platform-helper conduit](#platform-helper-conduit)
13
13
  - [platform-helper config](#platform-helper-config)
14
14
  - [platform-helper config validate](#platform-helper-config-validate)
15
+ - [platform-helper config migrate](#platform-helper-config-migrate)
15
16
  - [platform-helper config aws](#platform-helper-config-aws)
16
17
  - [platform-helper copilot](#platform-helper-copilot)
17
18
  - [platform-helper copilot make-addons](#platform-helper-copilot-make-addons)
@@ -24,10 +25,12 @@
24
25
  - [platform-helper pipeline](#platform-helper-pipeline)
25
26
  - [platform-helper pipeline generate](#platform-helper-pipeline-generate)
26
27
  - [platform-helper secrets](#platform-helper-secrets)
28
+ - [platform-helper secrets create](#platform-helper-secrets-create)
27
29
  - [platform-helper secrets copy](#platform-helper-secrets-copy)
28
30
  - [platform-helper secrets list](#platform-helper-secrets-list)
29
31
  - [platform-helper notify](#platform-helper-notify)
30
32
  - [platform-helper notify environment-progress](#platform-helper-notify-environment-progress)
33
+ - [platform-helper notify post-message](#platform-helper-notify-post-message)
31
34
  - [platform-helper notify add-comment](#platform-helper-notify-add-comment)
32
35
  - [platform-helper database](#platform-helper-database)
33
36
  - [platform-helper database dump](#platform-helper-database-dump)
@@ -61,6 +64,7 @@ platform-helper <command> [--version]
61
64
  - [`database` ↪](#platform-helper-database)
62
65
  - [`environment` ↪](#platform-helper-environment)
63
66
  - [`generate` ↪](#platform-helper-generate)
67
+ - [`internal` ↪](#platform-helper-internal)
64
68
  - [`notify` ↪](#platform-helper-notify)
65
69
  - [`pipeline` ↪](#platform-helper-pipeline)
66
70
  - [`secrets` ↪](#platform-helper-secrets)
@@ -236,7 +240,8 @@ platform-helper codebase build --app <application> --codebase <codebase>
236
240
 
237
241
  ```
238
242
  platform-helper codebase deploy --app <application> --env <environment> --codebase <codebase>
239
- --commit <commit>
243
+ [--tag <tag>] [--branch <branch>]
244
+ [--commit <commit>]
240
245
  ```
241
246
 
242
247
  ## Options
@@ -247,8 +252,12 @@ platform-helper codebase deploy --app <application> --env <environment> --codeba
247
252
  - AWS Copilot environment
248
253
  - `--codebase <text>`
249
254
  - The codebase name as specified in the platform-config.yml file. This can be run from any directory.
255
+ - `--tag <text>`
256
+ - Git tag that has been built into an image. Typically a semantic version of the form 1.2.3 or v1.2.3.
257
+ - `--branch <text>`
258
+ - Git branch that has been built into an image.
250
259
  - `--commit <text>`
251
- - GitHub commit hash
260
+ - Git sha hash that has been built into an image.
252
261
  - `--help <boolean>` _Defaults to False._
253
262
  - Show this message and exit.
254
263
 
@@ -290,7 +299,7 @@ platform-helper conduit <addon_name>
290
299
  ## Usage
291
300
 
292
301
  ```
293
- platform-helper config (validate|aws)
302
+ platform-helper config (validate|migrate|aws)
294
303
  ```
295
304
 
296
305
  ## Options
@@ -301,6 +310,7 @@ platform-helper config (validate|aws)
301
310
  ## Commands
302
311
 
303
312
  - [`aws` ↪](#platform-helper-config-aws)
313
+ - [`migrate` ↪](#platform-helper-config-migrate)
304
314
  - [`validate` ↪](#platform-helper-config-validate)
305
315
 
306
316
  # platform-helper config validate
@@ -317,6 +327,23 @@ platform-helper config validate
317
327
 
318
328
  ## Options
319
329
 
330
+ - `--help <boolean>` _Defaults to False._
331
+ - Show this message and exit.
332
+
333
+ # platform-helper config migrate
334
+
335
+ [↩ Parent](#platform-helper-config)
336
+
337
+ Update configuration to match current schema.
338
+
339
+ ## Usage
340
+
341
+ ```
342
+ platform-helper config migrate
343
+ ```
344
+
345
+ ## Options
346
+
320
347
  - `--help <boolean>` _Defaults to False._
321
348
  - Show this message and exit.
322
349
 
@@ -483,7 +510,7 @@ platform-helper environment generate --name <name>
483
510
  ## Usage
484
511
 
485
512
  ```
486
- platform-helper environment generate-terraform --name <name> [--terraform-platform-modules-version <terraform_platform_modules_version>]
513
+ platform-helper environment generate-terraform --name <name>
487
514
  ```
488
515
 
489
516
  ## Options
@@ -491,8 +518,6 @@ platform-helper environment generate-terraform --name <name> [--terraform-platfo
491
518
  - `--name
492
519
  -n <text>`
493
520
  - The name of the environment to generate a manifest for.
494
- - `--terraform-platform-modules-version <text>`
495
- - Override the default version of terraform-platform-modules. (Default version is '7').
496
521
  - `--help <boolean>` _Defaults to False._
497
522
  - Show this message and exit.
498
523
 
@@ -545,27 +570,23 @@ platform-helper pipeline generate
545
570
  deployment pipelines.
546
571
 
547
572
  This command does the following in relation to the environment pipelines:
548
- - Reads contents of `platform-config.yml/environment-pipelines` configuration.
573
+ - Reads contents of `platform-config.yml/environment_pipelines` configuration.
549
574
  The `terraform/environment-pipelines/<aws_account>/main.tf` file is generated using this configuration.
550
575
  The `main.tf` file is then used to generate Terraform for creating an environment pipeline resource.
551
576
 
552
577
  This command does the following in relation to the codebase pipelines:
553
- - Generates the copilot pipeline manifest.yml for copilot/pipelines/<codebase_pipeline_name>
578
+ - Reads contents of `platform-config.yml/codebase_pipelines` configuration.
579
+ The `terraform/codebase-pipelines/main.tf.json` file is generated using this configuration.
580
+ The `main.tf.json` file is then used to generate Terraform for creating a codebase pipeline resource.
554
581
 
555
582
  ## Usage
556
583
 
557
584
  ```
558
- platform-helper pipeline generate [--terraform-platform-modules-version <terraform_platform_modules_version>]
559
- [--deploy-branch <deploy_branch>]
585
+ platform-helper pipeline generate [--deploy-branch <deploy_branch>]
560
586
  ```
561
587
 
562
588
  ## Options
563
589
 
564
- - `--terraform-platform-modules-version <text>`
565
- - Override the default version of terraform-platform-modules with a specific version or branch.
566
- Precedence of version used is version supplied via CLI, then the version found in
567
- platform-config.yml/default_versions/terraform-platform-modules.
568
- In absence of these inputs, defaults to version '7'.
569
590
  - `--deploy-branch <text>`
570
591
  - Specify the branch of <application>-deploy used to configure the source stage in the environment-pipeline resource.
571
592
  This is generated from the terraform/environments-pipeline/<aws_account>/main.tf file.
@@ -581,7 +602,7 @@ This is generated from the terraform/environments-pipeline/<aws_account>/main.tf
581
602
  ## Usage
582
603
 
583
604
  ```
584
- platform-helper secrets (copy|list)
605
+ platform-helper secrets (create|copy|list)
585
606
  ```
586
607
 
587
608
  ## Options
@@ -592,30 +613,53 @@ platform-helper secrets (copy|list)
592
613
  ## Commands
593
614
 
594
615
  - [`copy` ↪](#platform-helper-secrets-copy)
616
+ - [`create` ↪](#platform-helper-secrets-create)
595
617
  - [`list` ↪](#platform-helper-secrets-list)
596
618
 
597
- # platform-helper secrets copy
619
+ # platform-helper secrets create
598
620
 
599
621
  [↩ Parent](#platform-helper-secrets)
600
622
 
601
- Copy secrets from one environment to a new environment.
623
+ Create a Parameter Store secret for all environments of an
624
+ application.
602
625
 
603
626
  ## Usage
604
627
 
605
628
  ```
606
- platform-helper secrets copy <source_environment> <target_environment>
607
- --project-profile <project_profile>
629
+ platform-helper secrets create --app <application> --name <name> [--overwrite]
608
630
  ```
609
631
 
610
- ## Arguments
632
+ ## Options
633
+
634
+ - `--app <text>`
635
+ - Application name.
636
+ - `--name <text>`
637
+ - Secret name (automatically uppercased).
638
+ - `--overwrite <boolean>` _Defaults to False._
639
+ - Allows overwriting the value of secrets if they already exist.
640
+ - `--help <boolean>` _Defaults to False._
641
+ - Show this message and exit.
611
642
 
612
- - `source_environment <text>`
613
- - `target_environment <text>`
643
+ # platform-helper secrets copy
644
+
645
+ [↩ Parent](#platform-helper-secrets)
646
+
647
+ Copy secrets from one environment to another.
648
+
649
+ ## Usage
650
+
651
+ ```
652
+ platform-helper secrets copy --app <application> --source <source> --target <target>
653
+ ```
614
654
 
615
655
  ## Options
616
656
 
617
- - `--project-profile <text>`
618
- - AWS account profile name
657
+ - `--app <text>`
658
+ - Application name.
659
+ - `--source <text>`
660
+ - Source environment where to copy secrets from.
661
+ - `--target <text>`
662
+ - Destination environment where to copy secrets to.
619
663
  - `--help <boolean>` _Defaults to False._
620
664
  - Show this message and exit.
621
665
 
@@ -623,7 +667,7 @@ platform-helper secrets copy <source_environment> <target_environment>
623
667
 
624
668
  [↩ Parent](#platform-helper-secrets)
625
669
 
626
- List secret names and values for an environment.
670
+ [DELETED] List secret names and values for an environment.
627
671
 
628
672
  ## Usage
629
673
 
@@ -650,7 +694,7 @@ platform-helper secrets list <application> <environment>
650
694
  ## Usage
651
695
 
652
696
  ```
653
- platform-helper notify (environment-progress|add-comment)
697
+ platform-helper notify (environment-progress|post-message|add-comment)
654
698
  ```
655
699
 
656
700
  ## Options
@@ -662,6 +706,7 @@ platform-helper notify (environment-progress|add-comment)
662
706
 
663
707
  - [`add-comment` ↪](#platform-helper-notify-add-comment)
664
708
  - [`environment-progress` ↪](#platform-helper-notify-environment-progress)
709
+ - [`post-message` ↪](#platform-helper-notify-post-message)
665
710
 
666
711
  # platform-helper notify environment-progress
667
712
 
@@ -694,6 +739,41 @@ platform-helper notify environment-progress <slack_channel_id> <slack_token>
694
739
 
695
740
  - `--commit-sha <text>`
696
741
 
742
+ - `--slack-ref <text>`
743
+ - Slack message reference of the message to update
744
+ - `--help <boolean>` _Defaults to False._
745
+ - Show this message and exit.
746
+
747
+ # platform-helper notify post-message
748
+
749
+ [↩ Parent](#platform-helper-notify)
750
+
751
+ Send Slack notifications. This creates (or updates if --slack-ref is provided) the top level message to the channel.
752
+
753
+ ## Usage
754
+
755
+ ```
756
+ platform-helper notify post-message <slack_channel_id> <slack_token>
757
+ <message>
758
+ [--build-arn <build_arn>] [--repository <repository>]
759
+ [--commit-sha <commit_sha>]
760
+ [--slack-ref <slack_ref>]
761
+ ```
762
+
763
+ ## Arguments
764
+
765
+ - `slack-channel-id <text>`
766
+ - `slack-token <text>`
767
+ - `message <text>`
768
+
769
+ ## Options
770
+
771
+ - `--build-arn <text>`
772
+
773
+ - `--repository <text>`
774
+
775
+ - `--commit-sha <text>`
776
+
697
777
  - `--slack-ref <text>`
698
778
  - Slack message reference of the message to update
699
779
  - `--help <boolean>` _Defaults to False._
@@ -10,11 +10,9 @@ from datetime import timedelta
10
10
  import click
11
11
  from prettytable import PrettyTable
12
12
 
13
+ from dbt_platform_helper.domain.versioning import PlatformHelperVersioning
13
14
  from dbt_platform_helper.utils.application import load_application
14
15
  from dbt_platform_helper.utils.click import ClickDocOptGroup
15
- from dbt_platform_helper.utils.versioning import (
16
- check_platform_helper_version_needs_update,
17
- )
18
16
 
19
17
  YELLOW = "\033[93m"
20
18
  CYAN = "\033[96m"
@@ -97,7 +95,7 @@ def get_query_results(env, app, query_string, timeout):
97
95
  @click.group(chain=True, cls=ClickDocOptGroup, deprecated=True)
98
96
  def application():
99
97
  """[DEPRECATED] Application metrics."""
100
- check_platform_helper_version_needs_update()
98
+ PlatformHelperVersioning().check_if_needs_update()
101
99
 
102
100
 
103
101
  @application.command(deprecated=True)
@@ -141,7 +139,7 @@ def container_stats(env, app, storage, network):
141
139
  storage_write = field[6]["value"]
142
140
  network_read = field[7]["value"]
143
141
  network_write = field[8]["value"]
144
- cpu = "%.1f%%" % float(field[9]["value"])
142
+ cpu = f"{float(field[9]['value']):.1f}%"
145
143
  memory = f"{field[10]['value']}M"
146
144
 
147
145
  # Nothing to compare to at start.
@@ -283,12 +281,13 @@ def task_stats(env, app, disk, storage, network):
283
281
  memory,
284
282
  dsk,
285
283
  ) in cpu_response["results"]:
284
+ cpu_value = f"{float(cpu['value']):.1f}" + "%"
286
285
  values = [
287
286
  f"{YELLOW}{taskdef['value'].split('-')[-1]}",
288
287
  f"{YELLOW}{task['value']}",
289
288
  f"{YELLOW}{task_def_revision['value']}",
290
289
  f"{YELLOW}{status['value']}",
291
- f"{YELLOW}{'%.1f' % float(cpu['value']) + '%'}",
290
+ f"{YELLOW}{cpu_value}",
292
291
  f"{YELLOW}{memory['value'] + 'M'}",
293
292
  ]
294
293
 
@@ -1,25 +1,25 @@
1
1
  import click
2
2
 
3
3
  from dbt_platform_helper.domain.codebase import Codebase
4
+ from dbt_platform_helper.domain.versioning import PlatformHelperVersioning
4
5
  from dbt_platform_helper.platform_exception import PlatformException
5
6
  from dbt_platform_helper.providers.io import ClickIOProvider
7
+ from dbt_platform_helper.providers.parameter_store import ParameterStore
8
+ from dbt_platform_helper.utils.aws import get_aws_session_or_abort
6
9
  from dbt_platform_helper.utils.click import ClickDocOptGroup
7
- from dbt_platform_helper.utils.versioning import (
8
- check_platform_helper_version_needs_update,
9
- )
10
10
 
11
11
 
12
12
  @click.group(chain=True, cls=ClickDocOptGroup)
13
13
  def codebase():
14
14
  """Codebase commands."""
15
- check_platform_helper_version_needs_update()
15
+ PlatformHelperVersioning().check_if_needs_update()
16
16
 
17
17
 
18
18
  @codebase.command()
19
19
  def prepare():
20
20
  """Sets up an application codebase for use within a DBT platform project."""
21
21
  try:
22
- Codebase().prepare()
22
+ Codebase(ParameterStore(get_aws_session_or_abort().client("ssm"))).prepare()
23
23
  except PlatformException as err:
24
24
  ClickIOProvider().abort_with_error(str(err))
25
25
 
@@ -35,7 +35,7 @@ def prepare():
35
35
  def list(app, with_images):
36
36
  """List available codebases for the application."""
37
37
  try:
38
- Codebase().list(app, with_images)
38
+ Codebase(ParameterStore(get_aws_session_or_abort().client("ssm"))).list(app, with_images)
39
39
  except PlatformException as err:
40
40
  ClickIOProvider().abort_with_error(str(err))
41
41
 
@@ -51,7 +51,9 @@ def list(app, with_images):
51
51
  def build(app, codebase, commit):
52
52
  """Trigger a CodePipeline pipeline based build."""
53
53
  try:
54
- Codebase().build(app, codebase, commit)
54
+ Codebase(ParameterStore(get_aws_session_or_abort().client("ssm"))).build(
55
+ app, codebase, commit
56
+ )
55
57
  except PlatformException as err:
56
58
  ClickIOProvider().abort_with_error(str(err))
57
59
 
@@ -64,9 +66,28 @@ def build(app, codebase, commit):
64
66
  help="The codebase name as specified in the platform-config.yml file. This can be run from any directory.",
65
67
  required=True,
66
68
  )
67
- @click.option("--commit", help="GitHub commit hash", required=True)
68
- def deploy(app, env, codebase, commit):
69
+ @click.option(
70
+ "--tag",
71
+ help="Git tag that has been built into an image. Typically a semantic version of the form 1.2.3 or v1.2.3.",
72
+ required=False,
73
+ )
74
+ @click.option(
75
+ "--branch",
76
+ help="Git branch that has been built into an image.",
77
+ required=False,
78
+ )
79
+ @click.option(
80
+ "--commit",
81
+ help="Git sha hash that has been built into an image.",
82
+ required=False,
83
+ )
84
+ def deploy(
85
+ app: str, env: str, codebase: str, commit: str = None, tag: str = None, branch: str = None
86
+ ):
87
+
69
88
  try:
70
- Codebase().deploy(app, env, codebase, commit)
89
+ Codebase(ParameterStore(get_aws_session_or_abort().client("ssm"))).deploy(
90
+ app, env, codebase, commit, tag, branch
91
+ )
71
92
  except PlatformException as err:
72
93
  ClickIOProvider().abort_with_error(str(err))
@@ -1,6 +1,7 @@
1
1
  import click
2
2
 
3
3
  from dbt_platform_helper.domain.conduit import Conduit
4
+ from dbt_platform_helper.domain.versioning import PlatformHelperVersioning
4
5
  from dbt_platform_helper.platform_exception import PlatformException
5
6
  from dbt_platform_helper.providers.cloudformation import CloudFormation
6
7
  from dbt_platform_helper.providers.ecs import ECS
@@ -8,9 +9,6 @@ from dbt_platform_helper.providers.io import ClickIOProvider
8
9
  from dbt_platform_helper.providers.secrets import Secrets
9
10
  from dbt_platform_helper.utils.application import load_application
10
11
  from dbt_platform_helper.utils.click import ClickDocOptCommand
11
- from dbt_platform_helper.utils.versioning import (
12
- check_platform_helper_version_needs_update,
13
- )
14
12
 
15
13
  CONDUIT_ACCESS_OPTIONS = ["read", "write", "admin"]
16
14
 
@@ -28,8 +26,8 @@ CONDUIT_ACCESS_OPTIONS = ["read", "write", "admin"]
28
26
  def conduit(addon_name: str, app: str, env: str, access: str):
29
27
  """Opens a shell for a given addon_name create a conduit connection to
30
28
  interact with postgres, opensearch or redis."""
31
- check_platform_helper_version_needs_update()
32
- application = load_application(app)
29
+ PlatformHelperVersioning().check_if_needs_update()
30
+ application = load_application(app=app, env=env)
33
31
 
34
32
  try:
35
33
  secrets_provider: Secrets = Secrets(