Skip to content

feat(toolkit-lib)!: generic messages do not have a code #526

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented May 22, 2025

In the original RFC we had introduced the concept of "standard" messages for which no backwards compatibility rules won't apply. In the first developer preview release of toolkit-lib this was implemented as message with a code ending in 0000 being consider "standard" (or "default") and other messages.

With the experience from the developer preview, we have found this way to handle the distinction slightly confusing and putting comparatively complicated work on the user (they need to know and check for the code ending in 0000). It was also easy to accidentally make a mistake by copy and pasting the message code and not noticing it's specialness.

Instead, we are now proposing to change this implementation: Messages and requests with a code will be subject to our backwards compatibility guarantees and can be relied upon by integrators. Standard messages will no longer have a code and must be treated purely informational. Note that all requests and any messages with a payload will always have a code. However some coded messages might not currently have a payload (but may in future according to our backwards compatibility rules).

This PR reflects these changes and updates the message registry with the respective documentation.

BREAKING CHANGE: The code field on messages is now optional. All messages with a code are subject to our backwards compatibility guarantees and can be relied upon by integrators. Messages that previously had a "default code" ending in 0000 no longer have a code and must be treated purely informational. Requests and messages with a payload are always coded.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team May 22, 2025 16:18
@github-actions github-actions bot added the p2 label May 22, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 78.86%. Comparing base (0145866) to head (71ecf77).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cxapp/cloud-executable.ts 0.00% 2 Missing ⚠️
packages/aws-cdk/lib/cxapp/exec.ts 33.33% 2 Missing ⚠️
packages/aws-cdk/lib/cli/io-host/cli-io-host.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
- Coverage   78.92%   78.86%   -0.06%     
==========================================
  Files          46       46              
  Lines        6980     6980              
  Branches      777      778       +1     
==========================================
- Hits         5509     5505       -4     
- Misses       1452     1456       +4     
  Partials       19       19              
Flag Coverage Δ
suite.unit 78.86% <28.57%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrgrain mrgrain changed the title feat(toolkit-lib): generic messages do not have a code feat(toolkit-lib)!: generic messages do not have a code May 23, 2025
@mrgrain mrgrain force-pushed the mrgrain/feat/default-messages-have-no-code branch from f92886b to 71ecf77 Compare May 23, 2025 11:27
@mrgrain mrgrain temporarily deployed to integ-approval May 23, 2025 11:27 — with GitHub Actions Inactive
@mrgrain mrgrain marked this pull request as ready for review May 24, 2025 14:28
@mrgrain mrgrain added this pull request to the merge queue May 26, 2025
Merged via the queue into main with commit b1dfe96 May 26, 2025
35 checks passed
@mrgrain mrgrain deleted the mrgrain/feat/default-messages-have-no-code branch May 26, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants