Skip to content
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

Do not print unsupported mixin command errors #2488

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

carolynvs
Copy link
Member

What does this change

Not all of the mixin commands are required, for example schema and lint are optional. Porter does ignore failed commands when the mixin doesn't support a called command, but after I updated that bit of code to use spans and structured logging, I accidentally caused porter to always print out if the command failed, even when the verbosity is greater than debug.

This fixes failed mixin commands to only print the error when verbosity is debug and I've added a CLI test to validate that we print when expected to avoid future regressions in this area.

What issue does it fix

#2487

Notes for the reviewer

N/A

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Not all of the mixin commands are required, for example schema and lint are optional. Porter does ignore failed commands when the mixin doesn't support a called command, but after I updated that bit of code to use spans and strutured logging, I accidentally caused porter to always print out if the command failed, even when the verbosity is greater than debug.

This fixes failed mixin commands to only print the error when verbosity is debug and I've added a CLI test to validate that we print when expected to avoid future regressions in this area.

Signed-off-by: Carolyn Van Slyck <[email protected]>
@carolynvs carolynvs marked this pull request as ready for review December 6, 2022 18:29
@carolynvs carolynvs merged commit 7c03f20 into getporter:main Dec 6, 2022
@carolynvs carolynvs deleted the missing-lint-cmd branch December 6, 2022 21:45
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.

2 participants