Skip to content

feat(azure.ai.agents): display metadata in connection show output#8400

Merged
trangevi merged 2 commits into
mainfrom
naman/connection-show-metadata
May 27, 2026
Merged

feat(azure.ai.agents): display metadata in connection show output#8400
trangevi merged 2 commits into
mainfrom
naman/connection-show-metadata

Conversation

@Nathandrake229

Copy link
Copy Markdown
Contributor

Summary

Fixes #8351

The connection show command was not displaying metadata key-value pairs in its table output. The metadata was already being fetched from the API and included in JSON output, but the table formatter (printDetail) was not rendering it.

This PR adds a Metadata section to the table output of azd ai agent connection show, displayed between the Target and Credentials sections. When no metadata exists, the section is cleanly omitted.

Changes

  • connection.go: Added metadata rendering block in printDetail() — iterates result.Metadata and prints each key-value pair with proper indentation
  • connection_test.go: Added 3 new tests:
    • TestPrintDetail_Metadata_TableOutput — verifies metadata appears in table format
    • TestPrintDetail_Metadata_OmittedWhenEmpty — verifies no metadata section when map is empty
    • TestPrintDetail_Metadata_JsonOutput — verifies metadata is included in JSON output

Before

Name:      GitHubMCP
Kind:      RemoteTool
Auth Type: OAuth2
Target:    https://api.githubcopilot.com/mcp

After

Name:      GitHubMCP
Kind:      RemoteTool
Auth Type: OAuth2
Target:    https://api.githubcopilot.com/mcp

Metadata:
  toolEntityId: azureml://...github-mcp-server/version/1
  type: catalog_MCP

Display connection metadata key-value pairs in both table and JSON
output for 'azd ai connection show'. Metadata was already fetched
from ARM but not rendered in table format.

Fixes #8351

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 12:46

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.

Copilot wasn't able to review any files in this pull request.

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Review may take a bit longer — reach out to @rajeshkamal5050 or @kristenwomack if you'd like to discuss prioritization.

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label May 27, 2026
@Nathandrake229 Nathandrake229 enabled auto-merge (squash) May 27, 2026 13:06
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@trangevi trangevi disabled auto-merge May 27, 2026 15:18
@trangevi trangevi enabled auto-merge (squash) May 27, 2026 15:18
@trangevi

Copy link
Copy Markdown
Member

/check-enforcer override

@trangevi trangevi merged commit 9a4a5dd into main May 27, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azd ai connection show doesn't show metadata of a connection

4 participants