Skip to content

fix(FR-2776): adapt addModelRevision call sites to new schema#7158

Merged
graphite-app[bot] merged 1 commit into
mainfrom
04-30-fix_fr-2776_adapt_addmodelrevision_call_sites_to_new_schema
Apr 30, 2026
Merged

fix(FR-2776): adapt addModelRevision call sites to new schema#7158
graphite-app[bot] merged 1 commit into
mainfrom
04-30-fix_fr-2776_adapt_addmodelrevision_call_sites_to_new_schema

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 30, 2026

Resolves #7157 (FR-2776)

Stacks on top of #7153 (FR-2773) → #7152 (FR-2774).

Symptom

Relay compile errors after a schema sync:

✖︎ Unknown argument 'options'.
  react/src/components/DeploymentAddRevisionModal.tsx:172:41
  react/src/pages/DeploymentLauncherPage.tsx:259:41

Schema change

addModelRevision no longer takes options as a top-level mutation argument. The AddRevisionOptions payload is now a field on AddRevisionInput:

# Before
addModelRevision(input: AddRevisionInput!, options: AddRevisionOptions): AddRevisionPayload!

# After
addModelRevision(input: AddRevisionInput!): AddRevisionPayload!

# AddRevisionInput now has:
options: AddRevisionOptions = null

Changes

react/src/pages/DeploymentLauncherPage.tsx

  • DeploymentLauncherPageEditMutation: drop the $options: AddRevisionOptions variable and the , options: $options argument from the addModelRevision selection.
  • handleAddRevision: move options: { autoActivate: true } from variables (top level) into variables.input.

react/src/components/DeploymentAddRevisionModal.tsx

  • DeploymentAddRevisionModalAddMutation: drop the inline options: { autoActivate: true } argument from the addModelRevision selection.
  • commitAdd: pass options: { autoActivate: true } inside the input payload.

data/schema.graphql

  • Sync to the new server schema (drives Relay compiler against the latest definition).

Test plan

  • pnpm run relay compiles without errors.
  • bash scripts/verify.sh passes (Relay / Lint / Format / TypeScript).
  • /deployments/create: create-then-add-revision flow still produces an active revision (auto-activated).
  • Standalone Add Revision modal: clicking "Add Revision" creates a new revision and auto-activates it.

Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Apr 30, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the WebUI’s addModelRevision Relay mutations to match the latest GraphQL schema, where revision options are now carried inside AddRevisionInput (and the mutation no longer takes a separate options argument).

Changes:

  • Update DeploymentLauncherPage mutation signature and variables to pass options.autoActivate inside input.
  • Update DeploymentAddRevisionModal mutation signature and variables to pass options.autoActivate inside input.
  • Refresh data/schema.graphql to reflect the new addModelRevision signature and related schema updates.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
react/src/pages/DeploymentLauncherPage.tsx Removes $options from the mutation and moves autoActivate under variables.input.options.
react/src/components/DeploymentAddRevisionModal.tsx Removes inline options argument from the mutation and moves autoActivate under variables.input.options.
data/schema.graphql Adds options to AddRevisionInput and removes the options argument from addModelRevision (plus additional schema refresh changes).
Comments suppressed due to low confidence (1)

data/schema.graphql:182

  • The docstring for AddRevisionOptions still refers to the add_model_revision mutation name, but the mutation exposed in this schema is addModelRevision. Updating the wording here will reduce confusion for schema consumers (and matches the actual field name).
  options: AddRevisionOptions = null
}

"""Added in 26.4.2. Options for the add_model_revision mutation."""
input AddRevisionOptions

Comment thread data/schema.graphql
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.12% (+0% 🔼)
1859/22905
🔴 Branches 7.35% 1187/16156
🔴 Functions
4.83% (+0.02% 🔼)
297/6154
🔴 Lines
7.89% (+0% 🔼)
1750/22190

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 3a901b2

@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 30, 2026
@ironAiken2 ironAiken2 force-pushed the 04-29-fix_fr-2773_preserve_auto-selected_resourcepresetid_across_applyinitialvalues branch from 69b4380 to ecdd93b Compare April 30, 2026 06:51
@ironAiken2 ironAiken2 force-pushed the 04-30-fix_fr-2776_adapt_addmodelrevision_call_sites_to_new_schema branch from a2f6de7 to 6350b34 Compare April 30, 2026 06:51
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 30, 2026

Merge activity

Resolves #7157 ([FR-2776](https://lablup.atlassian.net/browse/FR-2776))

> Stacks on top of #7153 (FR-2773) → #7152 (FR-2774).

## Symptom

Relay compile errors after a schema sync:

```
✖︎ Unknown argument 'options'.
  react/src/components/DeploymentAddRevisionModal.tsx:172:41
  react/src/pages/DeploymentLauncherPage.tsx:259:41
```

## Schema change

`addModelRevision` no longer takes `options` as a top-level mutation argument. The `AddRevisionOptions` payload is now a field on `AddRevisionInput`:

```graphql
# Before
addModelRevision(input: AddRevisionInput!, options: AddRevisionOptions): AddRevisionPayload!

# After
addModelRevision(input: AddRevisionInput!): AddRevisionPayload!

# AddRevisionInput now has:
options: AddRevisionOptions = null
```

## Changes

### `react/src/pages/DeploymentLauncherPage.tsx`

- `DeploymentLauncherPageEditMutation`: drop the `$options: AddRevisionOptions` variable and the `, options: $options` argument from the `addModelRevision` selection.
- `handleAddRevision`: move `options: { autoActivate: true }` from `variables` (top level) into `variables.input`.

### `react/src/components/DeploymentAddRevisionModal.tsx`

- `DeploymentAddRevisionModalAddMutation`: drop the inline `options: { autoActivate: true }` argument from the `addModelRevision` selection.
- `commitAdd`: pass `options: { autoActivate: true }` inside the `input` payload.

### `data/schema.graphql`

- Sync to the new server schema (drives Relay compiler against the latest definition).

## Test plan

- [x] `pnpm run relay` compiles without errors.
- [x] `bash scripts/verify.sh` passes (Relay / Lint / Format / TypeScript).
- [ ] `/deployments/create`: create-then-add-revision flow still produces an active revision (auto-activated).
- [ ] Standalone Add Revision modal: clicking "Add Revision" creates a new revision and auto-activates it.

[FR-2776]: https://lablup.atlassian.net/browse/FR-2776?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 04-29-fix_fr-2773_preserve_auto-selected_resourcepresetid_across_applyinitialvalues branch from ecdd93b to ab6e4b0 Compare April 30, 2026 07:06
@graphite-app graphite-app Bot force-pushed the 04-30-fix_fr-2776_adapt_addmodelrevision_call_sites_to_new_schema branch from 6350b34 to 3a901b2 Compare April 30, 2026 07:06
Base automatically changed from 04-29-fix_fr-2773_preserve_auto-selected_resourcepresetid_across_applyinitialvalues to main April 30, 2026 07:20
@graphite-app graphite-app Bot merged commit 3a901b2 into main Apr 30, 2026
8 checks passed
@graphite-app graphite-app Bot deleted the 04-30-fix_fr-2776_adapt_addmodelrevision_call_sites_to_new_schema branch April 30, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(FR-2776): adapt addModelRevision call sites to new schema (options moved into AddRevisionInput)

2 participants