Skip to content

fix!: Raise exceptions when a plugin fails to load.#1377

Draft
xitij2000 wants to merge 1 commit intooverhangio:mainfrom
open-craft:kshitij/error-on-missing-plugin
Draft

fix!: Raise exceptions when a plugin fails to load.#1377
xitij2000 wants to merge 1 commit intooverhangio:mainfrom
open-craft:kshitij/error-on-missing-plugin

Conversation

@xitij2000
Copy link
Copy Markdown
Contributor

When a plugin is missing or throws an error while loading, Tutor continues as normal. At times this has made us recognise issues far later than we'd like.

This change will raise an error causing the command to return an error and the break the CI flow rather than deploying a broken instance with missing plugins.

We've considered few alternatives.

  1. Put this behind an option flag such as --check, however this flag would need to be added in a lot of places that cause plugins to load.
  2. Adding another command like tutor doctor this is a convention that many such tools follow that check the config and environment for errors and suggest fixes. This issue with this is that it will require updating existing usage of tutor to call tutor doctor first.
  3. Creating a plugin for this. We think this is a core feature hat should be part of tutor, but this could potentially be done in a plugin.

@xitij2000
Copy link
Copy Markdown
Contributor Author

Note this PR is to get the conversation started, we can improve the error messaging etc.

@Kelketek
Copy link
Copy Markdown

@xitij2000 It looks like you can't disable the plugin using the command line after running into this problem. I could try modifying the config, but I can't ask it for the config root, either. Is it possible to keep this a warning for configuration commands but an error for things like image building and launching?

@xitij2000
Copy link
Copy Markdown
Contributor Author

xitij2000 commented Apr 29, 2026

@xitij2000 It looks like you can't disable the plugin using the command line after running into this problem. I could try modifying the config, but I can't ask it for the config root, either. Is it possible to keep this a warning for configuration commands but an error for things like image building and launching?

I'll look into that. For now I just wanted to get some feedback. Is there is a reason to not do this at all? Or move it to a separate command or plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Triage

Development

Successfully merging this pull request may close these issues.

3 participants