fix(quiz): persist on-demand poll records#76
Draft
cursor[bot] wants to merge 2 commits into
Draft
Conversation
Co-authored-by: Bayashat <baiashat2002@gmail.com>
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:d3f999b8f83fd6c4f1224858b6d25f85de9c8fc135773dfba4158f7dec1dd0e4 done
#6 naming to docker.io/library/cdk-acc063e5c633aa0cdd99b8c074ed11ce1a8a330da90f18f9f4f3f8758e57b403 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:d3f999b8f83fd6c4f1224858b6d25f85de9c8fc135773dfba4158f7dec1dd0e4 done
#6 naming to docker.io/library/cdk-acc063e5c633aa0cdd99b8c074ed11ce1a8a330da90f18f9f4f3f8758e57b403 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:d3f999b8f83fd6c4f1224858b6d25f85de9c8fc135773dfba4158f7dec1dd0e4 done
#6 naming to docker.io/library/cdk-acc063e5c633aa0cdd99b8c074ed11ce1a8a330da90f18f9f4f3f8758e57b403 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-8bc635fe)
success: Published zerde-serverless-telegram-bot-dev Template (current_account-current_region-8bc635fe)
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::Function ZerdeServerlessBot/ZerdeServerlessBotLambda ZerdeServerlessBotZerdeServerlessBotLambdaA4D02A14
ββ [~] Code
β ββ [~] .S3Key:
β ββ [-] df87ab2e1e02879d3be2c59b3598082f9e21c7b1efa245cdbe230096d7d9e4fb.zip
β ββ [+] f064578e11f3bc7623c92c55a25331c43258a6c657cc463f3f66f72201e8c091.zip
ββ [~] Environment
ββ [~] .Variables:
ββ [~] .CHAT_LANG_MAP:
ββ [-] {"-1001450935528": "kk", "-1001244628965": "kk", "-1003930600007": "zh", "-1002211083217": "zh", "-1002914248981": "ru"}
ββ [+] {"-1001244628965": "kk", "-1001450935528": "kk", "-1002211083217": "zh", "-1003930600007": "zh", "-1002914248981": "ru"}
[~] AWS::Lambda::Function ZerdeServerlessQuiz/ZerdeServerlessQuizLambda ZerdeServerlessQuizZerdeServerlessQuizLambda4D9EA339
ββ [~] Code
ββ [~] .S3Key:
ββ [-] d9d7c1ef28c4be304708c4a3e7fae5d324d5b70daf1c3eb4d2355715272c9f83.zip
ββ [+] db55dc4b650c95dec49f83dff6c981ebe6537315ec0318f6273da54c667277a8.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:
/genquizon-demand quiz poll metadata after Telegram successfully returns a poll id.Why:
poll_answerhandling cannot resolve the poll id and silently ignores answers, causing score/streak data loss for on-demand quizzes.Verification:
python3 -m pytest tests/test_quiz_service.py tests/test_webhook_poll_answer.py tests/test_quiz_streak.pypython3 -m pytestπ Type of Change
ποΈ Infrastructure Changes (Crucial)
β Checklist
pre-commit run --all-fileslocally and fixed all issues.pytest).cdk difflocally to verify changes.π Related Issues