stop using unsupported debug flag for plugins#2377
stop using unsupported debug flag for plugins#2377VinozzZ merged 1 commit intogetporter:release/v1from
Conversation
Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
| plugin, err := p.Plugins.GetMetadata(ctx, opts.Name) | ||
| if err != nil { | ||
| return err | ||
| return fmt.Errorf("failed to get plugin metadata: %w", err) |
There was a problem hiding this comment.
By the way, I created #2376 to improve the error message returned when calls to the plugin fail. It would have helped us debug if stderr had been included in the error message that was returned in err.
|
I had one thought. This doesn't affect mixins at runtime, they rely on the PORTER_DEBUG environment variable set inside the bundle instead of the --debug flag. But when we call mixins at build time, for example for the build, lint or schema commands, then this does prevent us from passing along the --debug flag to them. I don't think any of the mixins use that flag for those commands (--debug has always been kind of a runtime thing) but if we ever need it in the future, the way to get --debug to work would be to pass PORTER_DEBUG to the mixin at buildtime too. I just wanted to capture that in case we end up wanting the mixin to behave differently in the future. I do think that not assuming that the mixin or plugin has a --debug flag is good and to use other ways to communicate that don't result in a hard failure if it's not supported. |
What does this change
since porter has removed the debug flag from plugins, we need to remove the reference in porter when running a plugin command
What issue does it fix
Closes #2375
Notes for the reviewer
Checklist
Reviewer Checklist