Skip to content

fix(firestore): fix empty message reject inside transaction body #9177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cherylEnkidu
Copy link
Contributor

@cherylEnkidu cherylEnkidu commented Jul 21, 2025

Fixes: #9147

@cherylEnkidu cherylEnkidu requested review from a team as code owners July 21, 2025 18:59
Copy link

changeset-bot bot commented Jul 21, 2025

🦋 Changeset detected

Latest commit: b1a4873

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/firestore Patch
firebase Patch
@firebase/firestore-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 21, 2025

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (56fbe52)Merge (d5d71ce)Diff
    browser391 kB391 kB+1 B (+0.0%)
    main611 kB611 kB+1 B (+0.0%)
    module391 kB391 kB+1 B (+0.0%)
    react-native392 kB392 kB+1 B (+0.0%)
  • @firebase/firestore-lite

    TypeBase (56fbe52)Merge (d5d71ce)Diff
    browser115 kB115 kB+1 B (+0.0%)
    main158 kB158 kB+1 B (+0.0%)
    module115 kB115 kB+1 B (+0.0%)
    react-native116 kB116 kB+1 B (+0.0%)
  • @firebase/performance

    TypeBase (56fbe52)Merge (d5d71ce)Diff
    browser31.1 kB31.2 kB+169 B (+0.5%)
    main31.5 kB31.7 kB+169 B (+0.5%)
    module31.1 kB31.2 kB+169 B (+0.5%)
  • bundle

    TypeBase (56fbe52)Merge (d5d71ce)Diff
    firestore (Transaction)224 kB224 kB+1 B (+0.0%)
    firestore-lite (Transaction)107 kB107 kB+1 B (+0.0%)
    performance (trace)62.0 kB62.1 kB+96 B (+0.2%)
  • firebase

    TypeBase (56fbe52)Merge (d5d71ce)Diff
    firebase-compat.js800 kB800 kB+91 B (+0.0%)
    firebase-firestore-compat.js349 kB349 kB+1 B (+0.0%)
    firebase-firestore-lite.js138 kB138 kB+1 B (+0.0%)
    firebase-firestore.js455 kB455 kB+1 B (+0.0%)
    firebase-performance-compat.js40.2 kB40.3 kB+90 B (+0.2%)
    firebase-performance-standalone-compat.js105 kB105 kB+90 B (+0.1%)
    firebase-performance.js45.5 kB45.6 kB+90 B (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/cBpXieiga4.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 21, 2025

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • runTransaction

      Size

      TypeBase (56fbe52)Merge (d5d71ce)Diff
      size139 kB139 kB+1 B (+0.0%)
      size-with-ext-deps211 kB211 kB+1 B (+0.0%)
  • @firebase/performance

    • getPerformance

      Size

      TypeBase (56fbe52)Merge (d5d71ce)Diff
      size19.1 kB19.2 kB+94 B (+0.5%)
      size-with-ext-deps61.8 kB61.9 kB+96 B (+0.2%)
    • initializePerformance

      Size

      TypeBase (56fbe52)Merge (d5d71ce)Diff
      size19.3 kB19.3 kB+94 B (+0.5%)
      size-with-ext-deps55.4 kB55.5 kB+96 B (+0.2%)
    • trace

      Size

      TypeBase (56fbe52)Merge (d5d71ce)Diff
      size19.0 kB19.1 kB+94 B (+0.5%)
      size-with-ext-deps54.8 kB54.9 kB+96 B (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/0viYHluubE.html

@cherylEnkidu cherylEnkidu requested a review from a team as a code owner July 21, 2025 19:27
@cherylEnkidu cherylEnkidu changed the title Fix empty message reject inside transaction body fix(firestore): fix empty message reject inside transaction body Jul 21, 2025
Copy link
Contributor

github-actions bot commented Jul 21, 2025

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

'@firebase/firestore': major
---

Fixed a bug where a rejected promise with an empty message in a transaction would cause a timeout. (https://github.com/firebase/firebase-js-sdk/issues/9147)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you can remove this link to the issue, but you need to update your PR description to use this exact syntax:

Fixes: #9147

Then the change log generator will be able to parse this issue number out of the PR description and generate the link for you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this would be a "patch", not a "major" bump, right? See line 2.

Copy link
Contributor

@dconeybe dconeybe Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove the http link and add the line Fixes: #9147 to the PR description. Then the release notes will be automatically populated with the link to the issue. For an example of this, see #9151

Copy link
Contributor

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

@@ -113,7 +113,7 @@ export class TransactionRunner<T> {
}

private isRetryableTransactionError(error: Error): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make error an optional param to communicate the behavior we have observed. This also supports the change you made below for future readers.

private isRetryableTransactionError(error?: Error): boolean {...

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.

Transactions that experience errors never resolve
4 participants