feat(api): retrieve app deployments based on last used data#7377
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 enhancement to the API by providing a new GraphQL query, 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
|
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/cli |
0.57.2-alpha-20260115133028-efbc8592ef16657cc3bbbdd30357cbe8f4448f39 |
npm ↗︎ unpkg ↗︎ |
hive |
9.0.0-alpha-20260115133028-efbc8592ef16657cc3bbbdd30357cbe8f4448f39 |
npm ↗︎ unpkg ↗︎ |
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7377.hive-storybook.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request introduces a new activeAppDeployments GraphQL query to find stale deployments, which is a valuable addition for maintenance and cleanup. The implementation is accompanied by thorough integration tests and clear documentation. My main feedback is a performance concern regarding how deployments are fetched and filtered, which could be problematic for targets with a large number of deployments. I've also noted an opportunity to reduce code duplication in the new tests.
💻 Website PreviewThe latest changes are available as preview in: https://pr-7377.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
7af3899 to
16aea1d
Compare
jdolle
left a comment
There was a problem hiding this comment.
Great job adding descriptions, comments, and docs. These are all very helpful. I'm excited for App Deployments to get more flushed out
2bf1323 to
b4f774c
Compare
n1ru4l
left a comment
There was a problem hiding this comment.
There is one naming issue for the public GraphQL API: https://github.com/graphql-hive/console/pull/7377/changes#r2689652280
I recommend to either
- adjusting the schema to only expose types that follow our naming conventions
- remove the field from the public API for now
| enum AppDeploymentStatus { | ||
| pending | ||
| active | ||
| retired | ||
| pending @tag(name: "public") | ||
| active @tag(name: "public") | ||
| retired @tag(name: "public") | ||
| } |
There was a problem hiding this comment.
Since this enum type is added to the public API, we need to make sure they follow the naming conventions we decided for the public API, which is also a bit complicated since it is used within the app:create command.
We could also omit the field for now since it is not required as an input type for the functionality introduced in this PR.
Your choice!
There was a problem hiding this comment.
Went with omitting the field for now 👍
059366b to
309a15b
Compare
309a15b to
efbc859
Compare
Description
Adds
activeAppDeploymentsGraphQL query to find app deployments based on usage criteria, enabling teams to identify and clean up stale deploymentsFilter options:
lastUsedBefore- find deployments used but not recentlyneverUsedAndCreatedBefore- find old unused deploymentsname- filter by app name (partial match)Closes CONSOLE-1504