Skip to content

fix(scripts): avoid overwriting git local config in e2e script#1501

Merged
jariy17 merged 1 commit into
aws:mainfrom
Hweinstock:fix/avoid-writing-git-config
Jun 10, 2026
Merged

fix(scripts): avoid overwriting git local config in e2e script#1501
jariy17 merged 1 commit into
aws:mainfrom
Hweinstock:fix/avoid-writing-git-config

Conversation

@Hweinstock

Copy link
Copy Markdown
Contributor

Problem

The local e2e test script overwrites my git config, adding a testing name for user.name and user.email. This persists after running the script and causes commits to be coauthored by local e2e.

Example: 6c57e78

Solution

Remove the git config override and replace it with a warning if git is not configured. Any engineer running this would likely have git configured, but just in case we fail early.

Testing

Ran locally:

=== Assuming IAM role ===
✅ Assumed role successfully
=== Fetching API keys from Secrets Manager ===
✅ Secrets loaded (keys present: ANTHROPIC_API_KEY, CDP_API_KEY_ID, CDP_API_KEY_SECRET, CDP_WALLET_SECRET, EFS_ACCESS_POINT_ARN, FILESYSTEM_SECURITY_GROUP_ID, FILESYSTEM_SUB
NET_ID, GEMINI_API_KEY, OPENAI_API_KEY, S3_ACCESS_POINT_ARN
=== Setting AWS account env var ===
✅ AWS_ACCOUNT_ID=685197708687  AWS_REGION=us-east-1
=== Verifying git is configured (required for agentcore create) ===
git configured as: Hweinstock <hkobew@amazon.com>
=== Installing dependencies ===

@github-actions github-actions Bot added the size/xs PR size: XS label Jun 10, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 10, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 10, 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 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.19.0.tgz

How to install

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean, focused fix. The script-only change correctly stops mutating the developer's global git config and fails early with a clear error message if git isn't configured. Verified the || true fallback handles the unset-config case correctly under set -euo pipefail. Using --global as the scope is appropriate since agentcore create operates outside this repo's local config. No tests or telemetry needed for a dev-only script change.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 10, 2026
@Hweinstock Hweinstock marked this pull request as ready for review June 10, 2026 14:21
@Hweinstock Hweinstock requested a review from a team June 10, 2026 14:21
@jariy17 jariy17 merged commit f62329b into aws:main Jun 10, 2026
31 of 32 checks passed
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.

3 participants