Skip to content

Cherry-pick: CLI structure and options fixes to release/2.0 (#3407, #3408, #3409)#3504

Merged
RubenCerna2079 merged 5 commits intorelease/2.0from
cherry-pick/release-2.0/cli-structure-fixes
May 6, 2026
Merged

Cherry-pick: CLI structure and options fixes to release/2.0 (#3407, #3408, #3409)#3504
RubenCerna2079 merged 5 commits intorelease/2.0from
cherry-pick/release-2.0/cli-structure-fixes

Conversation

@souvikghosh04
Copy link
Copy Markdown
Contributor

@souvikghosh04 souvikghosh04 commented May 5, 2026

Cherry-picks CLI structural fixes from main to release/2.0:

)

## Why make this change?

`dab init` used a flat, structurally wrong option
`--graphql.multiple-create.enabled` while the JSON schema and `dab
configure` both use the correct nested structure
`--runtime.graphql.multiple-mutations.create.enabled`.

## What is this change?

- Renames the `dab init` CLI option from
`--graphql.multiple-create.enabled` to
`--graphql.multiple-mutations.create.enabled` to align with the config
schema hierarchy (`runtime.graphql.multiple-mutations.create.enabled`)
and `dab configure`.
- Updates all references in source, config generators, and tests. No
changes to the underlying config model —
`MultipleMutationOptions/MultipleCreateOptions` was already correct.
- **Breaking change note**: The old flag
`--graphql.multiple-create.enabled` is no longer accepted by `dab init`.
Users should migrate to `--graphql.multiple-mutations.create.enabled`.

## How was this tested?

- [ ] Integration Tests
- [x] Unit Tests

## Sample Request(s)

Before (broken):
```
dab init --database-type mssql --connection-string "@env('conn')" --graphql.multiple-create.enabled true
```

After (fixed):
```
dab init --database-type mssql --connection-string "@env('conn')" --graphql.multiple-mutations.create.enabled true
```
…#3408)

## Why make this change?
- Closes #3373 
 
dab configure individual DML tool options had an extra `.enabled`
suffix, producing invalid nested config instead of the direct booleans
the schema expects.

## What is this change?

Removed `.enabled` suffix from 7 individual DML tool names in
ConfigureOptions.cs (e.g.,
`--runtime.mcp.dml-tools.describe-entities.enabled` is now
`runtime.mcp.dml-tools.describe-entities`).
Bulk toggle (`--runtime.mcp.dml-tools.enabled`)

## How was this tested?

- [ ] Integration Tests
- [x] Unit Tests

## Sample Request(s)

Fixed: direct boolean, matches schema
`dab configure --runtime.mcp.dml-tools.describe-entities true`

Multiple tools
`dab configure --runtime.mcp.dml-tools.describe-entities true
--runtime.mcp.dml-tools.create-record false`
## What

- Closes on #3410

Adds missing CLI options and fixes schema issues for `dab configure`,
`dab add`, and `dab update` commands.

## Issues Fixed

| Issue | Description | Fix Location |
|-------|-------------|-------------|
| #3337 | Missing `runtime.pagination.max-page-size` | ConfigureOptions,
ConfigGenerator |
| #3338 | Missing `runtime.pagination.default-page-size` |
ConfigureOptions, ConfigGenerator |
| #3339 | Missing `runtime.pagination.next-link-relative` |
ConfigureOptions, ConfigGenerator |
| #3340 | Missing `runtime.host.max-response-size-mb` |
ConfigureOptions, ConfigGenerator |
| #3341 | Missing `runtime.health.*` (enabled, cache-ttl-seconds,
max-query-parallelism, roles) | ConfigureOptions, ConfigGenerator |
| #3342 | Missing `data-source-files` | ConfigureOptions,
ConfigGenerator |
| #3343 | Missing `runtime.telemetry.log-level` | ConfigureOptions,
ConfigGenerator |
| #3377 | `--cache.ttl` should be `--cache.ttl-seconds` | EntityOptions
|
| #3383 | Missing `data-source.user-delegated-auth.provider` |
ConfigureOptions, ConfigGenerator |
| #3384 | Missing `data-source.health.threshold-ms` | ConfigureOptions,
ConfigGenerator |
| #3385 | Missing `data-source.health.enabled` | ConfigureOptions,
ConfigGenerator |
| #3386 | Dup of #3339 | (same fix) |
| #3387 | Dup of #3340 | (same fix) |
| #3388 | Missing entity `health.enabled` | EntityOptions, Utils,
ConfigGenerator |
| #3389 | Missing entity `cache.level` | EntityOptions, Utils,
ConfigGenerator |
| #3390 | Schema `object-description` to `description` |
dab.draft.schema.json |
| #3395 | `cosmosdb_postgresql` missing from help text |
ConfigureOptions |

