Skip to content

Commit 5cb7f8d

Browse files
committed
Merge remote-tracking branch 'origin/main' into cfn/v2/describe-stack-resources
2 parents 481143c + fb42a08 commit 5cb7f8d

31 files changed

+5953
-5374
lines changed

.github/workflows/aws-main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ jobs:
138138
- name: Report coverage statistics
139139
env:
140140
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
141+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141142
run: |
142143
source .venv/bin/activate
143144
coverage report || true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
55
# Ruff version.
6-
rev: v0.12.4
6+
rev: v0.12.5
77
hooks:
88
- id: ruff
99
args: [--fix, --exit-non-zero-on-fix]

.test_durations

Lines changed: 4813 additions & 5257 deletions
Large diffs are not rendered by default.

CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
######################
44

55
# CODEOWNERS
6-
/CODEOWNERS @thrau @dominikschubert @alexrashed
6+
/CODEOWNERS @dominikschubert @alexrashed
77

88
# README / Docs
99
/docs/ @thrau @HarshCasper
@@ -118,10 +118,10 @@
118118
/tests/aws/services/cloudcontrol/ @simonrw
119119

120120
# cloudformation
121-
/localstack-core/localstack/aws/api/cloudformation/ @dominikschubert @pinzon @simonrw
122-
/localstack-core/localstack/services/cloudformation/ @dominikschubert @pinzon @simonrw
123-
/tests/aws/services/cloudformation/ @dominikschubert @pinzon @simonrw
124-
/tests/unit/services/cloudformation/ @dominikschubert @pinzon @simonrw
121+
/localstack-core/localstack/aws/api/cloudformation/ @simonrw @pinzon @dominikschubert
122+
/localstack-core/localstack/services/cloudformation/ @simonrw @pinzon @dominikschubert
123+
/tests/aws/services/cloudformation/ @simonrw @pinzon @dominikschubert
124+
/tests/unit/services/cloudformation/ @simonrw @pinzon @dominikschubert
125125

126126
# cloudwatch
127127
/localstack-core/localstack/aws/api/cloudwatch/ @pinzon @steffyP

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# base: Stage which installs necessary runtime dependencies (OS packages, etc.)
33
#
4-
FROM python:3.11.13-slim-bookworm@sha256:139020233cc412efe4c8135b0efe1c7569dc8b28ddd88bddb109b764f8977e30 AS base
4+
FROM python:3.11.13-slim-bookworm@sha256:0ce77749ac83174a31d5e107ce0cfa6b28a2fd6b0615e029d9d84b39c48976ee AS base
55
ARG TARGETARCH
66

77
# Install runtime OS package dependencies

Dockerfile.s3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# base: Stage which installs necessary runtime dependencies (OS packages, filesystem...)
2-
FROM python:3.11.13-slim-bookworm@sha256:139020233cc412efe4c8135b0efe1c7569dc8b28ddd88bddb109b764f8977e30 AS base
2+
FROM python:3.11.13-slim-bookworm@sha256:0ce77749ac83174a31d5e107ce0cfa6b28a2fd6b0615e029d9d84b39c48976ee AS base
33
ARG TARGETARCH
44

55
# set workdir

localstack-core/localstack/aws/api/ec2/__init__.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,20 @@ class InstanceType(StrEnum):
23372337
r8gd_48xlarge = "r8gd.48xlarge"
23382338
r8gd_metal_24xl = "r8gd.metal-24xl"
23392339
r8gd_metal_48xl = "r8gd.metal-48xl"
2340+
c8gn_medium = "c8gn.medium"
2341+
c8gn_large = "c8gn.large"
2342+
c8gn_xlarge = "c8gn.xlarge"
2343+
c8gn_2xlarge = "c8gn.2xlarge"
2344+
c8gn_4xlarge = "c8gn.4xlarge"
2345+
c8gn_8xlarge = "c8gn.8xlarge"
2346+
c8gn_12xlarge = "c8gn.12xlarge"
2347+
c8gn_16xlarge = "c8gn.16xlarge"
2348+
c8gn_24xlarge = "c8gn.24xlarge"
2349+
c8gn_48xlarge = "c8gn.48xlarge"
2350+
c8gn_metal_24xl = "c8gn.metal-24xl"
2351+
c8gn_metal_48xl = "c8gn.metal-48xl"
2352+
f2_6xlarge = "f2.6xlarge"
2353+
p6e_gb200_36xlarge = "p6e-gb200.36xlarge"
23402354

