Skip to content

Add retireAppDeployment to the public api#7642

Open
jdolle wants to merge 1 commit intomainfrom
public-retire-deployments
Open

Add retireAppDeployment to the public api#7642
jdolle wants to merge 1 commit intomainfrom
public-retire-deployments

Conversation

@jdolle
Copy link
Collaborator

@jdolle jdolle commented Feb 5, 2026

Background

https://linear.app/the-guild/issue/CONSOLE-1795/expose-public-api-for-retiring-app-deployments

We have a case where people want to be able to dynamically retire app deployments via their CI. This is a reasonable case particularly for web apps with a CI/CD deployment system. App deployments can be automatically shuffled out as new versions are released.

Description

Adds retireAppDeployment to our public API.
Adds descriptions to fields to make sure our public API is well documented.
And I verified that the API has appropriate permission checks in place.

@jdolle jdolle requested a review from n1ru4l February 5, 2026 20:17
@jdolle jdolle self-assigned this Feb 5, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jdolle, 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 the capability to dynamically retire application deployments via the public API. This is particularly beneficial for CI/CD systems, enabling automated management of application lifecycles. The changes ensure that the new API functionality is thoroughly documented and includes appropriate permission checks, facilitating seamless integration and use by external clients.

Highlights

  • Public API Exposure: The retireAppDeployment mutation has been exposed to the public API, allowing external systems to dynamically retire application deployments.
  • API Documentation Enhancement: Detailed descriptions have been added to fields within the RetireAppDeploymentInput and related types to ensure the public API is well-documented.
  • Default Value for force Field: The force field in RetireAppDeploymentInput now has a default value of false and is explicitly marked as non-nullable, improving clarity and preventing accidental forced retirements.
  • Public Tagging: All relevant fields and types associated with the retireAppDeployment functionality are now tagged with @tag(name: "public").
Changelog
  • packages/services/api/src/modules/app-deployments/module.graphql.ts
    • The retireAppDeployment mutation and its input/output types (RetireAppDeploymentInput, RetireAppDeploymentError, RetireAppDeploymentOk, RetireAppDeploymentResult) are now marked with @tag(name: "public").
    • Added comprehensive descriptions to the target, appName, appVersion, and force fields within RetireAppDeploymentInput.
    • The force field in RetireAppDeploymentInput is updated to be non-nullable (Boolean!) and assigned a default value of false.
    • Fields within RetireAppDeploymentError, RetireAppDeploymentOk, and RetireAppDeploymentResult are also tagged as public.
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

📚 Storybook Deployment

The latest changes are available as preview in: https://pr-7642.hive-storybook.pages.dev

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
hive 9.3.1-alpha-20260205201854-a700b4074c787b6fcc70434ce94880526ee509e6 npm ↗︎ unpkg ↗︎

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 successfully exposes the retireAppDeployment mutation to the public API by adding the necessary @tag(name: "public") directives and documenting the schema fields. The change to make the force input field non-nullable with a default value is a good improvement for API clarity. I have one suggestion to improve the documentation for the target input field to make its behavior clearer for API consumers.

Comment on lines 135 to +138
"""
Force retirement even if protection rules would prevent it.
If using an organization access token, then a target must be provided.
If using a target's access token, then this should be null.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The description for the target field could be more precise. The current wording might be confusing for consumers of this public API. It's not strictly required for the value to be null when using a target access token; it can be omitted entirely. A clearer description would improve usability.

I suggest clarifying that the field is optional with a target token because the target can be inferred.

Suggested change
"""
Force retirement even if protection rules would prevent it.
If using an organization access token, then a target must be provided.
If using a target's access token, then this should be null.
"""
"""
Reference to the target. This is required when using an organization-level access token.
When using a target-specific access token, this field is optional as the target can be inferred from the token.
"""

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tag: a700b4074c787b6fcc70434ce94880526ee509e6

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

💻 Website Preview

The latest changes are available as preview in: https://pr-7642.hive-landing-page.pages.dev

Copy link
Contributor

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

We could add a changeset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants