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(ansible): Configure verbosity via annotation #2102

Merged

Conversation

djzager
Copy link
Contributor

@djzager djzager commented Oct 24, 2019

This makes it possible to create a CR with an annotation, specifically
"ansible.operator-sdk/verbosity", to override the verbosity of
ansible-runner commands for a given CR.

  • Store the verbosity on runner
  • Update cmdFuncType to take verbosity and *exec.Cmd to convert
    integer value of verbosity to string
  • In Run() get verbosity annotation from CR (if it exists) and use
    that value when executing the cmdFunc

Closes #2091

Checklist:

  • Update changelog
  • Update advanced_options.md documentation for Ansible Operators

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 24, 2019
@djzager djzager changed the title feat(ansible): Configure verbosity via annotation wip: feat(ansible): Configure verbosity via annotation Oct 24, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2019
@fabianvf
Copy link
Member

/retest

1 similar comment
@fabianvf
Copy link
Member

fabianvf commented Nov 6, 2019

/retest

@camilamacedo86 camilamacedo86 added language/ansible Issue is related to an Ansible operator project kind/feature Categorizes issue or PR as related to a new feature. labels Nov 7, 2019
This makes it possible to create a CR with an annotation, specifically
`"ansible.operator-sdk/verbosity"`, to override the verbosity of
`ansible-runner` commands for a given CR.

- Store the verbosity on `runner`
- Update `cmdFuncType` to take verbosity and `*exec.Cmd` to convert
  integer value of verbosity to string
- In `Run()` get verbosity annotation from CR (if it exists) and use
  that value when executing the `cmdFunc`
@djzager djzager force-pushed the ansible-verbosity-annotation branch from 01fc01f to 048a53d Compare November 8, 2019 14:39
@djzager djzager changed the title wip: feat(ansible): Configure verbosity via annotation feat(ansible): Configure verbosity via annotation Nov 8, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2019
@djzager
Copy link
Contributor Author

djzager commented Nov 12, 2019

/retest

@openshift-ci-robot
Copy link

@djzager: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jmccormick2001
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 12, 2019
@djzager
Copy link
Contributor Author

djzager commented Nov 12, 2019

/retest

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

It shows /lgtm /approved for me.
@fabianvf @jmrodri wdyt?

@camilamacedo86 camilamacedo86 added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels Nov 19, 2019
Copy link
Member

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

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

/lgtm

@fabianvf fabianvf merged commit 64cbb44 into operator-framework:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. language/ansible Issue is related to an Ansible operator project lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure Ansible Verbosity via Annotation
5 participants