LoggingServiceV2Client loses automatic WriteLogEntries batching after the logging-api split
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- google-cloud, node.js, typescript
Direzione di ricerca
Start by reading the logging-api onboarding change in PR #8863 and the package split in PR #8929, then inspect the LoggingServiceV2Client generation configuration and historical logging_gapic.yaml linked in the issue. Confirm where bundling defaults and the WriteLogEntries batching descriptor are configured. Done means compatible separate writes are coalesced into one transport request in v12, with a regression test covering that behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Please make sure you have searched for information in the following guides.
- Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
- Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
- Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
- Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples
- Check the API's issue tracker: https://cloud.google.com/support/docs/issue-trackers
Library Name
@google-cloud/logging — comparing 11.2.1 and 12.0.0
A screenshot that you have tested with "Try this API".
Not applicable: this issue concerns client-side request batching in the generated Node.js SDK. API Explorer sends requests directly and cannot exercise the SDK's google-gax batching scheduler.
The linked reproduction uses mocked transport calls and exercises the actual generated client wrappers and google-gax scheduler. It requires no credentials or Google Cloud project and makes no real Google Cloud API calls.
No API Explorer test was performed.
Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.
https://github.com/jacekerd/google-logging-batching-repro
A step-by-step description of how to reproduce the issue, based on the linked reproduction.
Requirements: Node.js 22 or newer and npm.
-
Clone the reproduction:
git clone https://github.com/jacekerd/google-logging-batching-repro.git cd google-logging-batching-repro -
Install the two locked dependency trees:
npm ci --prefix versions/v11 --ignore-scripts --no-audit --no-fund npm ci --prefix versions/v12 --ignore-scripts --no-audit --no-fund -
Inspect batching metadata and exercise compatible writes:
npm run check:v11 npm run check:v12 npm run behavior npm test -
Run the assertion that v12 should preserve v11 batching behavior:
npm run test:expect-v11
Observed results:
- v11.2.1 has descriptors.batching.writeLogEntries; two compatible writes produce one mocked transport invocation containing both entries.
- v12.0.0 has an empty descriptors.batching object; the same writes produce two separate mocked transport invocations.
- npm test passes five tests documenting these observations.
- npm run test:expect-v11 intentionally exits 1, with one failed parity assertion.
The reproduction uses real generated wrappers and google-gax scheduling, with the transport stubbed. No credentials or real Cloud API requests are required.
A clear and concise description of what the bug is, and what you expected to happen.
Automatic WriteLogEntries batching differs between @google-cloud/[email protected] and @google-cloud/[email protected].
In 11.2.1, LoggingServiceV2Client initializes descriptors.batching.writeLogEntries and combines compatible calls into one transport request.
In 12.0.0, LoggingServiceV2Client is re-exported from @google-cloud/[email protected]. That generated implementation has an empty batching descriptor object and lacks the corresponding bundling defaults and batching descriptor selection.
Expected: compatible WriteLogEntries calls retain automatic batching.
Actual: two compatible calls produce two transport requests instead of one.
Explicit higher-level log.write([entry1, entry2]) remains supported. The issue concerns automatic coalescing across separate GAPIC calls.
These versions establish the behavioral difference; they do not identify the first affected intermediate release.
A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
@google-cloud/[email protected] automatically combines compatible WriteLogEntries calls. I expected this behavior to remain available after upgrading to 12.0.0.
The historical Node.js generation target explicitly supplied google/logging/v2/logging_gapic.yaml, which defines batching for WriteLogEntries. Investigation indicates that the logging-api onboarding omitted nodejs.bundle_config from librarian.yaml, causing the generated client to lose its batching descriptor, bundling defaults, and batching descriptor selection.
The reproduction demonstrates one mocked transport invocation for two compatible writes in v11, versus two invocations in v12. Restoring the missing configuration in memory restores batching with v12's existing google-gax runtime.
Relevant references:
- Reproduction: https://github.com/jacekerd/google-logging-batching-repro
- Historical batching configuration: https://github.com/googleapis/googleapis/blob/2b625c91510a2e8320a778bc88af8b65bc4a19a2/google/logging/v2/logging_gapic.yaml
- logging-api onboarding: https://github.com/googleapis/google-cloud-node/pull/8863
- Logging package split: https://github.com/googleapis/google-cloud-node/pull/8929
I'd expect the automatic GAPIC batching to be preserved across this migration.
- Lingua principale
- TypeScript
- Stelle
- 3.2k
- Fork
- 732
- Merge medio
- 2g 11h
- PR unite (30g)
- 99
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googleapis/google-cloud-node
-
Broken deprecation chainAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
googleapis/google-cloud-node#9854 ·
I maintainer di solito rispondono entro 1 giorno
-
pubsub: "Operation attempted on ended Span" when a modack is flushed after the message was ackedApertaapi: pubsub
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
googleapis/google-cloud-node#9853 ·
I maintainer di solito rispondono entro 1 giorno
-
storage: V4 getSignedUrl sorts canonical headers with localeCompare, so they disagree with X-Goog-SignedHeadersForse già presa @itsrayeedscodespace l’ha presa 9 giorni fa. Apertaapi: storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
googleapis/google-cloud-node#9840 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
firestore: getPartitions() emits gax AutopaginateTrueWarning in every processForse già presa @TheRealDanii l’ha presa 13 giorni fa. Apertaapi: firestore
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
googleapis/google-cloud-node#9736 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
googleapis/google-cloud-node#9723 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di googleapis/google-cloud-node
Issue simili
-
area: batch
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
inabagumi/shinju-date#7294 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
streaming-video-technology-alliance/common-media-library#700 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
vercel-labs/ui#809 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
KrisCris/village-in-the-shade-guide#75 ·
I maintainer di solito rispondono entro 1 giorno
-
bot:ai-assisted component:platform-js status:untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
midnightntwrk/platform-js#38 ·