Repository navigation
MCP-603 Clarify missing Server CAG entitlement endpoints - #725
Conversation
Co-Authored-By: Fabrik <fabrik@sonar.ai>
Krosovok
left a comment
There was a problem hiding this comment.
I think there is already a util to handle log capturing: OAuthTestSupport.LogCaptur. It is just hidden in the OAuthTestSupport even though it is not auth-specifc. I'd better to move it out to somewhere where it can be used by all tests and reuse it in the new test.
|
The requested shared LogCapture extraction is prepared locally. Authentication tests and the CAG test now reuse the helper; the affected test suites and Spotless passed. Vortex found no changed-line issues. Publication is pending a commit-history decision. The existing Fabrik implementation commit is followed by the human wording commit, which I must preserve. I have asked the requester whether to publish the extraction as a separate commit instead of rewriting that history. Generated by Fabrik |
Code Review ✅ Approved 🟢 Low riskThe Server 404 change only replaces debug-log wording with version and edition guidance; entitlement handling remains unchanged, limiting runtime impact. Adds a static debug diagnostic for Server CAG entitlement 404 responses, explaining the endpoint was not found and asking users to verify Server version and edition support for Vortex, while keeping Cloud warnings unchanged and adding regression tests for the Server and Cloud 404 paths. No issues found. Verification Rules 2/2 metFunctional validation No results Rules 2 passed 2 not applicable
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Thanks for the suggestion, I implemented it 👍🏻 |
|
The published helper extraction at dbcb0ae satisfies the review request and supersedes my earlier pending-publication note. I preserved the human commits and validated the authentication, logging, CAG, entitlement and Server Vortex suites plus Spotless locally; all passed. Vortex found no changed-line issues. CI for this head is still running. Generated by Fabrik |
|



MCP-603 https://sonarsource.atlassian.net/browse/MCP-603
When the CAG entitlement endpoint returns 404 on SonarQube Server, the debug diagnostic now explains that the endpoint was not found and asks users to check whether their Server version and edition support Vortex. This distinguishes an absent endpoint from a valid response that denies entitlement.
Server routing and entitlement gating already landed in PR #543. The nil-UUID route, Cloud warnings, combined CAG/A3S entitlement checks, and entitlement discovery during over-consumption remain unchanged.
The CAG regression test reuses
LogCapture, extracted fromOAuthTestSupportinto the shared testlogpackage. Existing OAuth callers use the same helper, preserving strict single-event assertions, thread filtering, and automatic restoration of logging settings. An immutable event-list snapshot supports filtered CAG assertions.Validation
./gradlew spotlessCheckpassed.OAuthHttpTransportTest.java:572,java:S5961: “Refactor this method to reduce the number of assertions from 27 to less than 25.”CagApi.java:27,java:S1075: “Refactor your code to get this URI from a customizable parameter.”Docker integration tests and a real licensed Server were not exercised for this change. WireMock tests do not establish remote endpoint availability.
🤖 Co-authored by Fabrik