[ManagedCleanroom] Add --subdirectory parameter for dataset publish#9852
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| managedcleanroom frontend analytics dataset publish | cmd managedcleanroom frontend analytics dataset publish added parameter subdirectory |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
| ) | ||
| raise CLIError(f"CPK encryption mode requires: {missing_cpk_params}") | ||
|
|
||
| # Validate subdirectory is not used with CPK encryption mode |
There was a problem hiding this comment.
Dont add this check here. service side validation is sufficient
| --collaboration-id my-collab-123 \ | ||
| --document-id my-dataset \ | ||
| --body @dataset-config.json | ||
| - name: Publish a dataset using SSE encryption mounted at a subdirectory |
There was a problem hiding this comment.
lets not make it SSE explicit here.
| 'subdirectory', | ||
| options_list=['--subdirectory'], | ||
| help='Optional subdirectory/prefix inside the storage container ' | ||
| 'to mount. Not supported with CPK encryption mode.') |
There was a problem hiding this comment.
Keep it generic, when the limitation is removed then we can just update the service code and az cli need not change.
f1b4d3a to
8f8266c
Compare
8f8266c to
413154b
Compare
Adds support for mounting a subdirectory/prefix inside the storage container when publishing analytics datasets, providing parity with the upstream cleanroom extension's blobfuse subdirectory feature. Changes: * Added --subdirectory parameter to `az managedcleanroom frontend analytics dataset publish`. * The new field is propagated into the request body's `store.subdirectory` property only when set. * Added validation: --subdirectory combined with --encryption-mode CPK raises a CLIError, matching the service-side restriction in the cleanroom-side schema and reference CLI. * Updated the auto-generated `analytics_frontend_api` SDK JSON dict templates (sync + async operations) to include `subdirectory` after `awsCgsSecretId`. The change matches what a fresh autorest regen produces from the updated frontend.yaml; only the substantive subdirectory delta is included to avoid unrelated cosmetic churn from the team's SDK post-processing. * Added unit tests covering: subdirectory propagation in SSE mode, default omission when not provided, and CPK rejection. * Updated _help.py with the new parameter doc entry and an example showing SSE publish with --subdirectory. * Bumped extension version 1.0.0b5 -> 1.0.0b6 and added HISTORY.rst entry. Validation: * azdev style managedcleanroom: PASSED (pylint + flake8) * python scripts/ci/test_index.py -q: OK * All 57 unit tests pass (3 new subdirectory tests included).
413154b to
264b44b
Compare
|
@necusjz please review |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ managedcleanroom-1.0.0b7 ] : https://dev.azure.com/msazure/One/_build/results?buildId=163371162&view=results |
Related command
az managedcleanroom frontend analytics dataset publishDescription
Adds a new --subdirectory parameter to the dataset publish command, providing parity with the upstream cleanroom extension's blobfuse subdirectory feature. The new field lets data owners restrict the mounted blobfuse view to a subtree of the storage container (e.g. year=2026/month=05) instead of mounting the entire container.
Changes
_params.py— Adds the --subdirectory argument to the managedcleanroom frontend analytics dataset publish argument context._frontend_custom.py— Accepts the new parameter and propagates it into the request body's store.subdirectory property when set. Encryption-mode compatibility is enforced by the service, so no CLI-side restriction is added — this keeps the CLI forward-compatible with future service-side relaxations without requiring an extension update._help.py— Documents the new parameter and adds an example showing dataset publish with --subdirectory.analytics_frontend_api/operations/_operations.py+aio/operations/_operations.py— Auto-generated SDK updated to includesubdirectoryin thestoreJSON dict templates (sync + async). The change matches what a fresh autorest regen produces from the updated upstreamfrontend.yaml; only the substantive subdirectory delta is included to avoid unrelated cosmetic churn from the team's SDK post-processing.tests/latest/test_frontend_dataset.py— Two new unit tests:test_publish_dataset_with_subdirectory — verifies subdirectory propagation into the request body's store.
test_publish_dataset_subdirectory_default_omitted — verifies the field is omitted when not provided.
HISTORY.rst— Added1.0.0b6changelog entry.setup.py— Bumped extension version1.0.0b5→1.0.0b6.Validation
azdev style managedcleanroom— Pylint + Flake8 PASSEDpython scripts/ci/test_index.py -q— OKGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdev required)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0 required)About CLI version requirement
analytics_frontend_apiSDK with raw JSON request body path)CLI Version Requiredand have you updatedazext_metadata.jsonin your extension to refer to a new CLI core version?About Extension Publish
setup.py?HISTORY.rst?src/index.jsonis auto-updated post-merge — not modified in this PR.