-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix(lambda): enforce lambda alias alphanumeric logical id #3738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1113c67
fix(lambda): enforce lambda alias alphanumeric logical id
vicheey fc87114
fix lint
vicheey a986f96
fix: rename duplicate test method to resolve linting error
vicheey 1b88bb3
fix lint issue with _validate_deployment_preference_and_add_update_po…
vicheey 023ea1a
update logic for alias logical id
vicheey 8dad554
Merge branch 'develop' into develop
vicheey bc7d109
Merge branch 'develop' into develop
mbfreder 549bb67
add transform failure test and update error message
vicheey 084e510
Merge branch 'develop' into develop
mbfreder 8be8d8d
add positve test
vicheey 804e2e5
Merge branch 'develop' into develop
vicheey 9f976be
fix make pr issue
vicheey 568152f
Merge branch 'develop' into develop
vicheey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
9 changes: 9 additions & 0 deletions
9
tests/translator/input/error_function_invalid_autopublishalias_name.yaml
This file contains hidden or 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,9 @@ | ||
Resources: | ||
vicheey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
MyFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/hello.zip | ||
Handler: hello.handler | ||
Runtime: python3.9 | ||
# Using an invalid alias name with special characters that can't be properly transformed | ||
AutoPublishAlias: invalid*alias@name |
9 changes: 9 additions & 0 deletions
9
tests/translator/output/error_function_invalid_autopublishalias_name.json
This file contains hidden or 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,9 @@ | ||
{ | ||
"_autoGeneratedBreakdownErrorMessage": [ | ||
"Invalid Serverless Application Specification document. ", | ||
"Number of errors found: 1. ", | ||
"Resource with id [MyFunction] is invalid. ", | ||
"AutoPublishAlias name ('invalid*alias@name') must contain only alphanumeric characters, hyphens, or underscores matching (?!^[0-9]+$)([a-zA-Z0-9-_]+) pattern." | ||
], | ||
"errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. AutoPublishAlias name ('invalid*alias@name') must contain only alphanumeric characters, hyphens, or underscores matching (?!^[0-9]+$)([a-zA-Z0-9-_]+) pattern." | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.