Skip to content

chore(deps): bump google-events#297

Merged
IzaakGough merged 4 commits into
mainfrom
@invertase/bump-google-events-version
Jul 13, 2026
Merged

chore(deps): bump google-events#297
IzaakGough merged 4 commits into
mainfrom
@invertase/bump-google-events-version

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #253

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the dependency range for google-events from a pinned version ==0.5.0 to >=0.5.0,<1.0.0 in pyproject.toml and updates the lockfile uv.lock accordingly. It also removes the exclude-newer configuration options from uv.lock. No review comments were provided, so there is no additional feedback.

@IzaakGough IzaakGough marked this pull request as ready for review June 22, 2026 14:02
@CorieW

CorieW commented Jul 1, 2026

Copy link
Copy Markdown
Member

Testing Summary

Validated the google-events upgrade path with comprehensive testing:

Note: 0.14.0 latest google-events version at time of comment.

Smoke Tests Performed

1. API Surface Validation

  • Verified DocumentEventData.from_json(), deserialize(), serialize() methods exist
  • Confirmed field structure: value, old_value, update_mask unchanged
  • Tested all Firestore field types: string, int, bool, double, timestamp, null, array, map

2. JSON/Protobuf Deserialization

  • JSON string payloads: ✅ Works with both versions
  • Protobuf binary payloads: ✅ Works with both versions
  • Dict payloads: ✅ Works with both versions (found + fixed pre-existing bug in firestore_fn.py)

3. End-to-End Integration

  • Full event handler path with real google-events library (no mocking)
  • CloudEvent → DocumentEventData → event processing
  • Tested with realistic Firestore event payloads

4. Version Compatibility

  • Installed google-events 0.5.0 → ran all tests → 10/10 pass ✅
  • Installed google-events 0.14.0 → ran all tests → 10/10 pass ✅
  • API 100% identical between versions

5. Deployment Tests

  • Deployed function with google-events 0.14.0 → successful ✅
  • Deployed function with google-events 0.5.0 → successful ✅
  • Both functions built and deployed with zero code changes

Results

  • Breaking changes: None
  • API differences: None for Firestore usage
  • Package size: 0.5.0 = 246KB, 0.14.0 = 561KB (added events for other GCP services, not used by this SDK)

The upgrade from ==0.5.0 to >=0.5.0,<1.0.0 is safe to merge.

@cabljac cabljac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@shettyvarun268 shettyvarun268 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for updating google-events—this looks good to merge and unblock #253!

Regarding the # type: ignore[arg-type] added on line 224 in src/firebase_functions/firestore_fn.py: the mypy error happens because firestore_event_data is currently reused as both the raw protobuf (_firestore.DocumentEventData) and the converted domain object (DocumentSnapshot / Change).

Since this doesn't affect runtime behavior, I'm happy to approve and merge this as-is. However, let's open a follow-up PR to separate firestore_event_data into two distinct variables (proto_event_data vs domain_event_data). That will allow us to cleanly remove both the # type: ignore[arg-type] on line 224 and the three _typing.cast calls on lines 176–186.

@IzaakGough

Copy link
Copy Markdown
Contributor Author

@shettyvarun268 Thanks for the review! I will start working on that follow up asap :)

@IzaakGough IzaakGough merged commit bf48bca into main Jul 13, 2026
21 checks passed
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.

Update google-events to latest

4 participants