- SonarQube version 126.96.36.199929
- Trying to set Quality Gate conditions that went missing
- I have tried restarting and reinstalling binary
I was doing some routine metrics when I noticed the Quality Gate conditions went missing for all my Quality Gates. When I go to add a new condition there are none available in the dropdown. Is there a problem with the database? Is there a way to recover from this kind of failure?
Just did a DB upgrade and vacuum and still missing all Metrics/Conditions. Very strange.
To be clear, you see nothing in this view for one of your Quality Gates? Can you post a screenshot?
And then this is the dropdown which is empty?
Some basic troubleshooting questions, which aren’t necessarily your problem:
- You mention a DB upgrade. What DB were you running and what exactly did you upgrade?
- How is your SonarQube deployed? Is it a Docker container, installed on a server, etc.?
- Does the UI show that you’re logged in? Had you recently changed any relevant security settings, etc?
That’s right. I tried to post a screen shot, but it wasn’t working earlier…pebcak
Actually I misspoke. Here’s what I did.
Deployed on a server
- Reboot SonarQube.
- Reboot server.
- Reinstall same version (8.2)
- Posted on forum about the problem
- Noticed version 8.3 was available so I upgraded
- Ran https://host.com/setup DB upgrade
Still seeing same issue.
Just noticed via the qualitygates/project_status?projectKey= API that Quality Gate conditions exist for projects. The UI does not reflect these, however.
What database are you running?
I don’t have any ideas on the specific problem, but if the API is returning results then maybe something is going wrong between the UI and API. You might try opening your browser’s developer tools, then refreshing the page that should display the criteria for your quality gate. Post back with any errors you see, or even a screenshot of the whole thing.
OK your comment did the trick. I will edit the original post so anyone else running into it won’t waste as much time as I did…
It was a content blocker. I still am trying to figure out why that specific URL was blocked (Fetch API cannot load https://[HOST]api/metrics/search?ps=500 due to access control checks.), but the issue was purely related to the content blocker.
Next round is on me!