localstack-core 4.13.2.dev45__py3-none-any.whl → 4.13.2.dev47__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.
- localstack/runtime/analytics.py +2 -0
- localstack/services/cloudformation/analytics.py +24 -0
- localstack/services/cloudformation/engine/v2/change_set_model_executor.py +9 -1
- localstack/services/cloudformation/resource_provider.py +2 -0
- localstack/version.py +2 -2
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/METADATA +1 -1
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/RECORD +14 -14
- {localstack_core-4.13.2.dev45.data → localstack_core-4.13.2.dev47.data}/scripts/localstack +0 -0
- {localstack_core-4.13.2.dev45.data → localstack_core-4.13.2.dev47.data}/scripts/localstack-supervisor +0 -0
- {localstack_core-4.13.2.dev45.data → localstack_core-4.13.2.dev47.data}/scripts/localstack.bat +0 -0
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/WHEEL +0 -0
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/entry_points.txt +0 -0
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/licenses/LICENSE.txt +0 -0
- {localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/top_level.txt +0 -0
localstack/runtime/analytics.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import enum
|
|
2
|
+
import traceback
|
|
2
3
|
from typing import Self
|
|
3
4
|
|
|
4
5
|
from localstack.aws.api.cloudformation import ChangeAction
|
|
6
|
+
from localstack.utils.analytics import log
|
|
5
7
|
from localstack.utils.analytics.metrics import LabeledCounter
|
|
6
8
|
|
|
7
9
|
COUNTER_NAMESPACE = "cloudformation"
|
|
8
10
|
COUNTER_VERSION = 2
|
|
9
11
|
|
|
12
|
+
FAILURE_ANALYTICS_NAMESPACE = "cfn_stack_deploy_failures"
|
|
13
|
+
FAILURE_ANALYTICS_VERSION = 1
|
|
14
|
+
|
|
10
15
|
|
|
11
16
|
class ActionOptions(enum.StrEnum):
|
|
12
17
|
"""
|
|
@@ -65,3 +70,22 @@ def track_resource_operation(
|
|
|
65
70
|
missing=missing,
|
|
66
71
|
action=ActionOptions.from_action(action),
|
|
67
72
|
).increment()
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def emit_stack_failure(reason: str, exception: Exception | None = None) -> None:
|
|
76
|
+
"""
|
|
77
|
+
Capture the stack failure reason in telemetry
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
payload = {
|
|
81
|
+
"reason": reason,
|
|
82
|
+
"version": FAILURE_ANALYTICS_VERSION,
|
|
83
|
+
}
|
|
84
|
+
if exception:
|
|
85
|
+
tb = "".join(traceback.format_exception(exception))
|
|
86
|
+
payload["tb"] = tb
|
|
87
|
+
|
|
88
|
+
log.event(
|
|
89
|
+
FAILURE_ANALYTICS_NAMESPACE,
|
|
90
|
+
payload,
|
|
91
|
+
)
|
|
@@ -16,7 +16,10 @@ from localstack.aws.api.cloudformation import (
|
|
|
16
16
|
StackStatus,
|
|
17
17
|
)
|
|
18
18
|
from localstack.constants import INTERNAL_AWS_SECRET_ACCESS_KEY
|
|
19
|
-
from localstack.services.cloudformation.analytics import
|
|
19
|
+
from localstack.services.cloudformation.analytics import (
|
|
20
|
+
emit_stack_failure,
|
|
21
|
+
track_resource_operation,
|
|
22
|
+
)
|
|
20
23
|
from localstack.services.cloudformation.deployment_utils import log_not_available_message
|
|
21
24
|
from localstack.services.cloudformation.engine.v2.change_set_model import (
|
|
22
25
|
NodeDependsOn,
|
|
@@ -543,6 +546,7 @@ class ChangeSetModelExecutor(ChangeSetModelPreproc):
|
|
|
543
546
|
OperationStatus.FAILED,
|
|
544
547
|
resource_model={},
|
|
545
548
|
message=f"Resource provider operation failed: {reason}",
|
|
549
|
+
custom_context={"exception": e},
|
|
546
550
|
)
|
|
547
551
|
elif should_ignore_unsupported_resource_type(
|
|
548
552
|
resource_type=resource_type, change_set_type=self._change_set.change_set_type
|
|
@@ -618,6 +622,10 @@ class ChangeSetModelExecutor(ChangeSetModelPreproc):
|
|
|
618
622
|
)
|
|
619
623
|
resolved_resource["ResourceStatus"] = ResourceStatus(f"{status_from_action}_FAILED")
|
|
620
624
|
resolved_resource["ResourceStatusReason"] = reason
|
|
625
|
+
|
|
626
|
+
exception = event.custom_context.get("exception")
|
|
627
|
+
emit_stack_failure(reason, exception=exception)
|
|
628
|
+
|
|
621
629
|
case other:
|
|
622
630
|
raise NotImplementedError(f"Event status '{other}' not handled")
|
|
623
631
|
|
|
@@ -548,6 +548,7 @@ class ResourceProviderExecutor:
|
|
|
548
548
|
status=OperationStatus.FAILED,
|
|
549
549
|
resource_model={},
|
|
550
550
|
message=f"Failed to delete resource with id {request.logical_resource_id} of type {request.resource_type}",
|
|
551
|
+
custom_context={"exception": e},
|
|
551
552
|
)
|
|
552
553
|
case "Remove":
|
|
553
554
|
try:
|
|
@@ -561,6 +562,7 @@ class ResourceProviderExecutor:
|
|
|
561
562
|
status=OperationStatus.FAILED,
|
|
562
563
|
resource_model={},
|
|
563
564
|
message=f"Failed to delete resource with id {request.logical_resource_id} of type {request.resource_type}",
|
|
565
|
+
custom_context={"exception": e},
|
|
564
566
|
)
|
|
565
567
|
case _:
|
|
566
568
|
raise NotImplementedError(change_type) # TODO: change error type
|
localstack/version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '4.13.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (4, 13, 2, '
|
|
31
|
+
__version__ = version = '4.13.2.dev47'
|
|
32
|
+
__version_tuple__ = version_tuple = (4, 13, 2, 'dev47')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -4,7 +4,7 @@ localstack/deprecations.py,sha256=-3IYgCd6LEC3PjO7hbr3Dg-p0PIS6phjmv1qZnj1uo0,15
|
|
|
4
4
|
localstack/openapi.yaml,sha256=jFUzv-NKkJttxb8HRrmKiNYOmJD-zVfPxG3DDMrRwfg,30865
|
|
5
5
|
localstack/plugins.py,sha256=BIJC9dlo0WbP7lLKkCiGtd_2q5oeqiHZohvoRTcejXM,2457
|
|
6
6
|
localstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
localstack/version.py,sha256=
|
|
7
|
+
localstack/version.py,sha256=0_o7WZUL5NjlIAVSY5nRPaIaUOO602uBXvGDu6o2Jkg,721
|
|
8
8
|
localstack/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
localstack/aws/accounts.py,sha256=102zpGowOxo0S6UGMpfjw14QW7WCLVAGsnFK5xFMLoo,3043
|
|
10
10
|
localstack/aws/app.py,sha256=n9bJCfJRuMz_gLGAH430c3bIQXgUXeWO5NPfcdL2MV8,5145
|
|
@@ -157,7 +157,7 @@ localstack/packages/ffmpeg.py,sha256=lacFrYoulNF8fEro1zWatzSfqRf8dK69PZmpoWChExQ
|
|
|
157
157
|
localstack/packages/java.py,sha256=rARbCO6b69befP0Rht-7Cn9-p7FeDXYOcaII1i0kYsg,8486
|
|
158
158
|
localstack/packages/plugins.py,sha256=aw8XLj2f9TbhJ3h7iNOh0riWJ74uZ3mV6gs7GHn8GSE,562
|
|
159
159
|
localstack/runtime/__init__.py,sha256=th-8bfJFd011WcYnrlmpe0-79UWJ2LOqEZWLpVQno5Y,83
|
|
160
|
-
localstack/runtime/analytics.py,sha256=
|
|
160
|
+
localstack/runtime/analytics.py,sha256=A4d6JqojkeYOtiOIew8r2PMxYlRvKuzy7y_AqGzDPq8,5898
|
|
161
161
|
localstack/runtime/components.py,sha256=Mkbukxm1TM2uKFKHXf5HoPsQ5jEywZ2hADxbPBteLOY,1641
|
|
162
162
|
localstack/runtime/current.py,sha256=QL9lVykPEjtp-B5D55osBkgcQlKFgbcfgFecJDJ8qCw,1207
|
|
163
163
|
localstack/runtime/events.py,sha256=fcp3M60ZHT7h998E7qA9ectPTmBRAoEwYM4OYB4-B94,236
|
|
@@ -283,13 +283,13 @@ localstack/services/certificatemanager/resource_providers/aws_certificatemanager
|
|
|
283
283
|
localstack/services/certificatemanager/resource_providers/aws_certificatemanager_certificate.schema.json,sha256=3KNWtj-XYpLudjdjrx3_8MrvGLYKjhIToMoNKMwiXNM,1978
|
|
284
284
|
localstack/services/certificatemanager/resource_providers/aws_certificatemanager_certificate_plugin.py,sha256=Jx_D0-Xd6Q-Z0-lHxFJQ3Sije6ktSD4u3TJ67BeKTNA,617
|
|
285
285
|
localstack/services/cloudformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
286
|
-
localstack/services/cloudformation/analytics.py,sha256=
|
|
286
|
+
localstack/services/cloudformation/analytics.py,sha256=jMO8f38Y3f9DuuFQNDaYkvJ8-wLD0RYwfZLaij_J-Tk,2338
|
|
287
287
|
localstack/services/cloudformation/api_utils.py,sha256=ZQ9MIusNM8ykmgKuJJW3mHM1yrGPMZL8Y3UFe83J9MU,6187
|
|
288
288
|
localstack/services/cloudformation/cfn_utils.py,sha256=i_yKZEkFSIJB_aQfD78NwDPeXPXzDJ1XXkVoInE2Mus,2481
|
|
289
289
|
localstack/services/cloudformation/deployment_utils.py,sha256=YCWYGAKjZlmjKC7VgtN1UvUSuh8RSht_aWfCkvVAFSQ,10182
|
|
290
290
|
localstack/services/cloudformation/provider.py,sha256=kNs6PLrDYFq_OrxKJcmMnQHqsnRoAKoXKq3Ckm-MgUg,54129
|
|
291
291
|
localstack/services/cloudformation/provider_utils.py,sha256=YBpHuVs3LcLJJozHuu1oo6QtbQnoHAzQAqtdIr7QJd0,11166
|
|
292
|
-
localstack/services/cloudformation/resource_provider.py,sha256=
|
|
292
|
+
localstack/services/cloudformation/resource_provider.py,sha256=Ij8aeSA0Ahv4eO2z4tEAQ4XZz7gpSnwzXse_1TVwMw8,23747
|
|
293
293
|
localstack/services/cloudformation/resources.py,sha256=k0gyUhNwCAP1lEhQJIF5Gp5NehZGuHGWYRQpeIlujOw,555005
|
|
294
294
|
localstack/services/cloudformation/service_models.py,sha256=FIk_n2TCWtpYZaUvORfvoKG4HlZZux3JD01npfB-Ejw,5153
|
|
295
295
|
localstack/services/cloudformation/stores.py,sha256=vnv6ljC4g35RCKP3SnnhMG63Ig4W3uAlzTYu1Bw7Axc,5491
|
|
@@ -312,7 +312,7 @@ localstack/services/cloudformation/engine/yaml_parser.py,sha256=3vLYmqCqwfZ5S-Xc
|
|
|
312
312
|
localstack/services/cloudformation/engine/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
313
313
|
localstack/services/cloudformation/engine/v2/change_set_model.py,sha256=dNZ-lHtoF710S3BlcqYwr4HTMBopg9UjytKC1utxIJs,67460
|
|
314
314
|
localstack/services/cloudformation/engine/v2/change_set_model_describer.py,sha256=rUT0V1MmgMD1hqfC5ebUu5u5RplkWmSozNE1ab1osHc,12381
|
|
315
|
-
localstack/services/cloudformation/engine/v2/change_set_model_executor.py,sha256=
|
|
315
|
+
localstack/services/cloudformation/engine/v2/change_set_model_executor.py,sha256=frNG3PoipsneXEWPaQFTMhm5PFvFgWtbVGDJqRg--Gw,29429
|
|
316
316
|
localstack/services/cloudformation/engine/v2/change_set_model_preproc.py,sha256=8tpvZcq8PN1zWLclHFZZQiFrDGLyZOQ57F259-hukOk,62046
|
|
317
317
|
localstack/services/cloudformation/engine/v2/change_set_model_transform.py,sha256=7ylip_9dpwRlbBl4npRkK0Iy6E8FzcoGTaf7nAv0l3k,23471
|
|
318
318
|
localstack/services/cloudformation/engine/v2/change_set_model_validator.py,sha256=b22jAGxgoLi2GTp2ZOE7clJOCdftWlRN0Lra-zNKbEU,8418
|
|
@@ -1316,12 +1316,12 @@ localstack/utils/server/tcp_proxy.py,sha256=y2NJAmvftTiAYsLU_8qe4W5LGqwUw21i90Pu
|
|
|
1316
1316
|
localstack/utils/xray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1317
1317
|
localstack/utils/xray/trace_header.py,sha256=ahXk9eonq7LpeENwlqUEPj3jDOCiVRixhntQuxNor-Q,6209
|
|
1318
1318
|
localstack/utils/xray/traceid.py,sha256=GKO-R2sMMjlrH2UaLPXlQlZ6flbE7ZKb6IZMtMu_M5U,1110
|
|
1319
|
-
localstack_core-4.13.2.
|
|
1320
|
-
localstack_core-4.13.2.
|
|
1321
|
-
localstack_core-4.13.2.
|
|
1322
|
-
localstack_core-4.13.2.
|
|
1323
|
-
localstack_core-4.13.2.
|
|
1324
|
-
localstack_core-4.13.2.
|
|
1325
|
-
localstack_core-4.13.2.
|
|
1326
|
-
localstack_core-4.13.2.
|
|
1327
|
-
localstack_core-4.13.2.
|
|
1319
|
+
localstack_core-4.13.2.dev47.data/scripts/localstack,sha256=WyL11vp5CkuP79iIR-L8XT7Cj8nvmxX7XRAgxhbmXNE,529
|
|
1320
|
+
localstack_core-4.13.2.dev47.data/scripts/localstack-supervisor,sha256=nm1Il2d6ASyOB6Vo4CRHd90w7TK9FdRl9VPp0NN6hUk,6378
|
|
1321
|
+
localstack_core-4.13.2.dev47.data/scripts/localstack.bat,sha256=tlzZTXtveHkMX_s_fa7VDfvdNdS8iVpEz2ER3uk9B_c,29
|
|
1322
|
+
localstack_core-4.13.2.dev47.dist-info/licenses/LICENSE.txt,sha256=3PC-9Z69UsNARuQ980gNR_JsLx8uvMjdG6C7cc4LBYs,606
|
|
1323
|
+
localstack_core-4.13.2.dev47.dist-info/METADATA,sha256=csyqX6YJ5GQ_QOV7Kl4o-NH4ueXVp8VTy7azby_4gWw,5824
|
|
1324
|
+
localstack_core-4.13.2.dev47.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
1325
|
+
localstack_core-4.13.2.dev47.dist-info/entry_points.txt,sha256=59aAnn8KVHWAHkMg2dOgmgYtRZ-xTX9T4UiIchWgK6k,20975
|
|
1326
|
+
localstack_core-4.13.2.dev47.dist-info/top_level.txt,sha256=3sqmK2lGac8nCy8nwsbS5SpIY_izmtWtgaTFKHYVHbI,11
|
|
1327
|
+
localstack_core-4.13.2.dev47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{localstack_core-4.13.2.dev45.data → localstack_core-4.13.2.dev47.data}/scripts/localstack.bat
RENAMED
|
File without changes
|
|
File without changes
|
{localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{localstack_core-4.13.2.dev45.dist-info → localstack_core-4.13.2.dev47.dist-info}/top_level.txt
RENAMED
|
File without changes
|