Infinite loop on certain misconfiguration

Open
#50 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start by locating the operator reconciliation entry points that handle GitHub client misconfiguration and set the affected object's status condition. Check whether those paths also return the same error, then inspect similar condition-setting paths for the same pattern. Done means the condition remains available for debugging without triggering an endless immediate reconciliation loop.

Written by the indexing model from the issue text.

Description

Container needs refinement

/kind bug

What steps did you take and what happened:
If the Github client is misconfigured, e.g. by a secret that is not working, the operator correctly sets a condition that can be used for the user to debug. However, it also returns an error, which means that the operator reconciles immediately again. As nothing has changed, it will run into the same issue again.

What did you expect to happen:
There is no need to return the error, as the user checks the conditions stored in the status of the object rather than potential error logs. Even if a log should be produced, it should happen only once the first time the error occurs. Instead of returning the error, we can return nil and don't run into an endless loop.

Anything else you would like to add:
This pattern might exist somewhere else as well and should be always addressed in the same way: setting the condition appropriately and returning nil.

Dominant language
Go
Stars
18
Forks
5
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SovereignCloudStack/cluster-stack-operator

All issues in SovereignCloudStack/cluster-stack-operator

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.