-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Lambda revisions #7482
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
Lambda revisions #7482
Conversation
Now fully and more comprehensively covered in `tests.integration.awslambda.test_lambda_api.TestLambdaRevisions.test_function_revisions_version_and_alias` Grouped all revision-related tests in `TestLambdaRevisions`
8a07e3b
to
4278da8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Love the additional comments you added where the context was a bit obscure 👍
I know there are a few new TODOs and things we've encountered here that will need to be fixed in the future, but I'd propose we move forward for now and tackle this later when polishing 👍
Co-authored-by: Dominik Schubert <[email protected]>
I agree on bundling these TODOs in the polishing round 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good work (little too late :D)
@@ -402,6 +404,11 @@ def _publish_version_from_existing_version( | |||
self.lambda_service.publish_version(new_version) | |||
state = lambda_stores[account_id][region] | |||
function = state.functions.get(function_name) | |||
# TODO: re-evaluate data model to prevent this dirty hack just for bumping the revision id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the intention was to have a transparent mechanism to change revision ids without manually doing it, but publishing versions is the perfect counterexample for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Commendable efforts as it works most of the time and makes it easier for these cases.
"""Utility method to create a new function via the Lambda API | ||
CAVEAT: Does NOT wait until the function is ready/active. The fixture create_lambda_function waits until ready.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is actually the base of create_lambda_function, as the fixture was meant as a drop in replacement. Nobody should use this function directly anymore (or almost anything in testutil, for that matter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
I just saw it used in other services (17x in localstack and 21x in -ext) and therefore added the clarification and reference to the fixture.
Thank you 🙏 Sorry for the timing 😬 |
Resolves misleading naming especially for latest_version (pretends it is $LATEST) but actually refers to the resolved qualifier. Fixes Daniel's comment: #7482 (comment)
Test + implement revisions (i.e., RevisionId) for lambda in general (with versions,
aliases, layers, etc). It seems that the revision id of permissions is
the same as for qualified lambdas (i.e., VersionFunctionConfiguration).
Motivation
Behavior
PreconditionFailedException
Overview of Actions / API Operations with RevisionId support:
Scope
Questions
Details
For more details: See Revisions in the Notion Lambda Board.
Follow Up (out of scope)