Skip to content

UN-4224 [FIX] Fix GCS connector test connection on gcsfs 2026.x - #2320

Merged
muhammad-ali-e merged 2 commits into
mainfrom
UN-4224-gcs-test-connection
Oct 7, 2026
Merged

muhammad-ali-e merged 2 commits into
mainfrom
UN-4224-gcs-test-connection

Conversation

@praveen-formido

@praveen-formido praveen-formido commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Fix Test Connection for the Google Cloud Storage connector. On rc.425 it fails for every GCS connector with HttpError: Required parameter: project, 400.

Why

  • UN-4224 [FIX] Stop sending temperature to GPT-6 models on Bedrock, OpenAI and Azure OpenAI #2310 (UN-4224) upgraded gcsfs from 2024.10 to 2026.10. GoogleCloudStorageFS.test_credentials() calls info("/"), and gcsfs changed the request it sends for that:

    gcsfs request for info("/")
    2024.10 GET b?project=<project> (list buckets) ✅
    2026.10 GET b/, no project, even when one is configured ❌ GCS returns 400 Required parameter: project
  • This is the one regression from UN-4224 [FIX] Stop sending temperature to GPT-6 models on Bedrock, OpenAI and Azure OpenAI #2310 in the rc.425 regression suite:

    • etl-pipelines :: gcs task pipeline fails because the connector form's Submit stays disabled after Test Connection fails.
    • It passed on rc.424 and fails in every rc.425 run, including the Oct 7 rerun.
    • Staging backend logs: POST /test_connectors/ for google_cloud_storage → gcsfs.retry.HttpError: Required parameter: project, 400.
    • The other rc.425 failures cleared on rerun (staging Redis/Socket.IO) or were already failing on rc.424 (agentic).

How

  • test_credentials() now calls ls(""). On gcsfs 2026.10 that sends exactly the old GET b?project=<project> request, so it needs the same permission and behaves the same.
  • I checked both repos: this is the only root-level info call on gcsfs.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No. The connector sends the same bucket-listing request it sent before the gcsfs upgrade, so connectors that passed Test Connection on rc.424 pass again. Only test_credentials() changes; reads and writes are untouched.

Database Migrations

  • None

Env Config

  • None

Relevant Docs

  • None

Related Issues or PRs

Dependencies Versions

  • None

Notes on Testing

  • Against real GCS (project unstract-staging, gcsfs 2026.10.0, authenticated with a gcloud user token):
    • The connector's test_credentials() returns True with this fix.
    • With the rc.425 code, the same call raises ConnectorError … Required parameter: project, 400, matching staging.
  • Regression test (tests/filesystems/test_google_cloud_storage_fs.py): records gcsfs's request and asserts a GET b that carries the configured project, and never the project-less GET b/. Reverting to info("/") makes it fail.
  • Connectors suite: 76 passed (8 live-integration skips). ruff 0.3.4 is clean.
  • Not tested: the full UI Test Connection with a service-account JSON, since I have no GCS service-account key locally. The staging UI suite's gcs task pipeline covers it.

Screenshots

  • N/A

Checklist

I have read and understood the Contribution Guidelines.

🤖 Generated with Claude Code

Since #2310 moved gcsfs from 2024.10 to 2026.10, test connection fails
for every Google Cloud Storage connector with
`HttpError: Required parameter: project, 400`. This is the rc.425
regression behind the staging "GCS ETL Pipeline" UI test (Submit stays
disabled because test connection fails).

`test_credentials()` called `info("/")`. gcsfs 2024.10 turned that into
`GET b?project=<project>` (list buckets); gcsfs 2026.10 sends `GET b/`
with no project, even when one is configured, and GCS rejects it. Use
`ls("")`, which on 2026.10 sends exactly the old `GET b?project=...`
request -- same permission, same behaviour. It is the only root-level
`info` call on gcsfs in either repo.

Verified against real GCS (project unstract-staging) with gcsfs 2026.10:
the connector's test_credentials() now returns True; the rc.425 code
fails with the same 400 seen in staging. A regression test records the
gcsfs request and asserts a bucket listing that carries the project; it
fails if `info("/")` comes back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

via Greptile

RetriggerConfidence Score: 5/5

[Medium risk] Changes how the GCS connector tests credentials.

