-
Notifications
You must be signed in to change notification settings - Fork 122
feat(cdn): add versioned artifact endpoints #7348
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
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 significantly enhances the CDN's capabilities by enabling the retrieval of schema artifacts based on their version ID. Previously, only the latest version was directly accessible. Now, when a schema is published, its artifacts are stored in a way that allows both the current "latest" version and any specific historical version to be fetched via dedicated CDN endpoints. This provides users with the ability to inspect or roll back to previous schema definitions, improving schema management and debugging workflows. 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
|
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7348.hive-storybook.pages.dev |
14560ef to
d03545b
Compare
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
The pull request introduces support for versioned CDN artifacts, allowing retrieval of historical schema versions. The changes include new API endpoints, modifications to the artifact storage writer to handle versioned keys, and updates to schema publishing and deletion logic to pass version IDs. Comprehensive integration tests have been added to validate the new functionality, covering various scenarios including successful retrieval, handling of non-existent or invalid version IDs, and authentication. The implementation demonstrates good practices such as Zod for input validation, detailed logging, and appropriate cache control for immutable versioned artifacts. The logic for writing versioned artifacts before updating the 'latest' ensures data consistency in case of partial failures.
💻 Website PreviewThe latest changes are available as preview in: https://pr-7348.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
c098616 to
423e6d1
Compare
423e6d1 to
31ae5eb
Compare
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.
This could also mention the availability of the new header x-hive-schema-version-id.
n1ru4l
left a comment
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.
Looking good! 🥳 Only one minor comment for the changeset: https://github.com/graphql-hive/console/pull/7348/files#r2598287101
After merging this, please follow up with a PR for a product update and also updating existing documentation for the CDN
1b2fc9d to
59ec6e1
Compare
Description
Add support for retrieving CDN artifacts by version ID.
New endpoints
GET /artifacts/v1/:targetId/version/:versionId/:artifactTypeGET /artifacts/v1/:targetId/version/:versionId/contracts/:contractName/:artifactTypeArtifacts are now written to both the latest path and a versioned path during schema publish, enabling retrieval of historical versions.
Closes #7222
Closes #7156