Skip to content

Remove workloadType from the Management API project - #89

Merged
curquiza merged 1 commit into
mainfrom
remove-workload-type
Nov 9, 2026
Merged

curquiza merged 1 commit into
mainfrom
remove-workload-type

Conversation

@curquiza

@curquiza curquiza commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What

Remove workloadType from the generated Management API client and from the test fixture of a project, because the Cloud API no longer returns it (meilisearch/meilisearch-cloud#8092).

Contract

  • The command name and flags derive from its routes by the naming rules of docs/contract/commands.md, or the name the maintainers chose is recorded as an exception with its reason; each route is reachable by a distinct set of flags (or this pull request changes the contract and nothing else) — no command or flag changes
  • Output goes through src/lib/output.ts, errors through src/lib/errors.ts — unchanged
  • The command never waits for a human: no prompt, no question, no $EDITOR, unless it is an interactive command of ADR 0015; a delete command spreads BaseCommand.confirmFlags and its examples carry --yes — unchanged
  • The description starts with one short sentence, the summary that meili --help shows; the detail goes in the next paragraph. It says whether the command is interactive, never who it is for — no description changes
  • What the user types sends analytics (rule 18): the command extends BaseCommand and never calls process.exit; every question goes through src/lib/terminal.ts with a stable prompt id, and every option of choose has a stable id, unless the option is the user's own data — unchanged
  • The command never speaks HTTP itself: the SDK or the generated client only, no fetch outside src/lib/clients/ — unchanged

Tests

  • --help snapshot added or updated on purpose — no --help changes
  • JSON output snapshot for one success case per route and one error case — the project add, list, view and update snapshots lose workloadType, in JSON and in the text view
  • Integration test added (Meilisearch API commands only) — not applicable, Management API only
  • pnpm lint, pnpm typecheck, pnpm test pass locally — lint, typecheck, and the unit and contract projects pass (660/660). The integration-meilisearch project could not run: port 7700 was taken by a Meilisearch container that is not the one of this repository, with another master key (invalid_api_key). The change touches no Meilisearch command.

Simplicity

  • Nothing in the diff exists for a case the API cannot produce, a caller that does not exist, or a generality nobody asked for (rule 16)
  • Anything shared lives in src/lib/, is used by this command, and is named below — nothing shared added

Docs

  • docs/contract/ updated for every name, flag, variable or code this change adds or renames, or nothing to update — nothing to update, docs/ never named workloadType
  • The ADRs that touch this change were read; what they decide still holds, or a new ADR says what changed
  • No accepted ADR was edited. A new ADR was added if a decision changed.
  • New or changed prose follows the writing style of rule 17 of CLAUDE.md — no prose changes

Housekeeping

  • oclif.manifest.json regenerated — pnpm gen:manifest gives no diff
  • Changeset added by the rules of .changeset/README.md, or the change is invisible to users of the package (docs of this repository, tests, CI) — no changeset: the CLI returns the API body as it is, so users already stopped seeing workloadType when the Cloud API shipped
  • New dependency justified below, or none added — none added

Notes for the reviewer

The diff comes from pnpm openapi:management and pnpm gen:management, plus one line removed from test/helpers/management-handlers.ts and pnpm test -u.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated test coverage to reflect projects without a production workload classification. This change is limited to test setup and does not affect application behavior, available features, or the user experience. No user-facing changes are included in this release.

The Cloud API no longer returns it (meilisearch/meilisearch-cloud#8092).
Regenerate the client and drop it from the test fixture.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project fixture no longer includes the workloadType property set to "production".

Changes: Project fixture update

Layer / File(s) Summary
Update project fixture
test/helpers/management-handlers.ts
The project fixture no longer sets workloadType to "production".

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • meilisearch/cli#7: Introduces the generated Management API client and project commands that use its Project model. The PR also updates the project fixture after the Cloud API removes workloadType.
Merge Risk: Minimal · up to ed96e

This change only removes a field from a test fixture, so production behavior is unaffected. It carries no meaningful merge risk.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing workloadType from the Management API project data.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f0454417-f529-4494-8518-a93cd49e2435
Commits

Reviewing files that changed from the base of the PR and between 7b7eb0f and ed96eab.

Files ignored due to path filters: 5

  • src/lib/clients/management/generated/types.gen.ts is excluded by !**/generated/**
  • test/commands/project/__snapshots__/add.test.ts.snap is excluded by !**/*.snap
  • test/commands/project/__snapshots__/list.test.ts.snap is excluded by !**/*.snap
  • test/commands/project/__snapshots__/update.test.ts.snap is excluded by !**/*.snap
  • test/commands/project/__snapshots__/view.test.ts.snap is excluded by !**/*.snap
Files selected for processing: 1

  • test/helpers/management-handlers.ts
Files with no reviewable changes: 1

  • test/helpers/management-handlers.ts

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@curquiza
curquiza merged commit 8ebf203 into main Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant