dbt-platform-helper 10.11.1__py3-none-any.whl → 10.11.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.
- dbt_platform_helper/commands/conduit.py +13 -7
- {dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/METADATA +1 -1
- {dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/RECORD +6 -6
- {dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/LICENSE +0 -0
- {dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/WHEEL +0 -0
- {dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/entry_points.txt +0 -0
|
@@ -5,6 +5,7 @@ import subprocess
|
|
|
5
5
|
import time
|
|
6
6
|
|
|
7
7
|
import click
|
|
8
|
+
from botocore.exceptions import ClientError
|
|
8
9
|
from cfn_tools import dump_yaml
|
|
9
10
|
from cfn_tools import load_yaml
|
|
10
11
|
|
|
@@ -12,6 +13,7 @@ from dbt_platform_helper.utils.application import Application
|
|
|
12
13
|
from dbt_platform_helper.utils.application import load_application
|
|
13
14
|
from dbt_platform_helper.utils.aws import update_postgres_parameter_with_master_secret
|
|
14
15
|
from dbt_platform_helper.utils.click import ClickDocOptCommand
|
|
16
|
+
from dbt_platform_helper.utils.messages import abort_with_error
|
|
15
17
|
from dbt_platform_helper.utils.platform_config import is_terraform_project
|
|
16
18
|
from dbt_platform_helper.utils.versioning import (
|
|
17
19
|
check_platform_helper_version_needs_update,
|
|
@@ -207,15 +209,19 @@ def create_addon_client_task(
|
|
|
207
209
|
elif addon_type == "redis" or addon_type == "opensearch":
|
|
208
210
|
secret_name += "_ENDPOINT"
|
|
209
211
|
|
|
212
|
+
role_name = f"{addon_name}-{app.name}-{env}-conduitEcsTask"
|
|
213
|
+
|
|
210
214
|
try:
|
|
211
|
-
session.client("iam").get_role(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
execution_role = (
|
|
215
|
-
f"--execution-role {app.name}-{addon_type}-{app.name}-{env}-conduitEcsTask "
|
|
216
|
-
)
|
|
217
|
-
except:
|
|
215
|
+
session.client("iam").get_role(RoleName=role_name)
|
|
216
|
+
execution_role = f"--execution-role {role_name} "
|
|
217
|
+
except ClientError as ex:
|
|
218
218
|
execution_role = ""
|
|
219
|
+
# We cannot check for botocore.errorfactory.NoSuchEntityException as botocore generates that class on the fly as part of errorfactory.
|
|
220
|
+
# factory. Checking the error code is the recommended way of handling these exceptions.
|
|
221
|
+
if ex.response.get("Error", {}).get("Code", None) != "NoSuchEntity":
|
|
222
|
+
abort_with_error(
|
|
223
|
+
f"cannot obtain Role {role_name}: {ex.response.get('Error', {}).get('Message', '')}"
|
|
224
|
+
)
|
|
219
225
|
|
|
220
226
|
subprocess.call(
|
|
221
227
|
f"copilot task run --app {app.name} --env {env} "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbt-platform-helper
|
|
3
|
-
Version: 10.11.
|
|
3
|
+
Version: 10.11.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
|
|
@@ -7,7 +7,7 @@ dbt_platform_helper/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
7
7
|
dbt_platform_helper/commands/application.py,sha256=1XTBfdZBDj1vOFkAWjTxxTNFtko4YB9Q0_tVdxavwAo,9957
|
|
8
8
|
dbt_platform_helper/commands/check_cloudformation.py,sha256=aLif3yMHKuZO0uvdUjTH9FdRZNIpCqtWvE3aFQMozoc,3226
|
|
9
9
|
dbt_platform_helper/commands/codebase.py,sha256=NchJzH-yxv5mXCe2rPyXVNHmXGEvjFUv0KhMKYsLNNQ,11380
|
|
10
|
-
dbt_platform_helper/commands/conduit.py,sha256=
|
|
10
|
+
dbt_platform_helper/commands/conduit.py,sha256=SjuVhTcmyokCIF7OI8E5YxRgkyHc0C5lt72waCJfML0,15395
|
|
11
11
|
dbt_platform_helper/commands/config.py,sha256=NOHea7OAjrl6XHlW6HMLn0m0T5lFPyNH3HXoyCOWsJk,12070
|
|
12
12
|
dbt_platform_helper/commands/copilot.py,sha256=euid0FTlVtwKmBQ6vxt_HxtBdRYiVQvb-9CyrK1-MWc,16724
|
|
13
13
|
dbt_platform_helper/commands/database.py,sha256=-DacXZ2LhwV3CRukG35urEU2TuNVZHppUA3EhbBNjUs,4840
|
|
@@ -96,8 +96,8 @@ dbt_platform_helper/utils/template.py,sha256=raRx4QUCVJtKfvJK08Egg6gwWcs3r3V4nPW
|
|
|
96
96
|
dbt_platform_helper/utils/validation.py,sha256=2XMizmCGk4oTVU67q72cdc8eyOzL0wxhe7DframhQ8Q,23699
|
|
97
97
|
dbt_platform_helper/utils/versioning.py,sha256=h3veQpFoiOjYY9dRVppcBDzVfgZerT0lXuE9QCTo5-c,10710
|
|
98
98
|
platform_helper.py,sha256=zjsZKcbyrEQbKfERi0JG8JEL-MgG6EjxIMiWT66kCVg,2299
|
|
99
|
-
dbt_platform_helper-10.11.
|
|
100
|
-
dbt_platform_helper-10.11.
|
|
101
|
-
dbt_platform_helper-10.11.
|
|
102
|
-
dbt_platform_helper-10.11.
|
|
103
|
-
dbt_platform_helper-10.11.
|
|
99
|
+
dbt_platform_helper-10.11.2.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
|
|
100
|
+
dbt_platform_helper-10.11.2.dist-info/METADATA,sha256=lA9wUd7Bp-AE9Xj3bjVp0xzTYQgSBnjcUNawTnj9bfk,3127
|
|
101
|
+
dbt_platform_helper-10.11.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
102
|
+
dbt_platform_helper-10.11.2.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
|
|
103
|
+
dbt_platform_helper-10.11.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.11.1.dist-info → dbt_platform_helper-10.11.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|