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

feat: debug and verbosity #1046

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## HEAD (Unreleased)

**(none)**
- feat: verbosity and debug inputs to enable debug options

---

Expand Down
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ inputs:
plan:
description: 'Where to either save an Update Plan or read an Update Plan from'
required: false
log-verbosity:
description: 'Log verbosity of CLI during execution 1-10; Anything >3 is very verbose'
required: false
log-to-std-err:
description: 'Log to stderr instead of to files'
required: false
Comment on lines +106 to +108
Copy link
Member

Choose a reason for hiding this comment

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

Is there any value in logging to files inside the action? Unless users have setup to trawl /tmp at the end of the job their just going to get lost? Wonder if this be flipped relative to automationapi and be "log-to-files" and default to logging to stderr?

Choose a reason for hiding this comment

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

@ekbduffy would you consider settling for log-verbose and debug options and revisit this log-to-std-err at a later stage?

Copy link
Member

Choose a reason for hiding this comment

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

Yup the others make sense, just --log-to-stderr should probably default on if either of the others are set.

debug:
description: 'Print detailed debugging output during resource operations'
required: false
outputs:
output:
description: Output from running command
Expand Down
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export function makeConfig() {
}),
excludeProtected: getBooleanInput('exclude-protected'),
plan: getInput('plan'),
logVerbosity: getInput('log-verbosity'),
logToStdErr: getInput('log-to-std-err'),
debug: getInput('debug'),
},
};
}
Expand Down