Add missing CLI options for dab configure, add, and update#3409
Add missing CLI options for dab configure, add, and update#3409souvikghosh04 wants to merge 10 commits intomainfrom
Conversation
Adds 15 new dab configure options (pagination, health, host max-response-size, data-source-files, data-source health, user-delegated-auth provider, telemetry log-level), renames cache.ttl to cache.ttl-seconds, adds entity-level cache.level and health.enabled options, renames schema source.object-description to source.description, and updates cosmosdb_postgresql in help text. Includes unit tests for all new options. Fixes #3337 #3338 #3339 #3340 #3341 #3342 #3343 #3377 #3383 #3384 #3385 #3386 #3387 #3388 #3389 #3390 #3395
There was a problem hiding this comment.
Pull request overview
This PR closes CLI coverage gaps by adding missing dab configure, dab add, and dab update options so more runtime/entity configuration can be set via CLI and correctly reflected in generated runtime config.
Changes:
- Added new
dab configureoptions for runtime pagination, runtime health, host max response size, telemetry log-level, data-source health, user-delegated-auth provider, anddata-source-files. - Extended
dab add/updateentity options to supportcache.levelandhealth.enabled, and renamedcache.ttltocache.ttl-seconds. - Updated config generation/merge logic and schema property naming (
source.object-description→source.description).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Cli/Utils.cs | Extends entity cache option construction to include cache level; adds entity health option construction. |
| src/Cli/ConfigGenerator.cs | Wires new CLI options into add/update/configure flows and merges them into RuntimeConfig. |
| src/Cli/Commands/ConfigureOptions.cs | Adds new configure CLI options and updates database-type help text. |
| src/Cli/Commands/EntityOptions.cs | Adds --cache.level, --health.enabled, renames --cache.ttl to --cache.ttl-seconds. |
| src/Cli/Commands/AddOptions.cs | Plumbs new entity options into dab add. |
| src/Cli/Commands/UpdateOptions.cs | Plumbs new entity options into dab update. |
| src/Cli.Tests/ConfigureOptionsTests.cs | Adds test coverage for new configure options. |
| src/Cli.Tests/UpdateEntityTests.cs | Adds test coverage for updating entity cache level and health enabled. |
| src/Cli.Tests/AddEntityTests.cs | Updates test option construction for new entity option parameters. |
| schemas/dab.draft.schema.json | Fixes schema property name under entity source object. |
…, validate inputs - Use EntityCacheOptions constructor instead of 'with' to set UserProvided* flags - Preserve existing entity cache on update when no cache options provided - Use PaginationOptions constructor for validation and UserProvided flags - Auto-set health enabled=true when any health sub-option is provided - Create new dictionary copy for telemetry log-level merge (immutability) - Reject empty namespace keys in --runtime.telemetry.log-level input - Add test for empty namespace rejection
…ostgreSQL, rename pagination variable - Rename CacheTtl property/param to CacheTtlSeconds in EntityOptions, AddOptions, UpdateOptions, Utils, ConfigGenerator, and tests to match the CLI option name cache.ttl-seconds - Remove CosmosDB_PostgreSQL from configure --database-type HelpText since it is not a confirmed supported database type - Rename 'existing' local variable to 'currentPagination' in ConfigGenerator.cs for clarity
RubenCerna2079
left a comment
There was a problem hiding this comment.
LGTM! Approving assuming comment will be addressed.
|
Can you also add the newly supported commands which you have added on top of each test, to the PR description? |
|
Do we know why so many options were missing from the CLI? |
| @@ -1590,5 +1590,275 @@ public void TestUpdateUserDelegatedAuthDatabaseAudience() | |||
| Assert.AreEqual(true, (bool?)userDelegatedAuthSection["enabled"]); | |||
| Assert.AreEqual("EntraId", (string?)userDelegatedAuthSection["provider"]); | |||
| } | |||
There was a problem hiding this comment.
Tests look great, can we add a small set of negative tests for documented ranges (page sizes < 1, threshold-ms <= 0, max-query-parallelism outside 1–8) + invalid telemetry level token (e.g. Default:NotALevel) to lock validation behavior?
|
Looks good to me. I’ve added a few comments that would be helpful to discuss or address. I don’t want to hold up this PR because of them, but please make sure to resolve and close those comments. |
What
Adds missing CLI options and fixes schema issues for
dab configure,dab add, anddab updatecommands.Issues Fixed
runtime.pagination.max-page-sizeruntime.pagination.default-page-sizeruntime.pagination.next-link-relativeruntime.host.max-response-size-mbruntime.health.*(enabled, cache-ttl-seconds, max-query-parallelism, roles)data-source-filesruntime.telemetry.log-level--cache.ttlshould be--cache.ttl-secondsdata-source.user-delegated-auth.providerdata-source.health.threshold-msdata-source.health.enabledhealth.enabledcache.levelobject-descriptiontodescriptioncosmosdb_postgresqlmissing from help textcache.ttltocache.ttl-seconds; addedcache.level,health.enabledConstructCacheOptions; addedConstructEntityHealthOptionsobject-descriptiontodescriptionTests