Skip to content

msg_docs: fix IndexError crash in generate_msg_docs.py#26546

Merged
Pedro-Roque merged 1 commit intomainfrom
fix/ci-metadata-msg-docs
Feb 21, 2026
Merged

msg_docs: fix IndexError crash in generate_msg_docs.py#26546
Pedro-Roque merged 1 commit intomainfrom
fix/ci-metadata-msg-docs

Conversation

@mrpollo
Copy link
Copy Markdown
Contributor

@mrpollo mrpollo commented Feb 21, 2026

Fix Docs - Orchestrator CI job failing on every branch since Feb 20.

generate_msg_docs.py crashes with an IndexError when a .msg file declares a single topic that doesn't match the camel_to_snake default. The camel_to_snake() regex was also broken for compound CamelCase names (AuxGlobalPosition produced aux_globalposition instead of aux_global_position). Additionally, metadata_sync.sh was redirecting stderr to /dev/null in non-verbose mode, hiding the actual error from CI logs.

PR #26306 added AuxGlobalPosition.msg, which exposed two latent bugs in generate_msg_docs.py from PR #24977.

Failed runs:

Fix generate_msg_docs.py IndexError when a .msg file declares a single
topic that does not match the camel_to_snake default (e.g.
AuxGlobalPosition.msg). The error message referenced self.topics[1]
(out of bounds) instead of self.topics[0].

Fix camel_to_snake() regex to correctly convert names like
"AuxGlobalPosition" to "aux_global_position". The previous regex
produced "aux_globalposition" because it failed to insert an underscore
between a lowercase letter and an uppercase letter mid-word.

Also remove stderr redirection (2>&1) from all make targets in
metadata_sync.sh so that errors are visible in CI logs even in
non-verbose mode, making failures easier to diagnose.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
@Pedro-Roque Pedro-Roque merged commit 9048a40 into main Feb 21, 2026
75 checks passed
@Pedro-Roque Pedro-Roque deleted the fix/ci-metadata-msg-docs branch February 21, 2026 06:24
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