-
Notifications
You must be signed in to change notification settings - Fork 125
feat(app-deployments): improve app:create performance with v2 format #7565
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @adambenhassen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant performance improvement for app deployments by implementing a new 'v2' storage format. This new format allows for efficient delta uploads, where only new or changed documents are uploaded, and enables cross-version deduplication, reducing storage and transfer overhead. The changes span across the CLI, API, and CDN worker, ensuring a seamless and faster deployment experience, especially for applications with many documents and frequent updates. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
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 introduces a new V2 storage format for app deployments, significantly improving performance through delta uploads and parallel processing. The changes include new CLI flags for format selection and timing, robust SHA256 hash validation, and optimized parallel uploads to S3 and ClickHouse. Extensive integration tests have been added to cover the new functionality, and a benchmark script with a detailed README provides clear performance comparisons. The changes are well-implemented and effectively address the stated performance goals. There is a minor style guide adherence opportunity regarding environment variable access in a utility script and a backend service provider.
packages/services/api/src/modules/app-deployments/providers/persisted-document-ingester.ts
Outdated
Show resolved
Hide resolved
d1672f8 to
2db60d1
Compare
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.47.2-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.58.0-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.20.2-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.4-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.47.2-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
hive |
9.2.0-alpha-20260127033018-133d4453a1a8cfd3aecb6ddaaaafc92a5447294b |
npm ↗︎ unpkg ↗︎ |
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7565.hive-storybook.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
💻 Website PreviewThe latest changes are available as preview in: https://pr-7565.hive-landing-page.pages.dev |
Background
App deployment uploads can be slow when deploying many documents, especially when most documents haven't changed between versions. Currently, every document is re-uploaded on each deployment, even if it already exists from a previous version
Description
Implements a new v2 storage format for app deployments that enables delta uploads, only uploading documents that don't already exist. This dramatically improves deployment speed for incremental updates.
Notable Changes
SHA256hashes and validates hash matches document content (prevents hash collisions) both in CLI and server-side.--showTimingflag to display per-batch timing breakdown in CLI.S3_UPLOAD_CONCURRENCYenvironment variable and set default to 100 (previously 30)Backwards Compatibility
--formatflag toapp:create(v1default,v2for delta uploads)Benchmarks
All changes were benchmarked with the script provided in
load-tests/app-deployments.1000 Documents
Format Comparison
app/{target}/{name}/{version}/{hash}app-v2/{target}/{name}/{hash}Closes CONSOLE-1582