Skip to content

WO Release/april2026#9799

Open
atharvau wants to merge 65 commits intoAzure:mainfrom
manaswita-chichili:release/april2026
Open

WO Release/april2026#9799
atharvau wants to merge 65 commits intoAzure:mainfrom
manaswita-chichili:release/april2026

Conversation

@atharvau
Copy link
Copy Markdown
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Atharva and others added 30 commits April 14, 2026 11:03
Add --init-extended-location, --init-context, --init-hierarchy, --service-group,
and --release-train flags to 'az workload-orchestration target create' to reduce
onboarding from 15+ manual steps to a single command.

New commands:
- target prepare: Prepares Arc cluster (cert-mgr, trust-mgr, extension, CL)
- hierarchy create: Creates site hierarchy (SG, Site, Config, SiteRef)

Pre-operation hooks in target create:
1. --init-extended-location: calls target_prepare to set up cluster + CL
2. --init-context: discovers/creates WO context with capability injection
3. --init-hierarchy: creates site hierarchy linked to context
4. Default target-specification: injects Helm v3 in-cluster if not provided

Post-operation hook:
5. --service-group: links target to a service group after creation

8 flag combinations supported (from vanilla to full onboarding).
Includes unit tests for hierarchy, SG link, utils, and target prepare.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extract _handle_init_context (150 lines) → context_init.py
- Extract _handle_init_hierarchy (100 lines) → hierarchy_init.py
- Add parse_arm_id() to utils.py (replaces 6 inline ARM ID parsers)
- Add invoke_silent() to utils.py (replaces 4 stdout suppression blocks)
- Use DEFAULT_TARGET_SPECIFICATION from consts.py
- _create.py custom code: 400 lines → 60 lines (orchestration only)
- Each onboarding module now has a single clear responsibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move context_id config resolution before --init-hierarchy (hierarchy
  needs context_id for site-reference linking)
- Extract _resolve_context_id_from_config() for clarity
- Fix hierarchy_init.py sub_id: parse from context_id ARM ID or fall
  back to CLI Profile instead of cli_ctx.data (which returns None)

Tested: all 7 flag combinations pass on live AKS cluster

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The cluster preparation logic is now only accessible via
'target create --init-extended-location'. The underlying target_prepare
module is retained as an internal dependency.

Removed from: commands.py, _params.py, _help.py, custom.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hierarchy creation is now only accessible via 'target create --init-hierarchy'.
The underlying modules are retained as internal dependencies.

Removed from: commands.py, _params.py, _help.py, custom.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix --release-train help text: 'dev' -> 'stable' to match DEFAULT_RELEASE_TRAIN
- Remove unused imports: PropertyMock from test_target_prepare, json/call from test_sg_link_and_utils
- Fix hierarchy_create.py docstring: remove claim about updating capabilities
- Preserve tags in target_sg_link refresh PUT to avoid dropping metadata

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t flags from target create

- Remove --init-extended-location, --init-context, --init-hierarchy, --release-train from target create
- Add 'target init' as standalone command (wraps target_prepare)
- Keep --service-group and default target-spec on target create
- Aligns with team decision: cluster setup and hierarchy as separate commands

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implements 'az workload-orchestration target deploy' that chains
review, publish, and install into a single command with LRO polling.

- Supports --skip-review and --skip-install flags
- Supports --config-file for pre-review configuration
- Uses send_raw_request with ARM resource auth
- Polls LRO via Location/Azure-AsyncOperation headers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add --solution-template-name + --solution-template-version (friendly name)
  as alternative to --solution-template-version-id (ARM ID)
- Add --solution-template-rg for cross-RG templates
- Add --resume-from publish|install with --solution-version-id
- Add --solution-dependencies pass-through to review
- Add --config for pre-review configuration set
- Proper mutual exclusivity validation between ARM ID and friendly name
- Dynamic step counter adjusts based on active steps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The review LRO response nests the solution version ARM ID at
properties.id, not properties.properties.id or the top-level id.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Config set needs --solution flag to use solution templates (not config templates)
- Improved solutionVersionId extraction debug logging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove --skip-review, --skip-install, --no-wait from target deploy
- Fix disallowed HTML tags in help (wrap placeholders in backticks)
- Add short aliases: --stv-id, --stv, --ct-version for long options
- Remove --no-wait example from help

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove 'Next steps' and 'Extended Location JSON' print lines
- Keep diagnostic summary and success message
- CLI framework already prints the return dict as JSON

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Counter now increments only on step start, not on status update.
Shows [1/3]...[1/3] OK, [2/3]...[2/3] OK, [3/3]...[3/3] OK.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep it only on error paths for debugging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When --site-id is provided, automatically creates a site-reference
linking the site to the context after creation. Site reference name
is derived from the site name (e.g., mySite -> mySite-ref).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…deploy

Users can use individual commands (target review/publish/install) for
partial operations. Deploy is now always a full chain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
target install now supports two flows:
1. Full deploy: --solution-template-name + --stv (or --stv-id)
   Runs: config-set (opt) → review → publish → install
