Skip to content

chore: bring runtimes, dependencies and CI up to date; fix two bugs - #38

Merged
alparamonov merged 2 commits into
mainfrom
chore/modernize-2026-10
Oct 28, 2026
Merged

alparamonov merged 2 commits into
mainfrom
chore/modernize-2026-10

Conversation

@alparamonov

@alparamonov alparamonov commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings the sample's runtimes, dependencies and CI up to date, and fixes two bugs in error and non-default-stage paths. The default order flow behaves as before.

Backend

  • Lambda runtime python3.9 -> python3.14. python3.9 reached end of support on 2025-12-15 and function updates are blocked from 2027-08-31. The handlers need no code changes.

Frontend

  • next 16.2.6 -> 16.4.3, react / react-dom 18.3.1 -> 19.3.1. react-bootstrap 2.10.10 declares react >=16.14 as its peer range.
  • Removes react-use-websocket, which nothing imports (App.js uses the browser WebSocket API).
  • Removes the postcss override; next 16.4.3 pins patched postcss 8.5.23.
  • Regenerates package-lock.json. This resolves all 26 open Dependabot alerts (next, sharp, postcss, nanoid, source-map-js, baseline-browser-mapping).
  • Declares engines.node >=20.9.0, the minimum next 16.4 requires.

CI and Dependabot

  • Pins actions to commit SHAs (actions/checkout v7.0.1, stelligent/cfn_nag v0.8.10).
  • Adds a cfn-lint job, which flags deprecated Lambda runtimes (W2531).
  • Compiles the Lambda handlers with Python 3.14.
  • Builds the frontend on Node 24 with npm ci, alongside npm audit --omit=dev.
  • Adds .github/dependabot.yml: grouped security updates and weekly minor/patch updates for npm, monthly updates for GitHub Actions.

Docs

  • README requirements name Python 3.14 and Node.js 20.9 or later.

Bug fixes

  • reportProgress: the GoneException handler compared the error code to the integer 410, but the code is the string "GoneException". The stale-connection cleanup never ran and the function re-raised. It now deletes the connection row and returns normally.
  • State machine: the apigateway:invoke steps hardcoded "Stage": "Prod", so deploying with a different ApiStageName broke progress reporting. The stage now comes from a DefinitionSubstitutions entry. With the default Prod, the rendered definition is unchanged.

Testing

  • npm audit --omit=dev: 0 vulnerabilities. npm ci and npm run build succeed on Node 24.
  • Browser test of the static build against a mock WebSocket backend that sends the state machine's five progress messages: the progress log, the 100% progress bar and the disabled Send Order button during processing match the build from main; no console errors.
  • sam build with Python 3.14 succeeds; sam local invoke MockGenerateLabelFunction returns the expected payload in the python3.14 container.
  • cfn-lint: no findings. cfn_nag: 0 failures, the same 13 warnings as main.
  • reportProgress with stubbed clients: a connected client gets the message as before; a 410 now deletes the DynamoDB row and returns, where main raised GoneException.
  • State machine definition rendered with ApiStageName=Prod is identical to main; with Dev, every apigateway:invoke step uses Dev.
  • ci.yml and dependabot.yml validate against the GitHub JSON schemas; actionlint reports no issues.

Backend
- Lambda runtime python3.9 -> python3.14. python3.9 reached end of
  support on 2025-12-15 and function updates are blocked from 2027-08-31.
  The handlers need no code changes.

Frontend
- next 16.2.6 -> 16.4.3 and react / react-dom 18.3.1 -> 19.3.1.
  react-bootstrap 2.10.10 declares react >=16.14 as its peer range.
- Remove react-use-websocket; nothing imports it (App.js uses the
  browser WebSocket API).
- Remove the postcss override; next 16.4.3 pins patched postcss 8.5.23.
- Regenerate package-lock.json. Resolves all 26 open Dependabot alerts
  (next, sharp, postcss, nanoid, source-map-js, baseline-browser-mapping).
- Declare engines.node >=20.9.0 (the minimum next 16.4 requires).

CI and Dependabot
- Pin actions to commit SHAs (checkout v7.0.1, cfn_nag v0.8.10).
- Add cfn-lint, which flags deprecated Lambda runtimes (W2531).
- Compile the handlers with Python 3.14.
- Build the frontend on Node 24 with npm ci, alongside npm audit.
- Add .github/dependabot.yml: grouped security updates and weekly
  minor/patch updates for npm, monthly updates for GitHub Actions.

Docs
- README requirements name Python 3.14 and Node.js 20.9+.
…chine

- reportProgress: the GoneException handler compared the error code to
  the integer 410, but the code is the string "GoneException", so the
  stale-connection cleanup never ran and the function re-raised. Any
  GoneException now deletes the connection row and returns normally.
- statemachine: the apigateway:invoke steps hardcoded "Stage": "Prod",
  so deploying with a different ApiStageName broke progress reporting.
  The stage now comes from a DefinitionSubstitution of ApiStageName.
  With the default value the rendered definition is unchanged.
@alparamonov alparamonov changed the title chore: bring runtimes, dependencies and CI up to date chore: bring runtimes, dependencies and CI up to date; fix two bugs Oct 28, 2026
@alparamonov
alparamonov merged commit 111e15a into main Oct 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants