-
Notifications
You must be signed in to change notification settings - Fork 1
Enabling to skip sudo plugins #30
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
Conversation
|
@landrews-amd i have updated this PR and enabled to skip sudo through cmd line args as well since my team keeps running into issues like this and doing it through configs isnt enough. We run tests mostly without providing plugin configs |
|
@cmcknigh we can update our tests to look like this: notice the extra --skip-sudo cmd line arg |
nodescraper/cli/cli.py
Outdated
| for pcfg in plugin_config_inst_list: | ||
| pcfg.global_args.setdefault("collection_args", {})["skip_sudo"] = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only need to be added to the last config in the list, not every one. They will be merged together in plugin executor, with the last config taking precedence.
| if args.skip_sudo: | ||
| self.result.message = "Skipping sudo plugin" | ||
| self.result.status = ExecutionStatus.NOT_RAN | ||
| return self.result, None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should only be done if targeting linux.
| if args.skip_sudo: | ||
| self.result.message = "Skipping sudo plugin" | ||
| self.result.status = ExecutionStatus.NOT_RAN | ||
| return self.result, None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should only be done when targeting linux
Sample runs:
plugin that require sudo can be skipped through setting global_args in plugin config:
Sample run: