janhoy opened a new pull request, #895:
URL: https://github.com/apache/solr-operator/pull/895

   🤖 AI assisted 🤖
   
   The `E2E - SolrCloud - Storage / Persistent Data - Expansion / Fully 
Expands` spec is flaky. It failed on the e2e run of #891, which changes nothing 
in the PVC expansion or cluster operation path, and passed on another PR's run 
of the same 11 specs three minutes later.
   
   The check for the RollingUpdate lock was given `1` as its `time.Duration` 
timeout, i.e. 1 nanosecond, so `Eventually` polls once and gives up (`Timed out 
after 0.003s`). It cannot succeed reliably, because the lock it waits for is 
guaranteed not to be there yet when the preceding step finishes: 
`handlePvcExpansion` annotates the pod template (which is what drops 
`status.upToDateNodes` to zero, the precondition the test waits on) and then 
returns `operationComplete` with no next operation, so the same reconcile 
clears the clusterOp lock. The RollingUpdate lock is only acquired by 
`determineRollingUpdateClusterOpLockIfNecessary` on a later reconcile. The 
operator log of the failed run shows exactly that, in one reconcile:
   
   ```
   00:42:44  All PersistentVolumeClaims have been expanded, now issuing a 
rolling restart
   00:42:44  Removed unneeded clusterOpLock annotation from statefulSet
   00:42:44  Updating SolrCloud Status
   ```
   
   The spec has been passing only because the 100ms poll interval of the step 
before it usually delays the check long enough for the next reconcile to land 
first.
   
   This waits up to 10 seconds for the lock, polling every 50ms, like the 
PvcExpansion check earlier in the same spec. A managed rolling restart of the 
two pods takes much longer than that, so there is no risk of the wait 
overshooting into the lock being released again.
   
   ### Testing
   
   `go vet ./tests/...` passes. The e2e suite was not run locally; the `[pr]` 
e2e profile in CI covers this spec.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to