The PR appears safe to merge, with a non-blocking gap in the new class-choice test.

Fix All in Claude CodeFindings

  1. P2 Test skips production's client choice ▶
Fix with agent prompt
### Issue 1
unstract/connectors/tests/filesystems/test_google_cloud_storage_fs.py:67-69
`test_uses_the_core_gcsfs_class` checks the client that `_connector()` explicitly creates from `gcsfs.core.GCSFileSystem`. It therefore passes even if production's `get_fsspec_fs()` selects a different class, leaving that change unnoticed.

Create a connector without assigning `_gcs_fs`, stub authentication, and assert the class returned by `get_fsspec_fs()`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary

Changes GCS connection tests from info("/") to ls("") so the request carries the configured project.

  • Adds a test for the bucket-listing request.
  • Fixes the earlier test import-order mismatch by importing the core class directly.
  • The new class-choice test does not check production's client creation.

Reviews (2) · Last reviewed commit: "UN-4224 [FIX] Make the GCS connector tes..." · Reviewed by Greptile

Comment thread unstract/connectors/tests/filesystems/test_google_cloud_storage_fs.py Outdated
Review (Greptile): the test imported `gcsfs.GCSFileSystem`, which resolves
to the experimental ExtendedGcsFileSystem when gcsfs is imported before
storage_compat sets GCSFS_EXPERIMENTAL_ZB_HNS_SUPPORT=false -- e.g. when
this file runs alone -- so it could exercise a different client from
production. Import `gcsfs.core.GCSFileSystem`, the class production runs,
and pin it with a test. Passes on its own with the env var unset and even
with the experimental class forced on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
✅ e2e-api-deployment e2e 3 0 0 0 11.0
✅ e2e-coowners e2e 1 0 0 0 1.5
✅ e2e-etl e2e 1 0 0 0 8.6
✅ e2e-login e2e 2 0 0 0 1.5
✅ e2e-prompt-studio e2e 1 0 0 0 10.7
✅ e2e-smoke e2e 2 0 0 0 1.2
✅ e2e-workflow e2e 1 0 0 0 14.5
✅ frontend unit 620 0 0 0 14.0
✅ integration-backend integration 603 0 0 26 60.8
✅ integration-connectors integration 1 0 0 7 9.9
✅ integration-workers integration 164 0 0 1 40.5
❌ ui e2e 0 1 0 0 0.0
✅ unit-backend unit 1422 0 0 1 37.6
✅ unit-connectors unit 77 0 0 0 10.6
✅ unit-core unit 281 0 0 0 3.0
✅ unit-platform-service unit 15 0 0 0 3.0
✅ unit-rig unit 120 0 0 0 3.7
✅ unit-runner unit 10 0 0 0 3.2
✅ unit-sdk1 unit 760 0 0 0 30.9
✅ unit-workers unit 1413 0 0 1 125.1
TOTAL 5497 1 0 36 391.3

Critical paths

⚠️ Critical paths not yet covered

  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (declared coverage: no groups declared)
✅ Covered critical paths
  • auth-login — covered by e2e-login
  • adapter-register-llm — covered by integration-backend
  • workflow-author — covered by integration-backend
  • co-owner-manage — covered by integration-backend, e2e-coowners
  • workflow-create-execute — covered by e2e-workflow
  • api-deployment-provision — covered by integration-backend
  • api-deployment-auth — covered by integration-backend
  • api-deployment-run — covered by e2e-api-deployment
  • mcp-server-auth — covered by integration-backend
  • mcp-platform-auth — covered by integration-backend
  • platform-key-whoami — covered by integration-backend
  • prompt-studio-author — covered by integration-backend
  • prompt-studio-fetch-response — covered by e2e-prompt-studio
  • connector-register-test — covered by integration-backend
  • pipeline-etl-execute — covered by e2e-etl
  • usage-aggregate-read — covered by integration-backend
  • usage-token-tracking — covered by e2e-api-deployment
  • callback-result-delivery — covered by e2e-api-deployment

@muhammad-ali-e
muhammad-ali-e merged commit 02b9797 into main Oct 7, 2026
14 checks passed
@muhammad-ali-e
muhammad-ali-e deleted the UN-4224-gcs-test-connection branch October 7, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants