Skip to content

Allow Starter creation to use the server-default project - #30

Merged
Icemap merged 1 commit into
mainfrom
agent/server-default-project-fallback
Jul 29, 2026
Merged

Allow Starter creation to use the server-default project#30
Icemap merged 1 commit into
mainfrom
agent/server-default-project-fallback

Conversation

@Icemap

@Icemap Icemap commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep tdc configure project discovery and the explicit/profile project precedence unchanged.
  • Allow Starter cluster creation without a resolved project ID by omitting the tidb.cloud/project label and letting TiDB Cloud select the account default.
  • Keep an explicitly empty --project-id invalid and prevent empty project labels from reaching the API.
  • Update dry-run output, unit tests, black-box tests, live DB coverage, README, AGENTS, and the completed project-resolution spec.

Why

The create resolver treated a missing profile project_id as a local configuration error even though the Starter API supports requests without a project label. This blocked users who intentionally removed the discovered project ID or used credentials and region settings without a configured profile.

The live test also confirms that the server-selected account default can differ from the tidbx_virtual project discovered by tdc configure, so these two defaults are documented and tested separately.

User impact

Project selection now follows this order:

  1. explicit non-empty --project-id;
  2. the selected profile's project_id;
  3. TiDB Cloud's server-selected account default.

Validation

  • make test
  • make e2e
  • make live-e2e-db
  • git diff --check

The live lifecycle created, queried, updated, and deleted its uniquely named Starter cluster without a configured or explicit project ID. No tdc-e2e-* cluster remained after the run.

@Icemap
Icemap marked this pull request as ready for review July 29, 2026 13:11
@Icemap
Icemap merged commit 7ae13e9 into main Jul 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant