fix: review follow-ups for the connector checks stack

Merged
EV
4d ago
+483-51

Description

This PR fixes review comments on the connector checks stack. Each fix is in its own commit. Each fix has a test that fails without it. It sits on top of #16200 so that the PRs below it do not have to run CI again.

Error details (#16160)

  • Remove the ;params of every URL path segment, not only the last one. A server can put a session token there.
  • Never keep part of a secret where the response body is cut before redaction. The cut moves to the start of a secret that it would split.
  • When a SourceApiError has no status, URL or body, read the HTTP error that it wraps.
  • Simplify the error-detail test helper. It does not need to raise the error first.

Check dependencies at creation (#16157)

  • A check whose dependency did not finish in the blocking budget is now unfinished too. Its early result does not block the pairing. The background run runs it after its dependency. A stored report shows it as not run.

Row text (#16167)

  • A test fails when a check row description can have more than three lines.

Confluence (#16169)

  • Before Data Center 9.1, read anonymous access from the JSON-RPC permissions, as permission sync does.
  • Read user emails counts each Cloud account once, also when it has several grants.
  • Read group members names the number of users it read.

Jira (#16193)

  • The query check fails when the search finds an issue id but the fetch returns no issue.

Google Drive (#16194)

  • The shared drives row says "No shared drives visible" when the listing is empty, also when Shared Drive URLs is set.
  • A denied read of the primary admin's directory entry shows the directory-read text, not the user-listing text.
  • Shared Drive URLs or Folder URLs that give no ID fail. They do not pass as "All 0 selected ... found".

How Has This Been Tested?

  • Unit tests for capability_checks, confluence, jira, google_drive and server: 3446 passed.
  • External-dependency test for an unfinished dependency in proposed pairing validation, plus the creation and dry-run test files: 31 passed.
  • ty on the changed files; pre-commit on every commit.

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.
  • [Optional] Override Linear Check

🤖 Generated with Claude Code


Summary by cubic

Fixes review comments on the connector checks stack: check dependencies, error details, row text limits, and the Confluence, Jira, and Google Drive capability checks. Each fix has a test that fails without it.

Bug Fixes

  • A check whose dependency did not finish in the blocking budget is now unfinished too, so its early result no longer blocks the pairing and the report shows it as not run.
  • Error details strip ;params from every URL path segment, move the redaction cut to the start of a secret the bound would split, and read the HTTP error a bare SourceApiError wraps.
  • Confluence before Data Center 9.1 reads anonymous access from the JSON-RPC permissions, counts each Cloud user once across grants, and names the number of users it read.
  • The Jira query check fails when the search finds an issue id that the fetch does not return.
  • Google Drive shows "No shared drives visible" for an empty listing even with Shared Drive URLs set, a denied admin directory read shows the directory-read text, and Shared Drive URLs or Folder URLs that give no ID fail.

Tests

  • A new test reads the check modules and fails when a row description can have more than three lines.
  • Coverage for Confluence now also runs a 9.1+ site whose REST permissions answer, so the anonymous-access check exercises its REST endpoint call.

Summary by CodeRabbit

  • Bug Fixes
    • Capability checks now wait for unfinished dependencies before making pairing decisions.
    • Improved URL sanitization, secret redaction, and error details for safer, clearer diagnostics.
    • Jira checks now correctly handle empty search results.
    • Confluence permission checks improve duplicate-user handling and Data Center compatibility.
    • Google Drive checks provide clearer results for invalid URLs, visibility, and administrator access issues.
  • Tests
    • Expanded coverage for dependency handling, security protections, and connector-specific edge cases.