Skip to content

Report failed action names on dispatch failure#397

Open
ajay wants to merge 1 commit into
anishathalye:masterfrom
ajay:ajay/report-failed-actions
Open

Report failed action names on dispatch failure#397
ajay wants to merge 1 commit into
anishathalye:masterfrom
ajay:ajay/report-failed-actions

Conversation

@ajay

@ajay ajay commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

When dotbot fails, the error message currently only says:

Some tasks were not executed successfully

This provides no indication of which actions failed, forcing the user to scroll back through the log to identify the problem. This is especially painful with long-running configs that have many actions (package installs, linking, shell commands, etc.), or when running with verbose flags.

This PR adds tracking of failed action names and includes them in the error message.

Before:

[ERROR] Some tasks were not executed successfully

After:

[ERROR] Some tasks were not executed successfully: shell-dnf, link

Backwards Compatibility

The dispatch() -> bool signature is unchanged. The new get_failed_actions() method is additive. Existing third-party plugins that call dispatcher.dispatch(tasks) will continue to work without modification.

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.29%. Comparing base (00f319c) to head (433f61e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   89.70%   90.29%   +0.58%     
==========================================
  Files          21       21              
  Lines         826      835       +9     
==========================================
+ Hits          741      754      +13     
+ Misses         85       81       -4     

☔ 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.

@ajay ajay force-pushed the ajay/report-failed-actions branch 2 times, most recently from 5a89d61 to 32d6756 Compare April 16, 2026 05:02
Track which actions failed during dispatch and include their names
in the error message. Failed actions are stored internally and
exposed via get_failed_actions(), preserving the existing
dispatch() -> bool return type for backwards compatibility.
@ajay ajay force-pushed the ajay/report-failed-actions branch from 32d6756 to 433f61e Compare April 16, 2026 05:34
@ajay

ajay commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

@anishathalye Bump, does this change look reasonable to you?

@anishathalye

Copy link
Copy Markdown
Owner

Sorry, been a bit backlogged, as I often am 😅

Will try to take a look in the next couple days.

@anishathalye

Copy link
Copy Markdown
Owner

Overall seems like a fine idea. One detail is that Dotbot configuration is a list of "tasks", where each task can have multiple "actions". This is mostly historical, I think these days most people use one action per task.

What should the right behavior be when there are potentially multiple actions per task, and the same action can appear multiple times across tasks (e.g., there may be multiple shells)? Should we show the unique set of actions that failed? Show failed actions with multiplicity?

Also, to avoid mixing up tasks and actions in the error message, we could make the error message something like:

Some tasks were not executed successfully (failed actions: shell-dnf, link)

Thoughts?

@anishathalye

Copy link
Copy Markdown
Owner

This may also be messy enough that it's not worth it. Do users have configs that are so big that the output from Dotbot is hard to parse and a summary of failed actions would be helpful? Is your config large enough for this / what motivated this change?

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