2. Direct install: --solution-version-id (old flow)
   Runs: install only

Removed: target deploy command, _params, _help, commands.py registration.
Kept: target_deploy.py module (used internally by install pre_operations).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…late

Config-set now auto-derives template info from solution template args:
  config-template-rg → solution-template-rg or --resource-group
  config-template-name → solution-template-name
  config-template-version → solution-template-version

Usage simplified to:
  az wo target install -g rg -n target --solution-template-name X --stv 1.0.0 --configuration values.yaml

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Better reflects the command's purpose - it prepares the cluster,
not a specific target.

Command: az workload-orchestration cluster init -c cluster -g rg -l region

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per Shubham's feedback: don't touch --target-specification.
Upcoming non-K8s workloads may change this, marked as future work.
Users must provide --target-specification explicitly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Solution templates can be in any RG, so friendly name resolution
uses the target's --resource-group. For cross-RG templates, use
the full ARM ID via --solution-template-version-id.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removed --stv-id and --stv aliases. Use full names:
  --solution-template-version-id
  --solution-template-version

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removed:
- --skip-cert-manager, --skip-trust-manager
- --kube-config, --kube-context
- Failed extension auto-reinstall logic

Kept args: -c, -g, -l, --release-train, --extension-version,
--extension-name, --custom-location-name

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Creates full resource stack in one command:
  1. Site (with level label)
  2. Configuration (in specified region)
  3. ConfigurationReference (links site to config)

Supports:
  - ResourceGroup: single site via --resource-group + shorthand/YAML
  - ServiceGroup: nested hierarchy up to 3 levels via YAML file

Usage:
  az wo hierarchy create -g rg --configuration-location eastus2euap --hierarchy-spec 'name=X level=factory'
  az wo hierarchy create --configuration-location eastus2euap --hierarchy-spec hierarchy.yaml

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onfigs

- ResourceGroup flow: Site + Config + ConfigRef (3 resources)
- ServiceGroup flow: recursive SG + Site + Config + ConfigRef (up to 3 levels, 12 resources)
- Configs are always RG-scoped (--resource-group required)
- RBAC propagation wait after each SG creation (polls site list)
- Removed old hierarchy_create.py, using clean v2

E2E tested: 3-level SG hierarchy created successfully.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… from target install

These are review-specific args. Users can use standalone 'target review'
for advanced scenarios. Keeps target install clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Atharva and others added 8 commits April 21, 2026 11:36
Errors now show only what failed, no verbose suggestions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- post_operations prints └── Install ✓ when deploy chain finishes
- Removed premature Install... line from pre_install
- Shows ✅ Deployment complete message

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 12 retries x 10s = 120s max wait per SG level
- Fail with clear message instead of silently continuing
- Tested: 2-level SG hierarchy succeeds on first try

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shows tree-style progress when auto-creating site reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BUG-001: When target and ST are in different RGs, config-set
was using the target's RG instead of the ST's RG.

Fix: ct_rg = solution_template_rg or resource_group
(was: ct_rg = resource_group)

Tested: cross-RG install with --config → Config Set ✓ → Succeeded

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validates names before making REST calls:
- Pattern: alphanumeric + hyphens, 2-63 chars
- Recursively validates all children in SG hierarchy
- Prevents confusing API errors from broken URLs

BUG-002 (Low): Special chars in names gave MissingApiVersionParameter
Note: Server-side validation also catches this, this is defense-in-depth

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Apr 23, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

Atharva and others added 7 commits April 23, 2026 10:39
- _params.py: disable broad-exception-caught for YAML parse fallback
- hierarchy_create.py: move import sys to top, fix f-string without
  interpolation, fix line-too-long, fix blank lines, trailing newline
- target_deploy.py: fix blank lines after function def, trailing newline
- target_prepare.py: fix blank lines, unused-argument suppress, trailing newline
- utils.py: move import sys to top, remove local reimports

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Install cert-manager + trust-manager exclusively via the AIO platform
Arc extension (microsoft.iotoperations.platform, --name aio-certmgr),
matching the official MS Learn doc. Removes all helm/kubectl fallback
code paths and associated CLI flags.

Removed flags:
  --cert-manager-install-mode
  --trust-manager-version
  --storage-class
  --storage-size
  --skip-cert-manager
  --skip-trust-manager

Remaining flags (7):
  -c/--cluster-name, -g/--resource-group, -l/--location,
  --release-train, --extension-version, --extension-name,
  --custom-location-name, --cert-manager-version

Simplifications:
- consts.py: dropped helm/kubectl/manifest/webhook/mode constants
- target_prepare.py: removed _ensure_cert_manager/_ensure_trust_manager/
  _run_kubectl/_run_command/_is_helm_available; single AIO install path
- _ensure_wo_extension: auto-detects storage class, uses 20Gi default
- Verified live on cluster audapure-ob-fresh2 (fresh install)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The option --local-connected-registry-ip exceeds the 22-char threshold
for option_length_too_long but has no meaningful shorter abbreviation.
Adding rule_exclusion so azdev linter passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@atharvau
Copy link
Copy Markdown
Member Author

