Skip to content

[Data Connect] @searchable directive causes DEADLINE_EXCEEDED on deploy #9953

@FetzerJack

Description

@FetzerJack

[REQUIRED] Environment info

firebase-tools: 15.6.0

Platform: macOS

[REQUIRED] Test case

Adding @searchable to any String field causes the server-side schema update operation to fail with DEADLINE_EXCEEDED (gRPC code 4) after exactly 5 minutes. The same schema deploys successfully in seconds without @searchable. Reproduces on both large and minimal (~15 types) schemas.

[REQUIRED] Steps to reproduce

Have a working Data Connect schema that deploys successfully.
Add @searchable to a String field:

Customer @table { 
  id: UUID! @default(expr:"uuidV4()")  
  name: String! @searchable @col(dataType:"varchar(255)")  
  firstName: String @searchable @col(name: "first_name", dataType:"varchar(100)")  
  lastName: String @searchable @col(name: "last_name", dataType:"varchar(100)")  
  phone: String @searchable @col(dataType:"varchar(20)")  
  email: String @searchable @col(dataType:"varchar(255)")  
}

Deploy:

firebase deploy --only dataconnect

CLI times out after 60s. The server-side operation continues for exactly 5 minutes then fails:

{
    "done": true,
    "error": {
        "code": 4,
        "message": "Deadline exceeded"
    }

[REQUIRED] Expected behavior

Schema should deploy successfully. The underlying SQL that @searchable generates (ALTER TABLE ... ADD COLUMN tsvector + CREATE INDEX ... USING GIN) completes in under 100ms when run manually.

[REQUIRED] Actual behavior

The server-side operation runs for exactly 5 minutes and fails with DEADLINE_EXCEEDED. This is reproducible on every attempt.
When @searchable is present, firebase dataconnect:sql:diff also shows the backend wanting to recreate foreign key constraints that already exist in the database while constraints it has no issue seeing when @searchable is absent. Cloud SQL does show that the columns were created successfully and populated with the vectors.

What was tried

  • Upgrading Cloud SQL instance from db-f1-micro to db-g1-small — same result
  • Manually creating the tsvector column and GIN index before deploying — same result
  • Cleaning up leftover tsvector artifacts from failed deploys — same result
  • Switching schemaValidation from STRICT to COMPATIBLE — same result
  • Reducing schema to ~15 types — same result
  • Running firebase dataconnect:sql:setup to reset permissions — same result

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions