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

Default ansible operator Travisfile doesn't work - jmespath error #2023

Closed
geerlingguy opened this issue Oct 8, 2019 · 6 comments · Fixed by #2027
Closed

Default ansible operator Travisfile doesn't work - jmespath error #2023

geerlingguy opened this issue Oct 8, 2019 · 6 comments · Fixed by #2027
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project

Comments

@geerlingguy
Copy link
Contributor

geerlingguy commented Oct 8, 2019

Bug Report

What did you do?

  1. I created a new operator (using the operator-sdk cli command in the documentation).
  2. I pushed the generated code to a new GitHub repository.
  3. I waited for the Travis CI build to finish.

What did you expect to see?

I expected the default test would pass.

What did you see instead? Under which circumstances?

I received the error:

TASK [Wait 60s for reconciliation to run] **************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check ''Successful' in (cr | json_query('resources[].status.conditions[].reason'))' failed. The error was: You need to install \"jmespath\" prior to running json_query filter"}

Environment

  • operator-sdk version:
$ operator-sdk version
operator-sdk version: v0.10.0, commit: ff80b17737a6a0aade663e4827e8af3ab5a21170
  • go version:

N/A

  • Kubernetes version information:

N/A

  • Kubernetes cluster kind:

N/A

Possible Solution

The default .travis.yml file included with the Ansible operator scaffold should include jmespath in its dependency installation, e.g.:

install:
  - pip install docker molecule openshift jmespath

Currently it does not include jmespath.

Additional context

N/A

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Oct 8, 2019

/assign @camilamacedo86

Hi @geerlingguy,

Thank you for raise it. We will be looking at that. Did you try your solution? Did it work?
Anyway, I will be checking it as soon as possible.

@camilamacedo86 camilamacedo86 added language/ansible Issue is related to an Ansible operator project kind/bug Categorizes issue or PR as related to a bug. labels Oct 8, 2019
@geerlingguy
Copy link
Contributor Author

@camilamacedo86 - Just pushed up a PR to fix: #2027

I can confirm that adding that dependency fixes the issue, as seen in the difference between the #2 and #3 builds in Travis CI here: https://travis-ci.com/geerlingguy/mariadb-operator/builds

@camilamacedo86
Copy link
Contributor

it is great @geerlingguy !! Really tks for your contribution.

@camilamacedo86
Copy link
Contributor

Also, wyt about doing a PR to fix the sample here as well?

@geerlingguy
Copy link
Contributor Author

@camilamacedo86 - sure, will do!

@geerlingguy
Copy link
Contributor Author

fabianvf pushed a commit to fabianvf/operator-sdk that referenced this issue Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants