Skip to content

Fix Cloud Serverless database operations using wrong HTTP client plane - #57

Merged
jstirnaman merged 3 commits into
mainfrom
copilot/list-databases-test-fix
Jun 5, 2026
Merged

Fix Cloud Serverless database operations using wrong HTTP client plane#57
jstirnaman merged 3 commits into
mainfrom
copilot/list-databases-test-fix

Conversation

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Cloud Serverless list_databases failed with connection refused while health checks and queries succeeded. Root cause: /api/v2/buckets endpoints were routed to management plane instead of data plane.

Changes

Database Management Service (database-management.service.ts)

  • listDatabasesCloudServerless, createDatabaseCloudServerless, updateDatabaseCloudServerless, deleteDatabaseCloudServerless: Changed getInfluxHttpClient(true)getInfluxHttpClient(false)

Schema Management Service (serverless-schema-management.service.ts)

  • listSchemas, getSchema, createSchema, updateSchema: Changed getInfluxHttpClient(true)getInfluxHttpClient(false)
  private async listDatabasesCloudServerless(): Promise<DatabaseInfo[]> {
    try {
-     const httpClient = this.baseService.getInfluxHttpClient(true);
+     const httpClient = this.baseService.getInfluxHttpClient(false);
      
      const response = await httpClient.get<{ buckets?: any[] }>(
        "/api/v2/buckets",
      );

Context

For Cloud Serverless:

  • Data plane: region-specific URL for /query, /write, /api/v2/*
  • Management plane: same URL (unlike Cloud Dedicated which uses console.influxdata.com)

The parameter distinction matters for consistent behavior and token usage even when URLs are identical.

Copilot AI changed the title Fix InfluxDB Cloud Serverless list_databases connection error Fix Cloud Serverless database operations using wrong HTTP client plane Jun 4, 2026
Copilot AI requested a review from jstirnaman June 4, 2026 14:50
@jstirnaman
jstirnaman marked this pull request as ready for review June 4, 2026 22:24
@jstirnaman
jstirnaman changed the base branch from dependabot/npm_and_yarn/axios-1.16.0 to main June 5, 2026 15:12
@jstirnaman
jstirnaman temporarily deployed to cloud-serverless June 5, 2026 17:36 — with GitHub Actions Inactive
@jstirnaman
jstirnaman merged commit 265280a into main Jun 5, 2026
4 checks passed
@jstirnaman
jstirnaman deleted the copilot/list-databases-test-fix branch June 5, 2026 17:38
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