Skip to content

Commit

Permalink
Do not assume instance provisioning is performed exactly once
Browse files Browse the repository at this point in the history
In ditributed systems it is hard to guarantee that a resource state is
reconciled exactly once. Managed service instances controllers try to
achieve that by setting the `ProvisionRequested` status condition but
occasionally they might get reconcile a state where this status
condition is not set twice.

We have seen such situations in the following flakes:

https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/19906
https://ci.korifi.cf-app.com/teams/main/pipelines/main/jobs/run-tests-periodic/builds/19908

According to the OSBAPI spec, brokers should
handle identical provision requests in idempotentical manner, therefore
such deplicate requests should not be an issue.
  • Loading branch information
danail-branekov authored and georgethebeatle committed Oct 30, 2024
1 parent 7395a68 commit d0483c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ var _ = Describe("CFServiceInstance", func() {

It("provisions the service", func() {
Eventually(func(g Gomega) {
g.Expect(brokerClient.ProvisionCallCount()).To(Equal(1))
g.Expect(brokerClient.ProvisionCallCount()).NotTo(BeZero())
_, payload := brokerClient.ProvisionArgsForCall(0)
g.Expect(payload).To(Equal(osbapi.InstanceProvisionPayload{
InstanceID: instance.Name,
Expand Down Expand Up @@ -222,7 +222,7 @@ var _ = Describe("CFServiceInstance", func() {

It("requests provisioning without parameters", func() {
Eventually(func(g Gomega) {
g.Expect(brokerClient.ProvisionCallCount()).To(Equal(1))
g.Expect(brokerClient.ProvisionCallCount()).NotTo(BeZero())
_, payload := brokerClient.ProvisionArgsForCall(0)
g.Expect(payload.Parameters).To(BeEmpty())
}).Should(Succeed())
Expand Down

0 comments on commit d0483c8

Please sign in to comment.