Skip to content

fix(ci): disable telemetry in release workflow to fix test failures#1442

Merged
jariy17 merged 1 commit into
mainfrom
fix/release-workflow-telemetry-env
Jun 2, 2026
Merged

fix(ci): disable telemetry in release workflow to fix test failures#1442
jariy17 merged 1 commit into
mainfrom
fix/release-workflow-telemetry-env

Conversation

@jariy17
Copy link
Copy Markdown
Contributor

@jariy17 jariy17 commented Jun 2, 2026

Summary

  • Adds AGENTCORE_TELEMETRY_DISABLED: '1' to the release workflow, matching what build-and-test.yml already sets
  • Fixes the 7 unit test failures in the "Update snapshots" step that have been blocking releases

Root Cause

The prepare-release job runs npm run test:update-snapshots (all unit tests, unsharded) without AGENTCORE_TELEMETRY_DISABLED. This causes withCommandRunTelemetry in the TUI hooks (useLogsFlow, useRemoveResource) to trigger real I/O during createClient():

  1. getOrCreateInstallationId()access() + mkdir() + writeFile() to ~/.agentcore/config.json
  2. OtelMetricSink construction (network connection attempt)
  3. client.flush() in the finally block (actual export attempt)

This I/O doesn't resolve within the 50-100ms setTimeout delays used by the LogsScreen and useRemove tests, so assertions fire while components are still in their loading state.

build-and-test.yml avoids this by setting AGENTCORE_TELEMETRY_DISABLED=1 at the workflow level.

Test plan

  • Verified locally: tests pass with AGENTCORE_TELEMETRY_DISABLED=1, fail without it
  • Re-run the release workflow after merge to confirm it passes

The release workflow's "Update snapshots" step fails because
withCommandRunTelemetry triggers real filesystem and network I/O
(createClient → getOrCreateInstallationId → mkdir/writeFile, plus
OtelMetricSink construction and flush) that doesn't resolve within
the 50-100ms test delays.

build-and-test.yml already sets AGENTCORE_TELEMETRY_DISABLED=1 at the
workflow level, preventing this. The release workflow was missing it.
@jariy17 jariy17 requested review from a team and Hweinstock June 2, 2026 19:55
@github-actions github-actions Bot added the size/xs PR size: XS label Jun 2, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 2, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 2, 2026
@agentcore-devx-automation
Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Package Tarball

aws-agentcore-0.16.0.tgz

How to install

gh release download pr-1442-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.16.0.tgz

Copy link
Copy Markdown

@agentcore-cli-automation agentcore-cli-automation left a comment

Choose a reason for hiding this comment

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

Looks good to merge.

The change is minimal, surgical, and brings parity with build-and-test.yml which already sets the same env var at the workflow level. Root cause analysis in the PR description is accurate — withCommandRunTelemetry triggers real fs/network I/O via getOrCreateInstallationId() and OtelMetricSink construction that doesn't resolve within the short setTimeout delays in the affected TUI tests.

One follow-up worth considering (not blocking): the tests really shouldn't depend on a workflow-level env var to avoid hitting the network and writing to ~/.agentcore/config.json. A vitest setupFiles entry that sets AGENTCORE_TELEMETRY_DISABLED=1 (or stubs the telemetry client) would make this immune to the env getting dropped from a future workflow. But unblocking releases now with this CI parity fix is the right call.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 2, 2026
@jariy17 jariy17 removed the request for review from Hweinstock June 2, 2026 19:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 35.47% 10926 / 30803
🔵 Statements 34.8% 11606 / 33341
🔵 Functions 30.12% 1832 / 6082
🔵 Branches 29.38% 6900 / 23483
Generated in workflow #3434 for commit 9239540 by the Vitest Coverage Report Action

@jariy17 jariy17 merged commit dbe34ac into main Jun 2, 2026
30 checks passed
@jariy17 jariy17 deleted the fix/release-workflow-telemetry-env branch June 2, 2026 20:04
@jariy17 jariy17 changed the title fix(ci): disable telemetry in release workflow to fix test failures fix(ci): disable telemetry in release workflow + fix changelog auto-generation Jun 2, 2026
@jariy17 jariy17 changed the title fix(ci): disable telemetry in release workflow + fix changelog auto-generation fix(scripts): filter non-version tags in changelog auto-generation Jun 2, 2026
@jariy17 jariy17 changed the title fix(scripts): filter non-version tags in changelog auto-generation fix(ci): disable telemetry in release workflow to fix test failures Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants