Skip to content

Commit 7e791d6

Browse files
authored
Merge pull request #213 from scaleapi/RF/fix-build-agents
debugging the workflow
2 parents a484c0a + 8ec2320 commit 7e791d6

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

.github/workflows/build-and-push-tutorial-agent.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,9 @@ jobs:
7171
7272
echo "### 🔄 Rebuilding All Tutorial Agents" >> $GITHUB_STEP_SUMMARY
7373
else
74-
# Determine the base branch for comparison
75-
if [ "${{ github.event_name }}" = "pull_request" ]; then
76-
BASE_BRANCH="origin/${{ github.base_ref }}"
77-
echo "Comparing against PR base branch: $BASE_BRANCH"
78-
else
79-
BASE_BRANCH="HEAD~1"
80-
echo "Comparing against previous commit: $BASE_BRANCH"
81-
fi
74+
# Always compare against main branch
75+
BASE_BRANCH="origin/main"
76+
echo "Comparing against main branch: $BASE_BRANCH"
8277
8378
# Check each agent directory for changes
8479
for agent_dir in $all_agents; do
@@ -107,6 +102,12 @@ jobs:
107102
echo "agents=$agents_json" >> $GITHUB_OUTPUT
108103
echo "has_agents=true" >> $GITHUB_OUTPUT
109104
105+
# Debug outputs
106+
echo "DEBUG: Setting has_agents=true"
107+
echo "DEBUG: agents_json=$agents_json"
108+
echo "DEBUG: GITHUB_OUTPUT contents:"
109+
cat $GITHUB_OUTPUT
110+
110111
echo "" >> $GITHUB_STEP_SUMMARY
111112
for agent in "${agents_to_build[@]}"; do
112113
echo "- \`$agent\`" >> $GITHUB_STEP_SUMMARY
@@ -126,6 +127,12 @@ jobs:
126127

127128
name: build-${{ matrix.agent_path }}
128129
steps:
130+
- name: Debug inputs from find-agents
131+
run: |
132+
echo "DEBUG: Received has_agents = '${{ needs.find-agents.outputs.has_agents }}'"
133+
echo "DEBUG: Received agents = '${{ needs.find-agents.outputs.agents }}'"
134+
echo "DEBUG: Current matrix agent = '${{ matrix.agent_path }}'"
135+
129136
- name: Checkout repository
130137
uses: actions/checkout@v4
131138

@@ -178,7 +185,7 @@ jobs:
178185
echo "🚀 Building and pushing agent: ${{ matrix.agent_path }}"
179186
else
180187
SHOULD_PUSH=false
181-
VERSION_TAG="${{ github.commit.sha }}"
188+
VERSION_TAG="${{ github.sha }}"
182189
echo "🔍 Validating build for agent: ${{ matrix.agent_path }}"
183190
fi
184191

examples/tutorials/00_sync/000_hello_acp/project/acp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ async def handle_message_send(
2121
) -> Union[TaskMessageContent, AsyncGenerator[TaskMessageUpdate, None]]:
2222
"""Default message handler with streaming support"""
2323
# Extract content safely from the message
24+
logger.info("msg 2", params)
2425
message_text = ""
2526
if hasattr(params.content, "content"):
2627
content_val = getattr(params.content, "content", "")

examples/tutorials/10_async/10_temporal/090_claude_agents_sdk_mvp/project/acp.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@
55

66
# === DEBUG SETUP (AgentEx CLI Debug Support) ===
77
if os.getenv("AGENTEX_DEBUG_ENABLED") == "true":
8+
print("test me")
89
try:
910
import debugpy
11+
1012
debug_port = int(os.getenv("AGENTEX_DEBUG_PORT", "5679"))
1113
debug_type = os.getenv("AGENTEX_DEBUG_TYPE", "acp")
1214
wait_for_attach = os.getenv("AGENTEX_DEBUG_WAIT_FOR_ATTACH", "false").lower() == "true"
13-
15+
1416
# Configure debugpy
1517
debugpy.configure(subProcess=False)
1618
debugpy.listen(debug_port)
17-
19+
1820
print(f"🐛 [{debug_type.upper()}] Debug server listening on port {debug_port}")
19-
21+
2022
if wait_for_attach:
2123
print(f"⏳ [{debug_type.upper()}] Waiting for debugger to attach...")
2224
debugpy.wait_for_client()
2325
print(f"✅ [{debug_type.upper()}] Debugger attached!")
2426
else:
2527
print(f"📡 [{debug_type.upper()}] Ready for debugger attachment")
26-
28+
2729
except ImportError:
2830
print("❌ debugpy not available. Install with: pip install debugpy")
2931
sys.exit(1)
@@ -52,8 +54,8 @@
5254
type="temporal",
5355
temporal_address=os.getenv("TEMPORAL_ADDRESS", "localhost:7233"),
5456
plugins=[OpenAIAgentsPlugin(model_provider=temporal_streaming_model_provider)],
55-
interceptors=[context_interceptor]
56-
)
57+
interceptors=[context_interceptor],
58+
),
5759
)
5860

5961

@@ -69,4 +71,5 @@
6971

7072
# @acp.on_task_cancel
7173
# This does not need to be handled by your workflow.
72-
# It is automatically handled by the temporal client which cancels the workflow directly
74+
# It is automatically handled by the temporal client which cancels the workflow directly
75+

0 commit comments

Comments
 (0)