Skip to content

fix: errors thrown in plugin construction may appear as a missing dependency #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

sophia-bq
Copy link
Contributor

Summary

fix: errors thrown in plugin construction may appear as a missing dependency

Description

Any errors associated with importing and constructing the plugin are swallowed by each plugin's plugin factory which logs the error and then returns The plugin could not be imported. Please ensure the required dependencies have been installed. Plugin: '<plugin-name>'

This error was thrown upon attempts to construct the AwsSecretsManagerPlugin without a secretId, even though the error caught correctly identified the issue. The AwsSecretsManagerPlugin is the only plugin currently that has a required property (secretId) that is not handled before construction. When any other required property is missing, an error is thrown before reaching the plugin factory.

Additionally, manipulation of the host property was attempted without first checking if it was provided, this led to confusing error messages.

Changes:

  • Fix AwsSecretsManagerPluginFactory to return applicable error messaging
  • Correct handling of missing host property

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq karenc-bq added the ready for review Pull requests that are ready to be reviewed label Oct 19, 2024
@sophia-bq sophia-bq closed this Oct 23, 2024
@sophia-bq sophia-bq deleted the pluginConstruction branch October 23, 2024 00:23
@sophia-bq sophia-bq restored the pluginConstruction branch October 23, 2024 00:27
@sophia-bq sophia-bq reopened this Oct 23, 2024
@crystall-bitquill crystall-bitquill merged commit c2e09e2 into aws:main Oct 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Pull requests that are ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants