Surface AI agents live-test sample cache fallback warnings in Azure Pipelines
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
- [ ] Make sure you've installed the latest version using [instructions](https://github.com/Azure/azure-dev?tab=readme-ov-file#installupgrade-azure-developer-cli)
**Output from `azd version`**
N/A. This concerns the live-test pipeline built from source in #9929.
**Describe the bug**
The sample cache fallback warning added in #9929 does not reach Azure Pipelines during a successful fallback. `phaseInit` sends stdout and stderr to a pseudo-terminal, and `newConsole` forwards that output only to the virtual screen and an in-memory tail. The pipeline therefore stays green with no warning that it used an older sample.
**To Reproduce**
1. Run the AI agents Tier 2 live pipeline with a populated sample cache.
2. Make the public GitHub sample download fail while the cached sample remains available.
3. Allow initialization and the remaining lifecycle phases to succeed.
4. Inspect the pipeline output and warnings. The cache fallback warning is not surfaced.
**Expected behavior**
A successful cache fallback emits a pipeline-visible warning with the download failure details, so the run clearly reports that it used a cached sample.
Forward cache warnings through the live-test driver to pipeline-visible output, or persist the fallback details and emit the logging command from a later pipeline step.
**Environment**
Azure Pipelines, Linux, AI agents Tier 2 live E2E pipeline (`eng/pipelines/ext-azure-ai-agents-live.yml`). IDE: N/A.
**Additional context**
Follow-up to merged PR #9929, based on [the review comment](https://github.com/Azure/azure-dev/pull/9929#discussion_r3971136539).
Relevant code:
- `cli/azd/extensions/azure.ai.agents/internal/cmd/template_cache.go`: `emitTemplateCacheWarning`, line 134.
- `cli/azd/extensions/azure.ai.agents/tests/e2e-live/tier2_live_test.go`: `phaseInit`.
- `cli/azd/extensions/azure.ai.agents/tests/e2e-live/console_test.go`: `newConsole`.
Contributor guide
Assessment
This issue has not been assessed yet.