Skip to content

fix(project): point the no-targets error at project deploy - #2196

Merged
jariy17 merged 1 commit into
refactorfrom
fix/project-status-no-targets-message
Sep 3, 2026
Merged

fix(project): point the no-targets error at project deploy#2196
jariy17 merged 1 commit into
refactorfrom
fix/project-status-no-targets-message

Conversation

@jariy17

@jariy17 jariy17 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

resolveExistingTarget told the user to hand-write aws-targets.json with an example account id when a project declared no deployment targets:

No deployment targets are configured for project 'orders'. Add /path/agentcore/aws-targets.json, for example:

[{ "name": "default", "account": "111122223333", "region": "us-east-1" }]

A freshly created project hits this on its first agentcore project status, because create writes an empty aws-targets.json and only deploy fills it. Deploying is what the user should do, so the message now says so:

No deployment targets are configured for project 'orders'. Please deploy your project using 'agentcore project deploy'.

The missing-file and empty-array branches reported the same thing once the path/example was dropped, so they merge into one targets.length === 0 check. The unknown---target branch is unchanged — it still lists the declared target names, which is the useful fix for a typo.

This is a shared helper, so deploy, remove, and invoke get the same clearer message when a project has no targets.

resolveExistingTarget told the user to hand-write aws-targets.json with an
example account id when a project declared no targets. A freshly created
project hits this on its first `agentcore project status`, since create writes
an empty targets file and only deploy fills it. Point them at
'agentcore project deploy' instead, and merge the missing-file and empty-array
branches, which now report the same thing.
@github-actions github-actions Bot added the size/xs PR size: XS label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 3, 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 Sep 3, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AgentCore Harness Review

Verdict: Looks good

Small, well-scoped change. Replacing the "hand-edit aws-targets.json" instruction with a pointer to agentcore project deploy matches the current UX where the deploy path auto-provisions the default target (see provisionDefaultTarget around line 1033), so the old guidance was stale.

A few things I verified:

  • TARGETS_EXAMPLE is still referenced by the deploy path (manager.tsx lines 926/932), so it isn't dead code.
  • Collapsing the "file missing" and "empty targets" branches into a single targets.length === 0 check is fine here — resolveExistingTarget is a read path and doesn't need to distinguish the two cases (the deploy path still handles them separately).
  • Other tests that match on the substring "No deployment targets are configured" (manager.test.ts:742, project.test.ts:1366, deploy/index.test.ts:380, invoke.screen.test.tsx:111) still pass with the new message since that substring is preserved.

No telemetry concerns (no new feature surface) and no test-mocking concerns. Nothing blocking from me.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.15%. Comparing base (dffe6e5) to head (586c7fe).
⚠️ Report is 1 commits behind head on refactor.

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2196      +/-   ##
============================================
- Coverage     97.15%   97.15%   -0.01%     
============================================
  Files           542      542              
  Lines         37728    37723       -5     
============================================
- Hits          36653    36648       -5     
  Misses         1075     1075              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jariy17
jariy17 marked this pull request as ready for review September 3, 2026 20:27
@jariy17
jariy17 merged commit b8b128b into refactor Sep 3, 2026
23 of 25 checks passed
@jariy17
jariy17 deleted the fix/project-status-no-targets-message branch September 3, 2026 21:08
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