fix(deploy-on-aws): merge duplicate iot key in aws4-shapes.json#244
Open
TheSaiEaranti wants to merge 1 commit into
Open
fix(deploy-on-aws): merge duplicate iot key in aws4-shapes.json#244TheSaiEaranti wants to merge 1 commit into
TheSaiEaranti wants to merge 1 commit into
Conversation
The registry defined the "iot" category twice. Strict JSON parsers reject the file (check-json) and lenient ones keep only the second definition, so the 45 shapes unique to the first definition were silently discarded and validate_drawio.py rejected diagrams that referenced them. Merge both definitions into one sorted "iot" entry of 62 shapes. This makes 43 shape names valid again (two of the 45 were already reachable through another category) and removes none. Keep fillColor #3F8624: it was already the effective value, is shared with five other categories, and unlike #1A9C37 it appears in the upstream draw.io sidebar. No generator for this file is committed to the repo, so the fix is applied to the artifact. Fixes awslabs#216
TheSaiEaranti
requested review from
a team,
krokoko,
scottschreckengaust and
theagenticguy
July 25, 2026 09:23
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.
Fixes #216
Problem
plugins/deploy-on-aws/scripts/lib/aws4-shapes.jsondefined theiotcategory twice:fillColor#1A9C37#3F8624The two lists overlap by only 14 entries.
check-jsonrejects the file outright, and lenient parsers keep the last definition — so the 45 shapes unique to the first definition were silently dropped.This is not only a lint failure.
validate_drawio.pyflattens every category'sshapesintovalid_shapes(lines 25-30) and rejects any shape not in that set (line 225), so valid diagrams were being failed:Fix
Merge both definitions into a single
iotentry holding the sorted union — 62 shapes.valid_shapesgoes from 1057 to 1100: 43 shape names become valid again, and none are removed. (45 were unique to the first definition; 2 of those,iot_device_gatewayandiot_over_the_air_update, were already reachable through another category.)On
fillColorI kept
#3F8624, for three reasons: it is the value that was already in effect, it is shared with five other categories (storage,customer_enablement,cloud_financial_management,migration_modernization), and#1A9C37appears nowhere else in this registry nor anywhere in the upstreamSidebar-AWS4.js.fillColoris not consulted byvalidate_drawio.py, so this affects documentation only — happy to switch if#1A9C37was the intended IoT colour.On the generator
The file header describes it as auto-generated from draw.io's
Sidebar-AWS4.jsandaws4.xml, and the issue asks that the generator be fixed if one exists. No generator for this file is committed to the repository —validate_drawio.pyis the only thing that references it — so the fix is applied to the artifact. If the generator lives elsewhere it will need the same de-duplication, or it will reintroduce this on the next regeneration.Verification
json.loadwith a duplicate-detectingobject_pairs_hook— no duplicate keys remain (this is whatcheck-jsonenforces).dprint checkon the file — exit 0.iotregion: 22 insertions, 41 deletions, one file.Scoped to #216 only; the ruff failures from the same tracking issue (#213) are #218 and are untouched here.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.