Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

bigquery-firestore-export: clearing PARTITIONING_FIELD is blocked but the DTS API allows it

Aperta
#2,985 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia in functions/src/dts.ts, alla guardia di PARTITIONING_FIELD e al relativo commento, quindi confronta l’implementazione dell’estensione upstream corrispondente ereditata nel commit a34ba233. Riproduci il PATCH su un progetto reale nella posizione us e verifica che la cancellazione del campo riesca e modifichi un’esecuzione successiva; il lavoro è completato quando entrambe le implementazioni consentono il valore vuoto senza la costante di errore obsoleta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bigquery-firestore-export refuses to clear PARTITIONING_FIELD, but the Data Transfer API allows it.

Setting PARTITIONING_FIELD and later clearing it fails the update with:

Cannot remove partitioning_field from an existing transfer config. The BigQuery Data Transfer API does not support clearing this parameter once it has been set. To change partitioning, you must create a new transfer config with the desired partitioning settings.

The API does support it. Creating a new transfer config is a costly workaround, since run history is stored under the old config ID and does not come with you.

Reproduction

Run against a real project, us location:

  1. Create a scheduled query with partitioning_field: created_at and destination template probe_{run_time|"%H%M%S"}. Two runs produced tables partitioned DAY (field: created_at).
  2. Clear it: PATCH /v1/{name}?updateMask=params with "partitioning_field": "". Returns 200, and a follow-up GET reads it back as "".
  3. Trigger another run. It carries partitioning_field: "", reaches SUCCEEDED, and reports no error.
  4. Compare the destination tables:
probe_152800   DAY (field: created_at)     <- partitioning set
probe_152909   DAY (field: created_at)     <- partitioning set
probe_153056   (none)                      <- after clearing

So the clear is accepted, persists, runs, and changes the output. It is not silently ignored and it does not fail.

The "you cannot un-partition an existing table" concern does not apply here: the destination template gives every run a new time-suffixed table, so nothing is mutated in place.

Where it comes from

The guard and its comment are in functions/src/dts.ts in the upstream extension:

// The BigQuery Data Transfer API does not support clearing this parameter
throw new Error(PARTITIONING_FIELD_REMOVAL_ERROR);

The kit inherited both in a34ba233. The kit and the extension differ only in what happens after the throw, so both are affected.

Suggested fix

Drop the guard and let an empty partitioning_field through the update mask, and remove PARTITIONING_FIELD_REMOVAL_ERROR along with the comment asserting the limitation. Worth confirming against the extension too, since the belief originated there.

Not verified: behaviour in locations other than us, and whether a destination table without a time-suffixed template behaves differently.

Lingua principale
TypeScript
Stelle
978
Fork
433
Merge medio
21h 58m
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/extensions

Tutte le issue di firebase/extensions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.