@necusjz can u pls run /azp run

Atharva and others added 6 commits April 24, 2026 10:59
Replace the specific --cert-manager-version parameter on cluster init with a
generic --extension-dependency-version that accepts key=value pairs (e.g.,
iotplatform=1.6.1). This decouples the CLI surface from specific dependency
names so the CLI doesn't need to change when dependencies evolve.

Changes:
- _params.py: New --extension-dependency-version arg with nargs='+'
- __init__.py: Add _parse_dependency_versions() with strict validation
  (unknown keys, missing =, empty version, duplicates all rejected)
- consts.py: Add EXTENSION_DEPENDENCIES registry mapping iotplatform
  to microsoft.iotoperations.platform extension
- _help.py: Update example to show new syntax
- linter_exclusions.yml: Add exclusion for long option name

Internally routes iotplatform=X to the existing cert_manager_version
parameter in target_prepare(), so no changes needed downstream.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Azure CLI shorthand syntax

Replaces two hand-rolled parsers with Azure CLI's built-in AAZ shorthand
syntax parser, bringing our hand-written commands in line with the
conventions at https://learn.microsoft.com/cli/azure/use-azure-cli-successfully-shorthand.

What changed:
- New onboarding/_shorthand.py wraps AAZShortHandSyntaxParser.
  Precedence: @file (JSON/YAML) -> partial value (key=value) ->
  strict JSON -> AAZ shorthand ({k:v}) -> YAML content.
- --extension-dependency-version: dropped nargs='+' custom parser; now
  accepts iotplatform=1.6.1, {iotplatform:1.6.1}, or @deps.json.
- --hierarchy-spec: removed fragile _parse_hierarchy_spec (YAML detection
  heuristic + space-shorthand). Single path: @file.yaml, @file.json, or
  inline {name:X,level:Y}.
- Dropped dead isinstance check in hierarchy_create.
- Updated help examples.

Tests: 22/22 end-to-end pass via real az CLI, including all happy-path
shorthand forms, validation failures (unknown key, empty value, duplicate
key, non-object, missing file), old --cert-manager-version flag rejection,
and a real cluster init smoke test on audapure-ob-fresh2 with all three
input forms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- hierarchy_create.py: reject dict form for 'children' at parse time;
  valid forms are YAML '- name: X' list entries or JSON/shorthand '[{...}]'
- Removed dict-branch handling in _create_sg_level and _count_nodes
- Updated docstring/examples to show list form for children
- Added test-e2e-full.ps1: 26 checks covering help, flag removal,
  parser validation, children-must-be-list, and real RG+SG hierarchy
  creation on live Azure (26/26 pass)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…arsing

- Add hand-authored AAZ command classes in aaz/latest/workload_orchestration/
  (cluster/_init.py, hierarchy/_create.py) that delegate to existing
  orchestration functions (target_init, _hierarchy_create).
- Azure CLI's native AAZShortHandSyntaxParser now handles all parsing
  (shorthand, @file, strict JSON, YAML fallback, partial-value, ??).
- Remove custom _shorthand.py adapter (no longer needed).
- Rewrite onboarding/__init__.py: _validate_dependency_versions now
  validates the pre-parsed dict from AAZ against EXTENSION_DEPENDENCIES.
- Remove corresponding knack registrations from commands.py, _params.py,
  _help.py. AAZ docstrings generate help automatically.
- Add linter exclusion for extension_dependency_version (attr-name form).
- Update E2E test assertions to match AAZ native error messages.
- support create-bundle is UNCHANGED.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…name} in custom_location_name help

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…shim

cluster init now supports 3 optional overrides for the generated custom
location: --custom-location-name, --custom-location-resource-group,
--custom-location-location. All three default to sensible values
({cluster}-cl, --resource-group, --location respectively) and are
threaded from the AAZ command schema through target_init/target_prepare
into _ensure_custom_location.

Removed the in-process @file shim attempt. Azure CLI core expands @file
before any extension loads, so YAML content reaches AAZ's shorthand
parser as raw text and fails. This is an inherent AAZ + CLI core
interaction; documented the supported forms (bare path, inline
shorthand, key=value partial value, @file.json) and updated docstring
examples + the E2E harness to match.

Also removed the 'After running this command...' line from cluster init
help and fixed a stale E2E assertion.

E2E: 26/26 pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 24, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

Atharva and others added 2 commits April 24, 2026 19:56
…ake8 W391)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@atharvau atharvau force-pushed the release/april2026 branch from f220727 to 8871921 Compare April 26, 2026 06:12
…et install

Use friendly-name args (--solution-template-name + --solution-template-version)

exclusively. Cross-RG support is provided via --solution-template-rg, which

defaults to the target's resource group. Simplifies the deploy chain and

removes redundant ARM-ID flag.

- _install.py: remove arg, rebind -v short flag to --solution-template-version

- target_deploy.py: simplify _resolve_template_version_id to friendly-name only

- onboarding/__init__.py: update wrapper signature

- HISTORY.rst: changelog

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

5 participants