Fix: OutOfMemory error in mirror Lambda function (#7730)#7795
Fix: OutOfMemory error in mirror Lambda function (#7730)#7795nadove-ucsc wants to merge 4 commits intodevelopfrom
Conversation
ffd9a85 to
776a383
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7795 +/- ##
===========================================
- Coverage 85.07% 85.04% -0.03%
===========================================
Files 157 157
Lines 23293 23300 +7
===========================================
Hits 19816 19816
- Misses 3477 3484 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| # Prevent AWS from automatically updating the lambda runtime | ||
| resource_type = 'aws_lambda_runtime_management_config' | ||
| runtime_version = '1a6363019b274fc28ffbbec073e5ebf1a872c10c52269844a57c62e74063a49b' |
There was a problem hiding this comment.
Need brief explanation why we are pinning the version, what the human-readable semantic version is that we're are pinning, and a FIXME referring to a new issue to remove the pin.
Leave a comment on the new ticket about the following spike:
We need to file an issue with AWS support about the increased memory usage of the affected runtime version. For that it would be useful to have two previous MirrorFileAction invocations one from after the automatic update to the affected runtime version, and one from the subsequent experiment that Daniel preformed with the version pinned to the unaffected version. Ideally both invocations should be for the same file.
776a383 to
a7bf558
Compare
| # Pin lambda runtime to python:3.13.v76. When AWS automatically updated | ||
| # the runtime to 3.13v77, we observed a significant increase in memory | ||
| # usage, leading to mirroring failures. | ||
| # FIXME: Remove pinned lambda runtime version | ||
| # https://github.com/DataBiosphere/azul/issues/7798 |
There was a problem hiding this comment.
| # Pin lambda runtime to python:3.13.v76. When AWS automatically updated | |
| # the runtime to 3.13v77, we observed a significant increase in memory | |
| # usage, leading to mirroring failures. | |
| # FIXME: Remove pinned lambda runtime version | |
| # https://github.com/DataBiosphere/azul/issues/7798 | |
| # Pin Lambda runtime to python:3.13.v76. When AWS automatically updated | |
| # the runtime to 3.13v77, we observed a significant increase in memory | |
| # usage, leading to mirroring failures. | |
| # | |
| # FIXME: Remove pinned lambda runtime version | |
| # https://github.com/DataBiosphere/azul/issues/7798 | |
| # |
src/azul/terraform.py
Outdated
| # https://github.com/DataBiosphere/azul/issues/7798 | ||
| resource_type = 'aws_lambda_runtime_management_config' | ||
| runtime_version = '1a6363019b274fc28ffbbec073e5ebf1a872c10c52269844a57c62e74063a49b' | ||
| management_resources: MutableJSON = {} |
There was a problem hiding this comment.
| management_resources: MutableJSON = {} | |
| runtime_version_configs: MutableJSON = {} |
src/azul/terraform.py
Outdated
| management_resources: MutableJSON = {} | ||
| for resource_name, resource in resource_items('aws_lambda_function'): | ||
| management_resources[resource_name] = { | ||
| 'function_name': f'${{aws_lambda_function.{resource_name}.function_name}}', |
There was a problem hiding this comment.
Overwhelmingly, precedent is to use % when curlies occur naturally in the literal. Daniel snuck in f'${{ but that's a mistake.
src/azul/terraform.py
Outdated
| 'function_name': f'${{aws_lambda_function.{resource_name}.function_name}}', | ||
| 'qualifier': f'${{aws_lambda_function.{resource_name}.version}}', | ||
| 'update_runtime_on': 'Manual', | ||
| 'runtime_version_arn': f'arn:aws:lambda:us-east-1::runtime:{runtime_version}' |
There was a problem hiding this comment.
and then % here, too for visual consistency. Or just +
|
While it's fine to skip peer review, I'd prefer the author to check those CL items if they decide to do so. |
a7bf558 to
a79fe4f
Compare
a79fe4f to
3fd9d21
Compare
Linked issues: #7730
Checklist
Author
developissues/<GitHub handle of author>/<issue#>-<slug>1 when the issue title describes a problem, the corresponding PR
title is
Fix:followed by the issue titleAuthor (partiality)
ptag to titles of partial commitspartialor completely resolves all linked issuespartiallabelAuthor (reindex)
rtag to commit title or the changes introduced by this PR will not require reindexing of any deploymentreindex:devor the changes introduced by it will not require reindexing ofdevreindex:anvildevor the changes introduced by it will not require reindexing ofanvildevreindex:anvilprodor the changes introduced by it will not require reindexing ofanvilprodreindex:prodor the changes introduced by it will not require reindexing ofprodreindex:partialand its description documents the specific reindexing procedure fordev,anvildev,anvilprodandprodor requires a full reindex or carries none of the labelsreindex:dev,reindex:anvildev,reindex:anvilprodandreindex:prodAuthor (API changes)
APIor this PR does not modify a REST APIa(A) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.pyor this PR does not modify a REST APIAuthor (upgrading deployments)
make docker_images.jsonand committed the resulting changes or this PR does not modifyazul_docker_images, or any other variables referenced in the definition of that variableutag to commit title or this PR does not require upgrading deploymentsupgradeor does not require upgrading deploymentsdeploy:sharedor does not modifydocker_images.json, and does not require deploying thesharedcomponent for any other reasondeploy:gitlabor does not require deploying thegitlabcomponentdeploy:runneror does not require deploying therunnerimageAuthor (hotfixes)
Ftag to main commit title or this PR does not include permanent fix for a temporary hotfixanvilprodandprod) have temporary hotfixes for any of the issues linked to this PRAuthor (before every review)
develop, squashed fixups from prior reviewsmake requirements_updateor this PR does not modifyDockerfile,environment,requirements*.txt,common.mk,Makefileorenvironment.bootRtag to commit title or this PR does not modifyrequirements*.txtreqsor does not modifyrequirements*.txtmake integration_testpasses in personal deployment or this PR does not modify functionality that could affect the IT outcomePeer reviewer (after approval)
Note that after requesting changes, the PR must be assigned to only the author.
System administrator (after approval)
demoorno demono demono sandboxN reviewslabel is accurateOperator
reindex:…labels andrcommit title tagno demodevelopOperator (deploy
.sharedand.gitlabcomponents)_select dev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select dev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlab_select anvildev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select anvildev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlabdeploy:gitlabdeploy:gitlabSystem administrator (post-deploy of
.gitlabcomponent)dev.gitlabare complete or this PR is not labeleddeploy:gitlabanvildev.gitlabare complete or this PR is not labeleddeploy:gitlabOperator (deploy runner image)
_select dev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runner_select anvildev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runnerOperator (sandbox build)
sandboxlabel or PR is labeledno sandboxdevor PR is labeledno sandboxanvildevor PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxor this PR does not remove catalogs or otherwise causes unreferenced indices insandboxanvilboxor this PR does not remove catalogs or otherwise causes unreferenced indices inanvilboxsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevOperator (merge the branch)
pif the PR is also labeledpartialOperator (main build)
devanvildevdevdevanvildevanvildev_select dev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shared_select anvildev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shareddevanvildevOperator (reindex)
devor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevdevor this PR does not require reindexingdevdeploy_browserjob in the GitLab pipeline for this PR indevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdeploy_browserjob in the GitLab pipeline for this PR inanvildevor this PR does not require reindexinganvildevOperator (mirroring)
devor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevdevor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevdevor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevOperator
deploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprodandreindex:prodlabels to the next promotion PRs or this PR carries none of these labelsdeploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprodandreindex:prodlabels, from the description of this PR to that of the next promotion PRs or this PR carries none of these labelsShorthand for review comments
Lline is too longWline wrapping is wrongQbad quotesFother formatting problem