Skip to content

Conversation

@mazdak
Copy link
Contributor

@mazdak mazdak commented Sep 3, 2025

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Description

Users frequently saw “failed to find plugin …” when the system services weren’t running; the message didn’t explain the root cause or where plugins are looked up. No change to plugin execution flow; only error messaging and path discovery hints are improved for a better UX.

Motivation and Context

Users frequently saw “failed to find plugin …” when the system services weren’t running; the message didn’t explain the root cause or where plugins are looked up. I was confronted with this several times during plugin development because the container system was not running, but the error message led me to believe the files were missing.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@dcantah
Copy link
Contributor

dcantah commented Sep 3, 2025

This makes me think we should expose a plugins command and subsystem in the daemon, where one of the bits of info you could get from this would be the plugin directories so we don't need to do all of that logic here to craft them again.

@dcantah
Copy link
Contributor

dcantah commented Sep 3, 2025

Also, the license headers can be generated via make fmt, you don't need to add them manually.

"""
Plugin 'container-\(command)' not found.
- If system services are not running, start them with: container system start
- If the plugin isn't installed, ensure it exists under:
Copy link
Contributor

Choose a reason for hiding this comment

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

@mazdak this all looks good. This one sentence is a bit confusing. What do you think about

- Check to see that the plugin exists under:

Copy link
Contributor

Choose a reason for hiding this comment

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

What I see in my local build looks good.

Only other nit is that a blank line before Usage: might improve readability.

% bin/container foo
Warning! Running debug build. Performance may be degraded.
Error: Plugin 'container-foo' not found.
- If system services are not running, start them with: container system start
- If the plugin isn't installed, ensure it exists under:
  - {my-project-path}/libexec/container-plugins/foo
  - {my-project-path}/libexec/container/plugins/foo
Usage: container [--debug] <subcommand>
  See 'container --help' for more information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made both those changes.

@mazdak mazdak requested a review from jglogan September 5, 2025 13:51
@mazdak mazdak force-pushed the mazdak/fix-plugin-not-found-message branch from 4cac472 to b2a0e2d Compare September 5, 2025 19:58
@jglogan
Copy link
Contributor

jglogan commented Sep 8, 2025

@mazdak Try rebasing and running make fmt - your build is failing the format checks. Otherwise everything looks good.

Users frequently saw “failed to find plugin …” when the system services
weren’t running; the message didn’t explain the root cause or where
plugins are looked up.

Added a test for the "Plugin not found" error
@mazdak mazdak force-pushed the mazdak/fix-plugin-not-found-message branch from b2a0e2d to 09000a7 Compare September 8, 2025 19:56
@mazdak
Copy link
Contributor Author

mazdak commented Sep 8, 2025

@mazdak Try rebasing and running make fmt - your build is failing the format checks. Otherwise everything looks good.

Done and Done @jglogan

@jglogan jglogan merged commit be89df8 into apple:main Sep 8, 2025
2 checks passed
@jglogan
Copy link
Contributor

jglogan commented Sep 8, 2025

@mazdak Merged, thank you for the contribution!

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.

3 participants