- **ConfigureOptions.cs** - 15 new options
- **EntityOptions.cs** - Renamed `cache.ttl` to `cache.ttl-seconds`;
added `cache.level`, `health.enabled`
- **AddOptions.cs / UpdateOptions.cs** - Pass new entity params
- **ConfigGenerator.cs** - Processing for all new options in configure,
add, update flows
- **Utils.cs** - Updated `ConstructCacheOptions`; added
`ConstructEntityHealthOptions`
- **dab.draft.schema.json** - Renamed `object-description` to
`description`

## Tests

- [x] Unit tests
- New tests added
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

This cherry-pick backports a set of CLI option/schema alignment fixes from main into release/2.0, primarily to ensure dab init, dab configure, dab add, and dab update produce config that matches the expected nested runtime config structure and schema.

Changes:

  • Renames the dab init GraphQL multiple-create flag to the correct nested option name (--graphql.multiple-mutations.create.enabled) and updates references/tests.
  • Fixes dab configure individual MCP DML tool option names by removing the erroneous .enabled suffix, and adds several missing configure options (pagination, runtime health, host max response size, telemetry log-level, data-source files, etc.).
  • Extends entity add/update support for new entity options (cache.ttl-seconds, cache.level, health.enabled) and updates unit/E2E tests accordingly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Cli/Utils.cs Updates entity cache option construction (ttl-seconds + cache level) and adds entity health option construction.
src/Cli/ConfigGenerator.cs Wires new CLI options into config generation/merge logic (entity cache/health, runtime pagination/health, telemetry log-level, host max response size, datasource health/provider/files).
src/Cli/Commands/InitOptions.cs Renames the init flag to graphql.multiple-mutations.create.enabled.
src/Cli/Commands/ConfigureOptions.cs Adds missing configure flags and fixes MCP DML tool option names (removes .enabled).
src/Cli/Commands/EntityOptions.cs Renames entity cache ttl option to cache.ttl-seconds and adds cache.level + health.enabled.
src/Cli/Commands/AddOptions.cs Plumbs new entity cache/health args through add command options.
src/Cli/Commands/UpdateOptions.cs Plumbs new entity cache/health args through update command options.
src/Cli.Tests/InitTests.cs Updates init tests to use the renamed multiple-mutations option.
src/Cli.Tests/EndToEndTests.cs Updates init E2E args and adds an E2E test covering the corrected MCP DML tool option names.
src/Cli.Tests/AddEntityTests.cs Updates add-entity tests for renamed cache ttl option and new parameters.
src/Cli.Tests/UpdateEntityTests.cs Updates update-entity tests for renamed cache ttl option; adds coverage for cache level + entity health enabled.
src/Cli.Tests/ConfigureOptionsTests.cs Adds unit tests for new configure options (pagination, runtime health, host max response size, datasource files/health/provider, telemetry log-level).
schemas/dab.draft.schema.json Renames object-description to description within the source object schema.
config-generators/mssql-commands.txt Updates generated init command to use --graphql.multiple-mutations.create.enabled.

Comment thread src/Cli/ConfigGenerator.cs
Comment thread src/Cli/ConfigGenerator.cs
Comment thread src/Cli/Utils.cs
Comment thread src/Cli/Utils.cs
Comment thread src/Cli/Commands/EntityOptions.cs
Comment thread src/Cli.Tests/ConfigureOptionsTests.cs
@RubenCerna2079 RubenCerna2079 enabled auto-merge (squash) May 6, 2026 22:19
@RubenCerna2079 RubenCerna2079 merged commit 964e415 into release/2.0 May 6, 2026
12 checks passed
@RubenCerna2079 RubenCerna2079 deleted the cherry-pick/release-2.0/cli-structure-fixes branch May 6, 2026 22:28
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Data API builder May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0 🍒Cherrypick Cherry-picking another commit/PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants