Closed ifireball closed 5 years ago
do you have proof of that? This is a feature feel free to create a PR if you desire that functionality. We welcome contributions.
do you have proof of that?
Yep, reproduced it quite a few times, its rather easy to reproduce:
This is a feature
AFAIK when using Ansbile one expects things to mostly be idempotent. So some may regard this a s a bug.
Point taken not at the top of our list feel free to file a PR if we don't get to it first.
In thinking about this further I have a difference of opinion. This is calling ansible playbooks but there is no context of projects and configs inside OpenShift. So in this case we shouldn't be idempotent. This is why we have the run_cleanup option.
The way this was designed was to setup a project what you are proposing changes the intent of the contra-env-setup so I would consider this a design change of what our target was.
Well, I suppose if everything works for you on the 1st try then you don't need idempotence...
Is there no aspect of this that is needed when maintaining system over time?
I don't believe this is accurate if during a run the build or image fails it retried a certain number of times and then is marked as a failure for the run. If this is not the case then there in fact is a bug, but I believe with the cleanup option that it would rerun. We are also ignorant to know if the project tenant we are running on is large enough to support a given project template deployment.
The idea of the implementation was to deploy s2i templates to an OpenShift endpoint and minishift if needed. The s2i templates cover dockerfiles, jenkins pipelines, and native s2i support. I am fine with expanding the scope if it is needed.
Please right up your requirements in detail of what you want the contra-env-setup to cover in a separate issue. Also do you have cycles to assist or are you expecting us to implement it all?
I did a lot of testing with my recent change. If a template was not built and I reran it then it got created. If there is a failed build all failed builds get cleaned up so I believe this to be idempotent from run to run.
I will leave this open for a couple of weeks if you can provide an example that does not perform this way. Then I will close this issue.
The issue it what happens if you got multiple resources in the same template - such as when you have both a build and a deployment config. In that case if the build is in place and the deployment config is not - it will not get created.
Anyway, I see you've made some updates, I'll try to find the time to retry my tests with them.
With the current code resources are created from templates only if:
As a result, the following example situations can occur: