Skip to content

Commit a6cc05a

Browse files
committed
WIP: ca876f4 [Release] Update index.json for extension [ containerapp ]
2 parents ab711ab + d51bb46 commit a6cc05a

File tree

216 files changed

+52400
-11898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+52400
-11898
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,5 @@
337337
/src/storage-discovery/ @shanefujs @calvinhzy
338338

339339
/src/aks-agent/ @feiskyer @mainred @nilo19
340+
341+
/src/migrate/ @saifaldin14

.github/workflows/TestTriggerExtensionRelease.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
build:
16-
name: Trigger Extension Release Pipeline
16+
name: Test Trigger Extension Release Pipeline
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden Runner
@@ -26,7 +26,7 @@ jobs:
2626
client-id: ${{ secrets.ADO_SP_ClientID }}
2727
tenant-id: ${{ secrets.ADO_SP_TenantID }}
2828
allow-no-subscriptions: true
29-
- name: Trigger ADO Pipeline and Wait for Completion
29+
- name: Test Trigger ADO Pipeline and Wait for Completion
3030
uses: azure/cli@v2
3131
env:
3232
ado-org: ${{secrets.ADO_ORGANIZATION}}
@@ -89,7 +89,7 @@ jobs:
8989
exit 1
9090
fi
9191
92-
# Wait 30 seconds before checking again
93-
echo "Build still running... waiting 30 seconds"
94-
sleep 30
92+
# Wait 60 seconds before checking again
93+
echo "Build still running... waiting 60 seconds"
94+
sleep 60
9595
done

.github/workflows/TriggerExtensionRelease.yml

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
client-id: ${{ secrets.ADO_SP_ClientID }}
2727
tenant-id: ${{ secrets.ADO_SP_TenantID }}
2828
allow-no-subscriptions: true
29-
- name: Azure CLI
29+
- name: Trigger ADO Pipeline and Wait for Completion
3030
uses: azure/cli@v2
3131
env:
3232
ado-org: ${{secrets.ADO_ORGANIZATION}}
@@ -35,4 +35,61 @@ jobs:
3535
commit-id: ${{ github.sha }}
3636
with:
3737
inlineScript: |
38-
az pipelines build queue --definition-id ${{ env.ado-pipeline-id }} --organization ${{ env.ado-org }} --project ${{ env.ado-project }} --variables commit_id=${{ env.commit-id }}
38+
# Trigger the pipeline and capture the build ID
39+
echo "Triggering ADO pipeline..."
40+
BUILD_RESULT=$(az pipelines build queue \
41+
--definition-id ${{ env.ado-pipeline-id }} \
42+
--organization ${{ env.ado-org }} \
43+
--project ${{ env.ado-project }} \
44+
--variables commit_id=${{ env.commit-id }} \
45+
--output json)
46+
47+
BUILD_ID=$(echo $BUILD_RESULT | jq -r '.id')
48+
echo "Pipeline triggered with Build ID: $BUILD_ID"
49+
50+
if [ "$BUILD_ID" = "null" ] || [ -z "$BUILD_ID" ]; then
51+
echo "Failed to get build ID from pipeline trigger"
52+
exit 1
53+
fi
54+
55+
# Wait for the build to complete
56+
echo "Waiting for build $BUILD_ID to complete..."
57+
while true; do
58+
BUILD_JSON=$(az pipelines build show \
59+
--id $BUILD_ID \
60+
--organization ${{ env.ado-org }} \
61+
--project ${{ env.ado-project }} \
62+
--output json)
63+
64+
BUILD_STATUS=$(echo "$BUILD_JSON" | jq -r '.status')
65+
BUILD_RESULT_STATUS=$(echo "$BUILD_JSON" | jq -r '.result // "none"')
66+
67+
echo "Current status: $BUILD_STATUS, Result: $BUILD_RESULT_STATUS"
68+
69+
# Check if build is completed
70+
if [ "$BUILD_STATUS" = "completed" ]; then
71+
echo "Build completed with result: $BUILD_RESULT_STATUS"
72+
73+
# Check if the build was successful
74+
if [ "$BUILD_RESULT_STATUS" = "succeeded" ]; then
75+
echo "✅ ADO pipeline build succeeded!"
76+
exit 0
77+
elif [ "$BUILD_RESULT_STATUS" = "partiallySucceeded" ]; then
78+
echo "⚠️ ADO pipeline build partially succeeded"
79+
exit 1
80+
else
81+
echo "❌ ADO pipeline build failed with result: $BUILD_RESULT_STATUS"
82+
exit 1
83+
fi
84+
fi
85+
86+
# Check for other terminal states
87+
if [ "$BUILD_STATUS" = "cancelling" ] || [ "$BUILD_STATUS" = "cancelled" ]; then
88+
echo "❌ ADO pipeline build was cancelled"
89+
exit 1
90+
fi
91+
92+
# Wait 60 seconds before checking again
93+
echo "Build still running... waiting 60 seconds"
94+
sleep 60
95+
done

