Operator-sdk: Default ansible operator Travisfile doesn't work - jmespath error

Created on 8 Oct 2019  路  6Comments  路  Source: operator-framework/operator-sdk

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

kinbug languagansible

All 6 comments

/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 - Just pushed up a PR to fix: https://github.com/operator-framework/operator-sdk/pull/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

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

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

@camilamacedo86 - sure, will do!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kristiandrucker picture kristiandrucker  路  5Comments

hasbro17 picture hasbro17  路  3Comments

nrvnrvn picture nrvnrvn  路  5Comments

danielsig727 picture danielsig727  路  4Comments

smiklosovic picture smiklosovic  路  4Comments