notaryproject / notation

A CLI tool to sign and verify artifacts
https://notaryproject.dev/
Apache License 2.0
306 stars 84 forks source link

pass debug flag to plugin #904

Open priteshbandi opened 3 months ago

priteshbandi commented 3 months ago

Is your feature request related to a problem?

Currently, Notation prints debug information using the --debug flag, but there's no mechanism to pass this flag to plugins. Additionally, since Notation doesn't transmit any environment variables to plugins, plugin producers have limited options to output debug information.

What solution do you propose?

Set the environment variable ENABLE_NOTATION_PLUGIN_Debug=1 when invoking the plugin, or call the plugin with the --debug flag.

What alternatives have you considered?

Passing the debug flag as plugin configuration poses a challenge as the plugin needs to parse the input to determine if debugging is enabled or not. In come cases plugin producer might be trying to debug parsing issues.

Any additional context?

No response

yizha1 commented 3 months ago

Per the discussion in the meeting on Mar 12 2024, set the milestone for 1.3.0.

JeyJeyGao commented 2 months ago

@priteshbandi Do you have any idea how the plugin outputs the debug information? Currently, the response from the plugin is in JSON format and follows the plugin's standards. However, there is no field for debug information.