-
Notifications
You must be signed in to change notification settings - Fork 202
ApplyService#applyProjectRequest should be (truly) idempotent #1715
Comments
I could not reproduce this. I added this fragment in my src/main/fabric8 directory:
|
@rohanKanojia : I forgot to add a minor detail; you must let f-m-p create the project/namespace (i.e. playing around with the fabric8.namespace property/parameter). It is actually a race condition between f-m-p and Openshift processing the ProjectRequest. And since ApplyService#applyProjectRequest isn't idempotent this may fail. I add the fragment in my src/main/fabric8 directory (viewers-rolebinding):
This results in the following error when running 'mvn clean fabric8:resource-apply' (masking some corporate details):
|
@rohanKanojia : I created a repository to show you my exact setup. Hope this helps. Please let me know if I am doing anything the wrong way. ;-) |
No, seems like there is a bug in our code. |
Description
It seems like the method ApplyService#applyProjectRequest isn't truly idempotent - and I think the method name applies that it should be. It is close, but no cigar. If the method is invoked when a POST ProjectRequest is already in process by Openshift, but before the Project/Namespace actually exists, it will fail - because Openshift returns HTTP 409 when trying to POST ProjectRequest.
Somehow this bug is only noticeable when you are creating RoleBinding and BuildConfig resources. Why this happens becomes apparent if you look at the callers to the method:
Info
mvn -v
) : 3.5.3 and also 3.6.1 (but I think it is irrelevant)How to reproduce
The text was updated successfully, but these errors were encountered: