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

@@ -29,11 +29,14 @@
29
29
  - [platform-helper secrets list](#platform-helper-secrets-list)
30
30
  - [platform-helper notify](#platform-helper-notify)
31
31
  - [platform-helper notify environment-progress](#platform-helper-notify-environment-progress)
32
+ - [platform-helper notify post-message](#platform-helper-notify-post-message)
32
33
  - [platform-helper notify add-comment](#platform-helper-notify-add-comment)
33
34
  - [platform-helper database](#platform-helper-database)
34
35
  - [platform-helper database dump](#platform-helper-database-dump)
35
36
  - [platform-helper database load](#platform-helper-database-load)
36
37
  - [platform-helper database copy](#platform-helper-database-copy)
38
+ - [platform-helper version](#platform-helper-version)
39
+ - [platform-helper version get-platform-helper-for-project](#platform-helper-version-get-platform-helper-for-project)
37
40
 
38
41
  # platform-helper
39
42
 
@@ -63,6 +66,7 @@ platform-helper <command> [--version]
63
66
  - [`notify` ↪](#platform-helper-notify)
64
67
  - [`pipeline` ↪](#platform-helper-pipeline)
65
68
  - [`secrets` ↪](#platform-helper-secrets)
69
+ - [`version` ↪](#platform-helper-version)
66
70
 
67
71
  # platform-helper application
68
72
 
@@ -665,7 +669,7 @@ platform-helper secrets list <application> <environment>
665
669
  ## Usage
666
670
 
667
671
  ```
668
- platform-helper notify (environment-progress|add-comment)
672
+ platform-helper notify (environment-progress|post-message|add-comment)
669
673
  ```
670
674
 
671
675
  ## Options
@@ -677,6 +681,7 @@ platform-helper notify (environment-progress|add-comment)
677
681
 
678
682
  - [`add-comment` ↪](#platform-helper-notify-add-comment)
679
683
  - [`environment-progress` ↪](#platform-helper-notify-environment-progress)
684
+ - [`post-message` ↪](#platform-helper-notify-post-message)
680
685
 
681
686
  # platform-helper notify environment-progress
682
687
 
@@ -709,6 +714,41 @@ platform-helper notify environment-progress <slack_channel_id> <slack_token>
709
714
 
710
715
  - `--commit-sha <text>`
711
716
 
717
+ - `--slack-ref <text>`
718
+ - Slack message reference of the message to update
719
+ - `--help <boolean>` _Defaults to False._
720
+ - Show this message and exit.
721
+
722
+ # platform-helper notify post-message
723
+
724
+ [↩ Parent](#platform-helper-notify)
725
+
726
+ Send Slack notifications. This creates (or updates if --slack-ref is provided) the top level message to the channel.
727
+
728
+ ## Usage
729
+
730
+ ```
731
+ platform-helper notify post-message <slack_channel_id> <slack_token>
732
+ <message>
733
+ [--build-arn <build_arn>] [--repository <repository>]
734
+ [--commit-sha <commit_sha>]
735
+ [--slack-ref <slack_ref>]
736
+ ```
737
+
738
+ ## Arguments
739
+
740
+ - `slack-channel-id <text>`
741
+ - `slack-token <text>`
742
+ - `message <text>`
743
+
744
+ ## Options
745
+
746
+ - `--build-arn <text>`
747
+
748
+ - `--repository <text>`
749
+
750
+ - `--commit-sha <text>`
751
+
712
752
  - `--slack-ref <text>`
713
753
  - Slack message reference of the message to update
714
754
  - `--help <boolean>` _Defaults to False._
@@ -866,3 +906,44 @@ platform-helper database copy --from <from_env> --to <to_env> --database <databa
866
906
 
867
907
  - `--help <boolean>` _Defaults to False._
868
908
  - Show this message and exit.
909
+
910
+ # platform-helper version
911
+
912
+ [↩ Parent](#platform-helper)
913
+
914
+ Contains subcommands for getting version information about the current
915
+ project.
916
+
917
+ ## Usage
918
+
919
+ ```
920
+ platform-helper version get-platform-helper-for-project
921
+ ```
922
+
923
+ ## Options
924
+
925
+ - `--help <boolean>` _Defaults to False._
926
+ - Show this message and exit.
927
+
928
+ ## Commands
929
+
930
+ - [`get-platform-helper-for-project` ↪](#platform-helper-version-get-platform-helper-for-project)
931
+
932
+ # platform-helper version get-platform-helper-for-project
933
+
934
+ [↩ Parent](#platform-helper-version)
935
+
936
+ Print the version of platform-tools required by the current project
937
+
938
+ ## Usage
939
+
940
+ ```
941
+ platform-helper version get-platform-helper-for-project [--pipeline <pipeline>]
942
+ ```
943
+
944
+ ## Options
945
+
946
+ - `--pipeline <text>`
947
+ - Take into account platform-tools version overrides in the specified pipeline
948
+ - `--help <boolean>` _Defaults to False._
949
+ - Show this message and exit.
@@ -14,7 +14,8 @@ def notify():
14
14
 
15
15
 
16
16
  @notify.command(
17
- help="Send environment progress notifications. This creates (or updates if --slack-ref is provided) the top level message to the channel."
17
+ help="Send environment progress notifications. This creates (or updates if --slack-ref is provided) the top level message to the channel.",
18
+ deprecated=True,
18
19
  )
19
20
  @click.argument("slack-channel-id")
20
21
  @click.argument("slack-token")
@@ -23,7 +24,41 @@ def notify():
23
24
  @click.option("--repository")
24
25
  @click.option("--commit-sha")
25
26
  @click.option("--slack-ref", help="Slack message reference of the message to update")
27
+ @click.pass_context
26
28
  def environment_progress(
29
+ ctx,
30
+ slack_channel_id: str,
31
+ slack_token: str,
32
+ message: str,
33
+ build_arn: str,
34
+ repository: str,
35
+ commit_sha: str,
36
+ slack_ref: str,
37
+ ):
38
+
39
+ ctx.invoke(
40
+ post_message,
41
+ slack_channel_id=slack_channel_id,
42
+ slack_token=slack_token,
43
+ message=message,
44
+ build_arn=build_arn,
45
+ repository=repository,
46
+ commit_sha=commit_sha,
47
+ slack_ref=slack_ref,
48
+ )
49
+
50
+
51
+ @notify.command(
52
+ help="Send Slack notifications. This creates (or updates if --slack-ref is provided) the top level message to the channel."
53
+ )
54
+ @click.argument("slack-channel-id")
55
+ @click.argument("slack-token")
56
+ @click.argument("message")
57
+ @click.option("--build-arn")
58
+ @click.option("--repository")
59
+ @click.option("--commit-sha")
60
+ @click.option("--slack-ref", help="Slack message reference of the message to update")
61
+ def post_message(
27
62
  slack_channel_id: str,
28
63
  slack_token: str,
29
64
  message: str,
@@ -35,7 +70,7 @@ def environment_progress(
35
70
  try:
36
71
  io = ClickIOProvider()
37
72
  slack_notifier = SlackChannelNotifier(slack_token, slack_channel_id)
38
- result = Notify(slack_notifier).environment_progress(
73
+ result = Notify(slack_notifier).post_message(
39
74
  original_message_ref=slack_ref,
40
75
  message=message,
41
76
  build_arn=build_arn,
@@ -0,0 +1,31 @@
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
+ Deprecated: Required in pipelines for projects running platform-helper < 14.0.0.
25
+
26
+ Version preferences removed, requires specifying platform-helper version in platform-config.yml
27
+ """
28
+ try:
29
+ PlatformHelperVersioning().get_required_version()
30
+ except PlatformException as err:
31
+ ClickIOProvider().abort_with_error(str(err))
@@ -6,7 +6,7 @@ class Notify:
6
6
  def __init__(self, notifier: SlackChannelNotifier):
7
7
  self.notifier = notifier
8
8
 
9
- def environment_progress(
9
+ def post_message(
10
10
  self,
11
11
  message: str,
12
12
  build_arn: str = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbt-platform-helper
3
- Version: 14.1.0
3
+ Version: 14.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
@@ -1,4 +1,4 @@
1
- dbt_platform_helper/COMMANDS.md,sha256=gxvvghHlPmcxjhTdXxfSVDI4sYXx95HZrCykoo5DI0I,21731
1
+ dbt_platform_helper/COMMANDS.md,sha256=szFwoNuKlrTfGv10jA0zLG_HDgRnzPaI4rBBSgFXtu8,23883
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
@@ -11,9 +11,10 @@ dbt_platform_helper/commands/copilot.py,sha256=L9UUuqD62q0aFrTTEUla3A1WJBz-vFBfV
11
11
  dbt_platform_helper/commands/database.py,sha256=2RJZEzaSqcNtDG1M2mZw-nB6agAd3GNAJsg2pjFF7vc,4407
12
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=H7QHbnYQnCD357Kesq7h16fT19imFI1BLtLA8x3ujTM,2504
14
+ dbt_platform_helper/commands/notify.py,sha256=DMXA0AHot6-7CMzmY0PXPMMBVnLgvQgXr6np6OnSQh4,3401
15
15
  dbt_platform_helper/commands/pipeline.py,sha256=PGpDDmyReVa4gdpXDwJEsHN51f5MgTIbm2AibTkuWrE,2580
16
16
  dbt_platform_helper/commands/secrets.py,sha256=haSbF401H4XLzS9LWGLC6h_EcZHLcIF-rW1XkzUOy58,3985
17
+ dbt_platform_helper/commands/version.py,sha256=2GltWeeN7cqhVj9FhYWSbXSQSyNILHVNOeANGWtAllY,1097
17
18
  dbt_platform_helper/constants.py,sha256=Ao2uvVRcxRN5SXqvW6Jq2srd7LuyGz1jPy4fg2N6XSk,1153
18
19
  dbt_platform_helper/default-extensions.yml,sha256=SU1ZitskbuEBpvE7efc3s56eAUF11j70brhj_XrNMMo,493
19
20
  dbt_platform_helper/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -24,7 +25,7 @@ dbt_platform_helper/domain/copilot.py,sha256=9L4h-WFwgRU8AMjf14PlDqwLqOpIRinkuPv
24
25
  dbt_platform_helper/domain/copilot_environment.py,sha256=fL3XJCOfO0BJRCrCoBPFCcshrQoX1FeSYNTziOEaH4A,9093
25
26
  dbt_platform_helper/domain/database_copy.py,sha256=AedcBTfKDod0OlMqVP6zb9c_9VIc3vqro0oUUhh7nwc,9497
26
27
  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/notify.py,sha256=_BWj5znDWtrSdJ5xzDBgnao4ukliBA5wiUZGobIDyiI,1894
28
29
  dbt_platform_helper/domain/pipelines.py,sha256=BUoXlV4pIKSw3Ry6oVMzd0mBU6tfl_tvqp-1zxHrQdk,6552
29
30
  dbt_platform_helper/domain/terraform_environment.py,sha256=kPfA44KCNnF_7ihQPuxaShLjEnVShrbruLwr5xoCeRc,1825
30
31
  dbt_platform_helper/domain/versioning.py,sha256=L1PKuAnGtd1E6WT2cssC9hCVUibllntk-Tut8vdgJfk,5502
@@ -95,9 +96,9 @@ dbt_platform_helper/utils/git.py,sha256=9jyLhv37KKE6r-_hb3zvjhTbluA81kdrOdNeG6MB
95
96
  dbt_platform_helper/utils/messages.py,sha256=nWA7BWLb7ND0WH5TejDN4OQUJSKYBxU4tyCzteCrfT0,142
96
97
  dbt_platform_helper/utils/template.py,sha256=g-Db-0I6a6diOHkgK1nYA0IxJSO4TRrjqOvlyeOR32o,950
97
98
  dbt_platform_helper/utils/validation.py,sha256=coN7WsKW_nPGW9EU23AInBkAuvUl1NfQvc2bjVtgs14,1188
98
- platform_helper.py,sha256=M0fDSY5f5NnlC6NESb4LMMuu5c1vsSPZQAXJoJj4suM,1802
99
- dbt_platform_helper-14.1.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
100
- dbt_platform_helper-14.1.0.dist-info/METADATA,sha256=3-Uh_GtuVaWCovKYSLKJ_ZlaEKmja7Fdfg6KiSGiSvE,3293
101
- dbt_platform_helper-14.1.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
102
- dbt_platform_helper-14.1.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
103
- dbt_platform_helper-14.1.0.dist-info/RECORD,,
99
+ platform_helper.py,sha256=_YNNGtMkH5BcpC_mQQYJrmlf2mt7lkxTYeH7ZgflPoA,1925
100
+ dbt_platform_helper-14.2.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
101
+ dbt_platform_helper-14.2.0.dist-info/METADATA,sha256=jWQxX9xd3BXMMN_nHHFnoRPGfQvyhrJcdGbBlK_Mpug,3293
102
+ dbt_platform_helper-14.2.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
103
+ dbt_platform_helper-14.2.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
104
+ dbt_platform_helper-14.2.0.dist-info/RECORD,,
platform_helper.py CHANGED
@@ -15,6 +15,7 @@ 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
18
19
  from dbt_platform_helper.utils.click import ClickDocOptGroup
19
20
 
20
21
 
@@ -38,6 +39,7 @@ platform_helper.add_command(pipeline_commands)
38
39
  platform_helper.add_command(secrets_commands)
39
40
  platform_helper.add_command(notify_commands)
40
41
  platform_helper.add_command(database_commands)
42
+ platform_helper.add_command(version_commands)
41
43
 
42
44
  if __name__ == "__main__":
43
45
  platform_helper(auto_envvar_prefix="DBT_PLATFORM")