H-3848, H-6154: Handle larger Flow payloads, historical flight data Flows#8356
H-3848, H-6154: Handle larger Flow payloads, historical flight data Flows#8356
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryHigh Risk Overview Updates Flow execution robustness by adding heartbeats/longer timeouts for persistence activities, introducing shared flow-context utilities (including Adds new aviation integration capabilities: historical arrivals over date ranges, live flight position updates, rate-limited + retrying API clients, and batched create/patch persistence for integration entities/links; also cleans up enum datatype TS generation and extends storage providers with direct upload/download + flow-output key generation. Written by Cursor Bugbot for commit 810094a. This will update automatically on new commits. Configure here. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8356 +/- ##
==========================================
- Coverage 60.10% 60.10% -0.01%
==========================================
Files 1235 1234 -1
Lines 118201 118219 +18
Branches 5180 5184 +4
==========================================
Hits 71050 71050
- Misses 46324 46342 +18
Partials 827 827
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🤖 Augment PR SummarySummary: This PR adds support for larger Flow payloads by offloading certain activity inputs/outputs to storage, and introduces new aviation integration flows for historical flight arrivals and live flight position updates. Changes:
Technical Notes: Stored payload kinds are now represented as references in Flow I/O types and must be resolved by activities (and by backend APIs when returning Flow run details to clients). 🤖 Was this summary useful? React with 👍 or 👎 |
...orker/src/activities/flow-activities/aviation-activities/get-live-flight-positions-action.ts
Outdated
Show resolved
Hide resolved
libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR adds support for retrieving historical flight arrival information over time spans and improves handling of large Flow payloads by offloading them to S3 storage. It also fixes enum data type generation issues (H-3848).
Changes:
- Introduced a
StoredPayloadRefsystem that stores large payloads (ProposedEntity, ProposedEntityWithResolvedLinks, PersistedEntitiesMetadata) in S3 instead of passing them through Temporal activities - Added historical flight data retrieval capabilities with automatic 24-hour chunking to handle API limitations
- Implemented rate limiting for AeroAPI (5 requests/second) and retry logic for 429 errors
- Added live flight position tracking via FlightRadar24 integration
- Fixed enum data type code generation by removing redundant
allOfinheritance - Extended activity timeouts and added heartbeat support for long-running batch operations
Reviewed changes
Copilot reviewed 56 out of 56 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/@local/hash-isomorphic-utils/src/flows/types.ts | Core type system changes introducing StoredPayloadRef, StoredPayloadKind, and separated Payload/ResolvedPayload types |
| libs/@local/hash-backend-utils/src/flows/payload-storage.ts | New payload storage infrastructure for S3 offloading with store/retrieve/resolve functions |
| libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts | Added historical arrivals API integration with date chunking and rate limiting |
| apps/hash-integration-worker/src/activities/flow-activities/integration-activities/persist-integration-entities-action.ts | Refactored to batch operations and resolve stored payloads, with heartbeat support |
| apps/hash-integration-worker/src/activities/flow-activities/aviation-activities/get-historical-flight-arrivals-action.ts | New action for fetching historical flight data over date ranges |
| apps/hash-integration-worker/src/activities/flow-activities/aviation-activities/get-live-flight-positions-action.ts | New action for fetching live flight positions from FlightRadar24 |
| libs/@blockprotocol/graph/src/codegen/preprocess/remove-redundant-data-type-inheritance.ts | New preprocessing step to fix enum data type generation |
| libs/@local/hash-backend-utils/src/flows/get-flow-run-details.ts | Added StoredPayloadRef resolution for step outputs before returning to GraphQL clients |
| apps/hash-integration-worker/src/workflows/run-flow-workflow.ts | Extended activity timeouts to 10 hours with 10-second heartbeat timeouts for batch operations |
| libs/@local/hash-backend-utils/src/file-storage.ts | Unified FileStorageProvider interface with direct upload/download methods |
| apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts | Changed flow entity lookup from UUID-based to property query-based |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts
Outdated
Show resolved
Hide resolved
...src/activities/flow-activities/integration-activities/persist-integration-entities-action.ts
Show resolved
Hide resolved
apps/hash-ai-worker-ts/src/activities/shared/get-flow-context.ts
Outdated
Show resolved
Hide resolved
apps/plugin-browser/src/pages/popup/popup-contents/action-center/shared/use-flow-runs.ts
Outdated
Show resolved
Hide resolved
libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts
Show resolved
Hide resolved
libs/@local/hash-backend-utils/src/flows/get-flow-run-details.ts
Outdated
Show resolved
Hide resolved
...src/activities/flow-activities/integration-activities/persist-integration-entities-action.ts
Show resolved
Hide resolved
...src/activities/flow-activities/integration-activities/persist-integration-entities-action.ts
Show resolved
Hide resolved
...src/activities/flow-activities/integration-activities/persist-integration-entities-action.ts
Show resolved
Hide resolved
libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts
Outdated
Show resolved
Hide resolved
libs/@local/hash-backend-utils/src/integrations/aviation/aero-api/client.ts
Outdated
Show resolved
Hide resolved
...ash-integration-worker/src/activities/flow-activities/shared/get-integration-flow-context.ts
Show resolved
Hide resolved
...orker/src/activities/flow-activities/aviation-activities/get-live-flight-positions-action.ts
Show resolved
Hide resolved
...orker/src/activities/flow-activities/aviation-activities/get-live-flight-positions-action.ts
Show resolved
Hide resolved
apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entities-action.ts
Show resolved
Hide resolved
apps/hash-ai-worker-ts/src/activities/flow-activities/answer-question-action.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
🌟 What is the purpose of this PR?
This PR:
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?