-
Notifications
You must be signed in to change notification settings - Fork 14
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
Missing core ansible feature json-filter in image #53
Comments
@jorgemoralespou @jmontleon looking around at the apb-base-scripts RPM spec on master and release-1.2, it looks like I neglected to add
|
Yes, as long as it's available adding it to the rpm Requires seems like the way to fix it. The release-x.y branches generally only receive bug fixes so they should be pretty stable. |
@djzager but that release-1.2 is a branch means that if I build something today, and you push something to the branch tomorrow, I will never be able to reproduce it unless I know the exact commit. I would expect that every time an image is pushed to a registry (dockerhub) for wide consumption the code is properly tagged, for reproducibility and in case of needed to revert back, as well as the tags preserved on the registry, at least N-1, so a rolling tag can reference a new image, but it the image is not fine, someone can still use a non-rolling tag in the interim. |
@djzager @jmontleon Can I expect a fixed image upstream soon(ish)? Or should I just move my apbs to pin to version |
I don't wholly understand this expectation. Every time that a pull request is merged into the master branch, you'll see a corresponding It looks like the
|
No. I don't believe you will see a fixed image upstream, at least not one fixed to particular commits of this project. I think the best workaround for you would be to |
It is very discouraging that we recommend in our documentation to create APBs using Not only it has changed how extra-env are provided (#46) which makes every APB that is tested outside Ansible Service Broker to fail, but also it has dropped some ansible (jinja) core functionalities that should be available, and were there at some point (directly or indirectly). To me this means that we should consider this image and how we (Red Hat) promotes using them can inject breaking changes at any point. We will implement a solution of adding an additional intermediate image, to prevent from your potential breaking behavior, and adding all these dependencies that are missing. Sadly, we'll need to promote this "workaround" for users to have them on the safe side of things. Thanks |
First, I apologize that my changes (I was the one who originally added jmespath to apb-base canary images, failed to make the appropriate changes to the RPM spec, and also forced the use of
I think I better understand your point here although I don't believe I am all the way there. My belief is that the I would like to make the appropriate changes on our |
@jorgemoralespou if you want to pin it to a more stable version you can do so. There is nothing stopping you from using apb-base:release-1.3, release-1.2, or release-1.1 (alternatively v3.11, v3.10, v3.9 tags, same content). These only receive updates for bugs so they should generally be much more stable. Maybe that should be called out better in the documentation, but regardless the option is there. As for why python2-jmespath fell off the image, it looks like older versions of ansible required the package:
In newer versions this is not the case and we did not miss the functionality so we didn't catch the change. If there is a compelling reason to add it for newer released versions we can add it in the Dockerfile for apb-base or as a Requires on one of our packages if it makes sense, but there's also no reason you cannot do something like this in your Dockerfile.
or
Bare in mind also that ansible can make use of several modules that require python libraries (shade, boto, jmespath, yum, dnf, most likely others...) not explicitly called out in Requires on the RPM. We can try to install them all, but at some point it becomes necessary to weigh the size of the images, which we also get complaints about when they get too large, versus the convenience of having many libraries available on the base image. Maybe jmespath for filters is core enough that we want to add it, I don't really have hard feelings about it either way, but it is not remotely a unique case. |
I guess this should be better documented, as this complicates authoring of APBs if what you would expect to be there, which is anything required in core modules, is not there. When one refers to ansible documentation for the specific filter: https://docs.ansible.com/ansible/2.5/user_guide/playbooks_filters.html#json-query-filter At the top of the page it's stated:
So yes, I think this is an expectation any APB author would have when using the APB base images. Also, I think the documentation should make clear what versions should be used, for which versions of ansible service brokers, and openshift, and any breaking change or release notes should be easier to find or more clear. |
Apologies, it is not clear to me what you mean when you say "this". Could you expand please? |
How versioning works and the explanation you've given me. I know it's different repository, but you're also maintainers of that one. This is what I mean with "this". Authoring guidance to prevent these problems I had. |
Awesome. Thank you. I'll work on creating some PRs to address those. |
@jorgemoralespou after #54 is merged. We will be rebuilding the I'll work on a doc update for APB authoring in the coming days. Thanks. |
@djzager Thanks |
I have an APB that I've had to pin to release-1.2 because of how the parameters where being provided when run manually.https://github.com/openshift-labs/starter-guides/blob/ocp-3.11/apb/Dockerfile#L1
Now, when I run this APB, using the provisioning playbook as documented (https://github.com/openshift-labs/starter-guides/tree/ocp-3.11/apb#provision-1), which has been running fine for months.
Now, I get the following error:
Which maps to this imported role line: https://github.com/siamaksade/ansible-openshift-eclipse-che/blob/master/tasks/multi_user.yml#L100
This means, that the image is missing
python-jmespath
. Found this issue (https://bugzilla.redhat.com/show_bug.cgi?id=1484910) but that one should be fixed upstream in the version that is used in this image.An additional question:
Is there a way to properly identify the images built on Dockerhub to tags on this repository? If I develop using release-1.2 tag of
ansibleplaybookbundle/apb-base
is there any guarantee the image will be stable through time? Is there non-rolling tags?The text was updated successfully, but these errors were encountered: