Skip to content

feat: extract azure-diagnostics dump-everything blocks into scripts - #2935

Merged
Tom Meschter (tmeschter) merged 8 commits into
microsoft:mainfrom
tmeschter:tmeschter-azure-diagnostics-scripts
Aug 6, 2026
Merged

feat: extract azure-diagnostics dump-everything blocks into scripts#2935
Tom Meschter (tmeschter) merged 8 commits into
microsoft:mainfrom
tmeschter:tmeschter-azure-diagnostics-scripts

Conversation

@tmeschter

Copy link
Copy Markdown
Member

Summary

Resolves #2509.

Replaces the two inline "dump everything" diagnostic blocks in the azure-diagnostics skill with maintained, cross-platform scripts.

Previously both per-service references shipped a single inlined bash block chaining several az calls with && and labeled echo separators. These are now extracted into .sh + .ps1 scripts under the skill's scripts/ folder, following the existing azure-quotas convention.

Changes

  • New scripts in plugin/skills/azure-diagnostics/scripts/:
    • containerapp-diagnostics.{sh,ps1} — labels & collects revisions, registry config, ingress config, recent logs (--tail 20)
    • appservice-diagnostics.{sh,ps1} — labels & collects app config, recent deployments, app settings (names), custom domains
    • Args: --name/-Name and --resource-group/-ResourceGroup (bash also accepts positional args and an optional --subscription)
    • Each prints a leading/trailing summary line describing what it collected. Scripts only collect and label — interpreting the output stays the agent's job in prose.
  • Updated references: container-apps/README.md and app-service/README.md now link to the scripts (markdown links) with PowerShell and bash sample invocations instead of the inline blocks.

Behavior

Script behavior is intentionally identical to the original inline blocks (same az queries, same --query projections). The Azure CLI defaults to JSON output, so no explicit -o json was added.

Validation

  • npm run build
  • npm run frontmatter (built output) ✅
  • npm run references ✅ — 26 skills pass, scripts properly linked, no orphaned/escaped references
  • npm run tokens compare — no azure-diagnostics regressions
  • Bash -n + PowerShell parser syntax checks — all 4 scripts OK

Note: the eval suite (evals/azure-diagnostics/eval.yaml) and former integration tests only exercise skill routing/invocation, not script execution, so they're unaffected.

Replace the inline chained 'dump everything' diagnostic blocks in the container-apps and app-service references with maintained, cross-platform scripts (.sh + .ps1) under the skill's scripts/ folder. Scripts collect and label diagnostic sections (config, revisions/deployments, recent logs, etc.) and print a summary line; interpretation stays in agent prose. READMEs now link to the scripts with sample invocations.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
The Azure CLI already defaults to JSON output, and the original inline block did not specify -o json. Removing it keeps the script's behavior identical to the original.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the azure-diagnostics skill documentation to replace the previously inlined “dump everything” Azure CLI command blocks with maintained, cross-platform diagnostic scripts under the skill’s scripts/ folder.

Changes:

  • Adds bash + PowerShell diagnostic scripts for Container Apps and App Service that collect and label relevant az outputs.
  • Updates the Container Apps and App Service reference docs to link to the new scripts and provide sample invocations.
  • Preserves the “collect + label only” approach (no interpretation) while reducing inline command complexity in the references.
Show a summary per file
File Description
plugin/skills/azure-diagnostics/scripts/containerapp-diagnostics.sh New bash script to collect Container App revisions/config/logs.
plugin/skills/azure-diagnostics/scripts/containerapp-diagnostics.ps1 New PowerShell script to collect Container App revisions/config/logs.
plugin/skills/azure-diagnostics/scripts/appservice-diagnostics.sh New bash script to collect App Service config/deployments/settings/domains.
plugin/skills/azure-diagnostics/scripts/appservice-diagnostics.ps1 New PowerShell script to collect App Service config/deployments/settings/domains.
plugin/skills/azure-diagnostics/references/container-apps/README.md Replaces inline combined block with links + examples for the new scripts.
plugin/skills/azure-diagnostics/references/app-service/README.md Replaces inline combined block with links + examples for the new scripts.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread plugin/skills/azure-diagnostics/scripts/containerapp-diagnostics.sh
Comment thread plugin/skills/azure-diagnostics/scripts/appservice-diagnostics.sh
Comment thread plugin/skills/azure-diagnostics/scripts/appservice-diagnostics.ps1 Outdated
Comment thread plugin/skills/azure-diagnostics/scripts/containerapp-diagnostics.ps1 Outdated
Bash: validate that a value follows each flag (clear error instead of set -u 'unbound variable') and reject unknown options instead of silently treating typos as positional args. PowerShell: drop [Parameter(Mandatory)] (which prompts interactively when omitted) in favor of an explicit check that errors and exits early in non-interactive scenarios.

Addresses review comments on PR microsoft#2935.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
Adds a vally response-quality eval (evals/azure-diagnostics/script-invocation.eval.yaml) with two stimuli that check the agent both routes to azure-diagnostics and asks to run the bundled containerapp-diagnostics / appservice-diagnostics script (via a tool-calls grader on the shell command). Mirrors the existing azure-quotas check-quota pattern. Does not require live Azure resources — it grades the script invocation, not its output.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
Comment thread evals/azure-skills/azure-diagnostics/script-invocation.eval.yaml Outdated
The agent invokes the bundled diagnostic script but the run is aborted at that tool call, so the script is never actually executed. Drops the completed grader (forbidden alongside earlyTerminate).

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
Relocate diagnostics scripts and script-invocation eval into the new multi-plugin layout (plugins/azure-skills/, evals/azure-skills/).

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
Per-stimulus runs override is a no-op today (microsoft/vally#430); move runs:1 to defaults and drop the ineffective per-stimulus overrides.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
Comment thread evals/azure-skills/azure-diagnostics/script-invocation.eval.yaml Outdated
The built-in tool-calls grader only counts a required match when it sees the tool_result (execution_complete). Terminating at tool-call-match (execution_start) left a dangling tool_call the grader could not match, so switch both stimuli to tool-call-result. The bundled scripts are read-only az queries that no-op without resources, so running them once is harmless and the run still aborts immediately after.

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

Copilot-Session: 32539c36-dd02-4771-af34-815fa2324edd
@tmeschter
Tom Meschter (tmeschter) merged commit c7dcc3d into microsoft:main Aug 6, 2026
12 checks passed
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.

Replace azure-diagnostics skill combined dump-everything diagnostic blocks with scripts

4 participants