-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Race conditions with multiple downloads on the same layer (#7422)
* fix: Race conditions with multiple downloads on the same layer * Update format * Fix lint * Using uuid for download filename
- Loading branch information
Showing
4 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
tests/integration/testdata/start_api/template-warm-containers-multi-layers.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
|
||
Parameters: | ||
ModeEnvVariable: | ||
Type: String | ||
LayerArn: | ||
Default: arn:aws:lambda:us-west-2:111111111111:layer:layer:1 | ||
Type: String | ||
|
||
Resources: | ||
ApiGatewayApi: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: prod | ||
CacheClusterEnabled: true | ||
CacheClusterSize: '0.5' | ||
MethodSettings: | ||
- ResourcePath: / | ||
HttpMethod: GET | ||
CachingEnabled: true | ||
CacheTtlInSeconds: 300 | ||
HelloWorldFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main-layers.custom_layer_handler | ||
Runtime: python3.9 | ||
FunctionName: customname | ||
CodeUri: . | ||
Timeout: 600 | ||
Environment: | ||
Variables: | ||
MODE: !Ref ModeEnvVariable | ||
Layers: | ||
# Test remote layers with warm containers. | ||
- Ref: LayerArn | ||
Events: | ||
ApiEvent: | ||
Type: Api | ||
Properties: | ||
Path: / | ||
Method: get | ||
RestApiId: | ||
Ref: ApiGatewayApi | ||
HelloWorldFunction2: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main-layers.custom_layer_handler | ||
Runtime: python3.9 | ||
FunctionName: customname | ||
CodeUri: . | ||
Timeout: 600 | ||
Environment: | ||
Variables: | ||
MODE: !Ref ModeEnvVariable | ||
Layers: | ||
# Test remote layers with warm containers. | ||
- Ref: LayerArn | ||
Events: | ||
ApiEvent: | ||
Type: Api | ||
Properties: | ||
Path: / | ||
Method: get | ||
RestApiId: | ||
Ref: ApiGatewayApi | ||
HelloWorldFunction3: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: main-layers.custom_layer_handler | ||
Runtime: python3.9 | ||
FunctionName: customname | ||
CodeUri: . | ||
Timeout: 600 | ||
Environment: | ||
Variables: | ||
MODE: !Ref ModeEnvVariable | ||
Layers: | ||
# Test remote layers with warm containers. | ||
- Ref: LayerArn | ||
Events: | ||
ApiEvent: | ||
Type: Api | ||
Properties: | ||
Path: / | ||
Method: get | ||
RestApiId: | ||
Ref: ApiGatewayApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters