fix(core): tolerate missing optional SSM secrets (#72)#78
Draft
cursor[bot] wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Bayashat <baiashat2002@gmail.com>
π Infrastructure Changes Preview (Zerde Telegram Bot)This PR will modify the following AWS resources: βΉοΈ No infrastructure changes detectedThis PR only contains code changes (Lambda functions, etc.) π Full CDK Diff Outputb'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'
b'!! !!\n'
b'!! Node 20 has reached end-of-life on 2026-04-30 and will no longer be supported in new releases after 2026-10-30. !!\n'
b'!! Please upgrade to a supported node version as soon as possible. !!\n'
b'!! !!\n'
b'!! This software is currently running on node v20.20.0. !!\n'
b'!! As of the current release of this software, supported node releases are: !!\n'
b'!! - ^24.0.0 (Planned end-of-life: 2028-04-30) !!\n'
b'!! - ^22.0.0 (Planned end-of-life: 2027-04-30) !!\n'
b'!! - ^20.0.0 (Planned end-of-life: 2026-04-30) [DEPRECATED] !!\n'
b'!! !!\n'
b'!! This warning can be silenced by setting the JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION environment variable. !!\n'
b'!! !!\n'
b'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 1.82kB done
#1 DONE 0.0s
#2 [internal] load metadata for public.ecr.aws/sam/build-python3.13:latest
#2 DONE 0.1s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/2] FROM public.ecr.aws/sam/build-python3.13:latest@sha256:be015b4dbfce398c76feb589c307073a48aed25b6accee4db41a481b78a490d2
#4 DONE 0.0s
#5 [2/2] RUN python -m venv /usr/app/venv && mkdir /tmp/pip-cache && chmod -R 777 /tmp/pip-cache && pip install --upgrade pip && mkdir /tmp/poetry-cache && chmod -R 777 /tmp/poetry-cache && mkdir /tmp/uv-cache && chmod -R 777 /tmp/uv-cache && pip install pipenv==2022.4.8 poetry==1.5.1 uv==0.6.9 && rm -rf /tmp/pip-cache/* /tmp/poetry-cache/* /tmp/uv-cache/*
#5 CACHED
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:f58f5fff9581f9ec3dfbf791dc5bb1550d9a142b0ad5be2021c6cb708b4bf5d0 done
#6 naming to docker.io/library/cdk-2f00c4750ff59e99d116a24eff743410b40db5d1bdfb8bf3dfedcc34816a707d 0.0s done
#6 DONE 0.0s
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 1.82kB done
#1 DONE 0.0s
#2 [internal] load metadata for public.ecr.aws/sam/build-python3.13:latest
#2 DONE 0.1s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/2] FROM public.ecr.aws/sam/build-python3.13:latest@sha256:be015b4dbfce398c76feb589c307073a48aed25b6accee4db41a481b78a490d2
#4 DONE 0.0s
#5 [2/2] RUN python -m venv /usr/app/venv && mkdir /tmp/pip-cache && chmod -R 777 /tmp/pip-cache && pip install --upgrade pip && mkdir /tmp/poetry-cache && chmod -R 777 /tmp/poetry-cache && mkdir /tmp/uv-cache && chmod -R 777 /tmp/uv-cache && pip install pipenv==2022.4.8 poetry==1.5.1 uv==0.6.9 && rm -rf /tmp/pip-cache/* /tmp/poetry-cache/* /tmp/uv-cache/*
#5 CACHED
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:f58f5fff9581f9ec3dfbf791dc5bb1550d9a142b0ad5be2021c6cb708b4bf5d0 done
#6 naming to docker.io/library/cdk-2f00c4750ff59e99d116a24eff743410b40db5d1bdfb8bf3dfedcc34816a707d done
#6 DONE 0.0s
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 1.82kB done
#1 DONE 0.0s
#2 [internal] load metadata for public.ecr.aws/sam/build-python3.13:latest
#2 DONE 0.1s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/2] FROM public.ecr.aws/sam/build-python3.13:latest@sha256:be015b4dbfce398c76feb589c307073a48aed25b6accee4db41a481b78a490d2
#4 DONE 0.0s
#5 [2/2] RUN python -m venv /usr/app/venv && mkdir /tmp/pip-cache && chmod -R 777 /tmp/pip-cache && pip install --upgrade pip && mkdir /tmp/poetry-cache && chmod -R 777 /tmp/poetry-cache && mkdir /tmp/uv-cache && chmod -R 777 /tmp/uv-cache && pip install pipenv==2022.4.8 poetry==1.5.1 uv==0.6.9 && rm -rf /tmp/pip-cache/* /tmp/poetry-cache/* /tmp/uv-cache/*
#5 CACHED
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:f58f5fff9581f9ec3dfbf791dc5bb1550d9a142b0ad5be2021c6cb708b4bf5d0 done
#6 naming to docker.io/library/cdk-2f00c4750ff59e99d116a24eff743410b40db5d1bdfb8bf3dfedcc34816a707d done
#6 DONE 0.0s
start: Building zerde-serverless-telegram-bot-dev Template
success: Built zerde-serverless-telegram-bot-dev Template
start: Publishing zerde-serverless-telegram-bot-dev Template (current_account-current_region-0d7e8c33)
success: Published zerde-serverless-telegram-bot-dev Template (current_account-current_region-0d7e8c33)
Hold on while we create a read-only change set to get a diff with accurate replacement information (use --method=template to use a less accurate but faster template-only diff)
Stack ZerdeServerlessTelegramBotStack-dev (zerde-serverless-telegram-bot-dev)
Resources
[~] AWS::Lambda::LayerVersion ZerdeServerlessZerdeCommonLayer ZerdeServerlessZerdeCommonLayer41490F86 replace
ββ [~] Content (requires replacement)
ββ [~] .S3Key:
ββ [-] 0dcc5891de830f6f76afa33dfb31eed76e8777a2639f009c03225b20751af5e3.zip
ββ [+] fb15d5c05a5fad76ffeee4cb0746158cd2e92f08647d605d059f434f25f1bdb4.zip
[~] AWS::Lambda::Function ZerdeServerlessBot/ZerdeServerlessBotLambda ZerdeServerlessBotZerdeServerlessBotLambdaA4D02A14
ββ [~] Code
β ββ [~] .S3Key:
β ββ [-] df87ab2e1e02879d3be2c59b3598082f9e21c7b1efa245cdbe230096d7d9e4fb.zip
β ββ [+] 4535e045a3cbff14c90d0d9f8887af5950e07c71958579d130891305603356a9.zip
ββ [~] Environment
ββ [~] .Variables:
ββ [~] .CHAT_LANG_MAP:
ββ [-] {"-1001450935528": "kk", "-1001244628965": "kk", "-1003930600007": "zh", "-1002211083217": "zh", "-1002914248981": "ru"}
ββ [+] {"-1001450935528": "kk", "-1001244628965": "kk", "-1002211083217": "zh", "-1003930600007": "zh", "-1002914248981": "ru"}
[~] AWS::Lambda::Function ZerdeServerlessQuiz/ZerdeServerlessQuizLambda ZerdeServerlessQuizZerdeServerlessQuizLambda4D9EA339
ββ [~] Code
ββ [~] .S3Key:
ββ [-] d9d7c1ef28c4be304708c4a3e7fae5d324d5b70daf1c3eb4d2355715272c9f83.zip
ββ [+] b7faec796eb61c662cf722c4db31e312967fe96eebb817b56dcc1c3269c0a443.zip
β¨ Number of stacks with differences: 1
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
π Description
What
required=Falseon first feature use.Why
groq-api-key,gemini-api-key, ordeepseek-api-keyparameter could make the bot Lambda fail during cold start before it can handle webhooks or SQS events.π Type of Change
ποΈ Infrastructure Changes (Crucial)
β Checklist
pre-commit run --all-fileslocally and fixed all issues.pytest).cdk difflocally to verify changes.π Related Issues
Verification
python3 -m pytest tests/test_ssm_secrets.py tests/test_webhook.py tests/test_explain_enqueue.py tests/test_sqs_task_router.py(19 passed)python3 -m pytest(108 passed)