23412355

23422356
class InstanceTypeHypervisor(StrEnum):
@@ -3596,6 +3610,7 @@ class TransitGatewayAttachmentResourceType(StrEnum):
35963610
connect = "connect"
35973611
peering = "peering"
35983612
tgw_peering = "tgw-peering"
3613+
network_function = "network-function"
35993614

36003615

36013616
class TransitGatewayAttachmentState(StrEnum):
@@ -7135,7 +7150,7 @@ class FleetLaunchTemplateOverrides(TypedDict, total=False):
71357150
InstanceType: Optional[InstanceType]
71367151
MaxPrice: Optional[String]
71377152
SubnetId: Optional[String]
7138-
AvailabilityZone: Optional[String]
7153+
AvailabilityZone: Optional[AvailabilityZoneName]
71397154
WeightedCapacity: Optional[Double]
71407155
Priority: Optional[Double]
71417156
Placement: Optional[PlacementResponse]
@@ -7280,7 +7295,7 @@ class FleetLaunchTemplateOverridesRequest(TypedDict, total=False):
72807295
InstanceType: Optional[InstanceType]
72817296
MaxPrice: Optional[String]
72827297
SubnetId: Optional[SubnetId]
7283-
AvailabilityZone: Optional[String]
7298+
AvailabilityZone: Optional[AvailabilityZoneName]
72847299
WeightedCapacity: Optional[Double]
72857300
Priority: Optional[Double]
72867301
Placement: Optional[Placement]
@@ -20630,6 +20645,7 @@ class StartVpcEndpointServicePrivateDnsVerificationResult(TypedDict, total=False
2063020645
class StopInstancesRequest(ServiceRequest):
2063120646
InstanceIds: InstanceIdStringList
2063220647
Hibernate: Optional[Boolean]
20648+
SkipOsShutdown: Optional[Boolean]
2063320649
DryRun: Optional[Boolean]
2063420650
Force: Optional[Boolean]
2063520651

@@ -20662,6 +20678,7 @@ class TerminateClientVpnConnectionsResult(TypedDict, total=False):
2066220678

2066320679
class TerminateInstancesRequest(ServiceRequest):
2066420680
InstanceIds: InstanceIdStringList
20681+
SkipOsShutdown: Optional[Boolean]
2066520682
DryRun: Optional[Boolean]
2066620683

2066720684

@@ -29075,6 +29092,7 @@ def stop_instances(
2907529092
context: RequestContext,
2907629093
instance_ids: InstanceIdStringList,
2907729094
hibernate: Boolean | None = None,
29095+
skip_os_shutdown: Boolean | None = None,
2907829096
dry_run: Boolean | None = None,
2907929097
force: Boolean | None = None,
2908029098
**kwargs,
@@ -29098,6 +29116,7 @@ def terminate_instances(
2909829116
self,
2909929117
context: RequestContext,
2910029118
instance_ids: InstanceIdStringList,
29119+
skip_os_shutdown: Boolean | None = None,
2910129120
dry_run: Boolean | None = None,
2910229121
**kwargs,
2910329122
) -> TerminateInstancesResult:

localstack-core/localstack/aws/api/lambda_/__init__.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -378,21 +378,21 @@ class UpdateRuntimeOn(StrEnum):
378378

379379
class CodeSigningConfigNotFoundException(ServiceException):
380380
code: str = "CodeSigningConfigNotFoundException"
381-
sender_fault: bool = False
381+
sender_fault: bool = True
382382
status_code: int = 404
383383
Type: Optional[String]
384384

385385

386386
class CodeStorageExceededException(ServiceException):
387387
code: str = "CodeStorageExceededException"
388-
sender_fault: bool = False
388+
sender_fault: bool = True
389389
status_code: int = 400
390390
Type: Optional[String]
391391

392392

393393
class CodeVerificationFailedException(ServiceException):
394394
code: str = "CodeVerificationFailedException"
395-
sender_fault: bool = False
395+
sender_fault: bool = True
396396
status_code: int = 400
397397
Type: Optional[String]
398398

@@ -421,28 +421,28 @@ class EC2UnexpectedException(ServiceException):
421421

422422
class EFSIOException(ServiceException):
423423
code: str = "EFSIOException"
424-
sender_fault: bool = False
424+
sender_fault: bool = True
425425
status_code: int = 410
426426
Type: Optional[String]
427427

428428

429429
class EFSMountConnectivityException(ServiceException):
430430
code: str = "EFSMountConnectivityException"
431-
sender_fault: bool = False
431+
sender_fault: bool = True
432432
status_code: int = 408
433433
Type: Optional[String]
434434

435435

436436
class EFSMountFailureException(ServiceException):
437437
code: str = "EFSMountFailureException"
438-
sender_fault: bool = False
438+
sender_fault: bool = True
439439
status_code: int = 403
440440
Type: Optional[String]
441441

442442

443443
class EFSMountTimeoutException(ServiceException):
444444
code: str = "EFSMountTimeoutException"
445-
sender_fault: bool = False
445+
sender_fault: bool = True
446446
status_code: int = 408
447447
Type: Optional[String]
448448

@@ -456,21 +456,21 @@ class ENILimitReachedException(ServiceException):
456456

457457
class InvalidCodeSignatureException(ServiceException):
458458
code: str = "InvalidCodeSignatureException"
459-
sender_fault: bool = False
459+
sender_fault: bool = True
460460
status_code: int = 400
461461
Type: Optional[String]
462462

463463

464464
class InvalidParameterValueException(ServiceException):
465465
code: str = "InvalidParameterValueException"
466-
sender_fault: bool = False
466+
sender_fault: bool = True
467467
status_code: int = 400
468468
Type: Optional[String]
469469

470470

471471
class InvalidRequestContentException(ServiceException):
472472
code: str = "InvalidRequestContentException"
473-
sender_fault: bool = False
473+
sender_fault: bool = True
474474
status_code: int = 400
475475
Type: Optional[String]
476476

@@ -533,56 +533,56 @@ class KMSNotFoundException(ServiceException):
533533

534534
class PolicyLengthExceededException(ServiceException):
535535
code: str = "PolicyLengthExceededException"
536-
sender_fault: bool = False
536+
sender_fault: bool = True
537537
status_code: int = 400
538538
Type: Optional[String]
539539

540540

541541
class PreconditionFailedException(ServiceException):
542542
code: str = "PreconditionFailedException"
543-
sender_fault: bool = False
543+
sender_fault: bool = True
544544
status_code: int = 412
545545
Type: Optional[String]
546546

547547

548548
class ProvisionedConcurrencyConfigNotFoundException(ServiceException):
549549
code: str = "ProvisionedConcurrencyConfigNotFoundException"
550-
sender_fault: bool = False
550+
sender_fault: bool = True
551551
status_code: int = 404
552552
Type: Optional[String]
553553

554554

555555
class RecursiveInvocationException(ServiceException):
556556
code: str = "RecursiveInvocationException"
557-
sender_fault: bool = False
557+
sender_fault: bool = True
558558
status_code: int = 400
559559
Type: Optional[String]
560560

561561

562562
class RequestTooLargeException(ServiceException):
563563
code: str = "RequestTooLargeException"
564-
sender_fault: bool = False
564+
sender_fault: bool = True
565565
status_code: int = 413
566566
Type: Optional[String]
567567

568568

569569
class ResourceConflictException(ServiceException):
570570
code: str = "ResourceConflictException"
571-
sender_fault: bool = False
571+
sender_fault: bool = True
572572
status_code: int = 409
573573
Type: Optional[String]
574574

575575

576576
class ResourceInUseException(ServiceException):
577577
code: str = "ResourceInUseException"
578-
sender_fault: bool = False
578+
sender_fault: bool = True
579579
status_code: int = 400
580580
Type: Optional[String]
581581

582582

583583
class ResourceNotFoundException(ServiceException):
584584
code: str = "ResourceNotFoundException"
585-
sender_fault: bool = False
585+
sender_fault: bool = True
586586
status_code: int = 404
587587
Type: Optional[String]
588588

@@ -603,21 +603,21 @@ class ServiceException(ServiceException):
603603

604604
class SnapStartException(ServiceException):
605605
code: str = "SnapStartException"
606-
sender_fault: bool = False
606+
sender_fault: bool = True
607607
status_code: int = 400
608608
Type: Optional[String]
609609

610610

611611
class SnapStartNotReadyException(ServiceException):
612612
code: str = "SnapStartNotReadyException"
613-
sender_fault: bool = False
613+
sender_fault: bool = True
614614
status_code: int = 409
615615
Type: Optional[String]
616616

617617

618618
class SnapStartTimeoutException(ServiceException):
619619
code: str = "SnapStartTimeoutException"
620-
sender_fault: bool = False
620+
sender_fault: bool = True
621621
status_code: int = 408
622622
Type: Optional[String]
623623

@@ -631,7 +631,7 @@ class SubnetIPAddressLimitReachedException(ServiceException):
631631

632632
class TooManyRequestsException(ServiceException):
633633
code: str = "TooManyRequestsException"
634-
sender_fault: bool = False
634+
sender_fault: bool = True
635635
status_code: int = 429
636636
retryAfterSeconds: Optional[String]
637637
Type: Optional[String]
@@ -640,7 +640,7 @@ class TooManyRequestsException(ServiceException):
640640

641641
class UnsupportedMediaTypeException(ServiceException):
642642
code: str = "UnsupportedMediaTypeException"
643-
sender_fault: bool = False
643+
sender_fault: bool = True
644644
status_code: int = 415
645645
Type: Optional[String]
646646

localstack-core/localstack/services/cloudformation/provider.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@
137137
ARN_STACK_REGEX = re.compile(
138138
r"arn:(aws|aws-us-gov|aws-cn):cloudformation:[-a-zA-Z0-9]+:\d{12}:stack/[a-zA-Z][-a-zA-Z0-9]*/[-a-zA-Z0-9:/._+]+"
139139
)
140+
ARN_STACK_SET_REGEX = re.compile(
141+
r"arn:(aws|aws-us-gov|aws-cn):cloudformation:[-a-zA-Z0-9]+:\d{12}:stack-set/[a-zA-Z][-a-zA-Z0-9]*/[-a-zA-Z0-9:/._+]+"
142+
)
140143

141144

142145
def clone_stack_params(stack_params):

localstack-core/localstack/services/cloudformation/stores.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from localstack.services.cloudformation.engine.entities import Stack, StackChangeSet, StackSet
66
from localstack.services.cloudformation.v2.entities import ChangeSet as ChangeSetV2
77
from localstack.services.cloudformation.v2.entities import Stack as StackV2
8+
from localstack.services.cloudformation.v2.entities import StackSet as StackSetV2
89
from localstack.services.stores import AccountRegionBundle, BaseStore, LocalAttribute
910

1011
LOG = logging.getLogger(__name__)
@@ -19,6 +20,7 @@ class CloudFormationStore(BaseStore):
1920

2021
# maps stack set ID to stack set details
2122
stack_sets: dict[str, StackSet] = LocalAttribute(default=dict)
23+
stack_sets_v2: dict[str, StackSetV2] = LocalAttribute(default=dict)
2224

2325
# maps macro ID to macros
2426
macros: dict[str, dict] = LocalAttribute(default=dict)

0 commit comments

Comments
 (0)