Skip to content

Bugfix: Fail build early if MAVLink generation has an error#23313

Merged
sfuhrer merged 1 commit intomainfrom
maetugr/mavlink-report-generator-error
Jun 24, 2024
Merged

Bugfix: Fail build early if MAVLink generation has an error#23313
sfuhrer merged 1 commit intomainfrom
maetugr/mavlink-report-generator-error

Conversation

@MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jun 21, 2024

Solved Problem

The mavlink generator command silently succeeds even though the logs could contain errors.

When working through a hard to debug error I found that the generation command for a dialect can silently fail and since the uavionix dialect is still included in most places the some builds succeed without the primary dialect included while other specific test builds that don't contain the uavionix dialect (mavlink FTP test) fail unexpectedly.

Solution

Use ArduPilot/pymavlink#863 to flag the error. I'll propose to make that default in pymavlink.

It's much more developer friendly to fail early in case of an error. The log path is then also shown in the console output.

Changelog Entry

Bugfix: Fail build early if MAVLink generation has an error

Test coverage

I ran this locally while debugging and lo and behold, it shows an error and the reference to the log output.
image

Without this flag the command silently succeeds even though the logs contains
an error. It's much more developer friendly to fail early in case of an error.
The log path is then also shown in the console output.
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jun 21, 2024

Suggested a new default here: ArduPilot/pymavlink#952

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to improve the developer experience for the next one who runs into the problem after me..

@sfuhrer sfuhrer merged commit 8cc7c99 into main Jun 24, 2024
@sfuhrer sfuhrer deleted the maetugr/mavlink-report-generator-error branch June 24, 2024 08:00
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Aug 5, 2024

This was solved in a better way now upstream. See #23490

Ali-barari pushed a commit to Ali-barari/AvesAID that referenced this pull request Apr 29, 2025
Without this flag the command silently succeeds even though the logs contains
an error. It's much more developer friendly to fail early in case of an error.
The log path is then also shown in the console output.
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