scripts/ci/find_extension_upgraded.py

Lines changed: 0 additions & 141 deletions
This file was deleted.

src/aks-agent/HISTORY.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
* Fix stdin reading hang in CI/CD pipelines by using select with timeout for non-interactive mode.
15+
* Update pytest marker registration and fix datetime.utcnow() deprecation warning in tests.
16+
* Improve test framework with real-time stderr output visibility and subprocess timeout.
17+
18+
1.0.0b7
19+
+++++++
20+
* Bump aks-mcp to v0.0.10 - here are the notable changes:
21+
* Fix: Improved server health check endpoints /health for both HTTP and SSE connections for http, sse
22+
* Fix: enforce json output for az monitor metrics and aks tools
23+
* Fix: Build the resource URL with correct MCP endpoint path based on transport
24+
* Fix feedback slash command
1425

1526
1.0.0b6
1627
+++++++

src/aks-agent/azext_aks_agent/_consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
CONST_MCP_BINARY_NAME = "aks-mcp"
2727
CONST_MCP_DEFAULT_PORT = 8003
2828
CONST_MCP_DEFAULT_URL = "http://localhost:8003/sse"
29-
CONST_MCP_MIN_VERSION = "0.0.9"
29+
CONST_MCP_MIN_VERSION = "0.0.10"
3030
CONST_MCP_GITHUB_REPO = "Azure/aks-mcp"
3131
CONST_MCP_BINARY_DIR = "bin"

src/aks-agent/azext_aks_agent/agent/agent.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import logging
77
import os
8+
import select
89
import sys
910

1011
from azext_aks_agent._consts import (
@@ -123,7 +124,7 @@ def _should_refresh_toolsets(requested_mode: str, user_refresh_request: bool) ->
123124
return False
124125

125126

126-
# pylint: disable=too-many-locals
127+
# pylint: disable=too-many-locals,too-many-branches
127128
def aks_agent(
128129
cmd,
129130
resource_group_name,
@@ -177,13 +178,25 @@ def aks_agent(
177178

178179
# Detect and read piped input
179180
piped_data = None
180-
if not sys.stdin.isatty():
181-
piped_data = sys.stdin.read().strip()
182-
if interactive:
183-
console.print(
184-
"[bold yellow]Interactive mode disabled when reading piped input[/bold yellow]"
185-
)
186-
interactive = False
181+
# In non-interactive mode with a prompt, we shouldn't try to read stdin
182+
# as it may hang in CI/CD environments. Only read stdin if:
183+
# 1. Not a TTY (indicating piped input)
184+
# 2. Interactive mode is enabled (allows stdin reading)
185+
should_check_stdin = not sys.stdin.isatty() and interactive
186+
187+
if should_check_stdin:
188+
try:
189+
# Use select with timeout to avoid hanging
190+
# Check if data is available with 100ms timeout
191+
if select.select([sys.stdin], [], [], 0.1)[0]:
192+
piped_data = sys.stdin.read().strip()
193+
console.print(
194+
"[bold yellow]Interactive mode disabled when reading piped input[/bold yellow]"
195+
)
196+
interactive = False
197+
except Exception: # pylint: disable=broad-exception-caught
198+
# Continue without piped data if stdin reading fails
199+
pass
187200

188201
# Determine MCP mode and smart refresh logic
189202
use_aks_mcp = bool(use_aks_mcp)

src/aks-agent/azext_aks_agent/agent/telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def track_agent_feedback(self, feedback):
9292
feedback_filtered = Feedback()
9393
feedback_filtered.user_feedback = feedback.user_feedback
9494
feedback_metadata = FeedbackMetadata()
95-
feedback_metadata.model = feedback.metadata.model
95+
feedback_metadata.llm = feedback.metadata.llm
9696
feedback_filtered.metadata = feedback_metadata
9797
self.track("AgentCLIFeedback", properties={"feedback": json.dumps(feedback_filtered.to_dict())})
9898
# Flush the telemetry data immediately to avoid too much data being sent at once

0 commit comments

Comments
 (0)