project build fails before first deploy when a gateway target references a project credential
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- aws, typescript
- Ambito
- authentication, build-system, cli, cloud
Direzione di ricerca
Start with the agentcore project build entry point and the generated CDK application's credential resolution, then compare it with the deploy path that provisions credentials first. Add the requested regression test for a fresh project with an OAuth credential and MCP gateway target, and verify that build or synthesis succeeds before deployment.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
agentcore project build cannot synthesize a new project when a gateway target references an OAuth credential declared in the same project before the first deployment.
agentcore project deploy works around this by provisioning credentials before it builds, but the standalone build command does not. This makes an otherwise valid project impossible to build in CI or inspect with CDK synthesis before its first deploy.
Reproduction
In a new project, add a gateway and then run:
printf '%s' "$CLIENT_SECRET" | agentcore project add credentials oauth \
--name MyOauthCredential \
--vendor CustomOauth2 \
--client-id my-client \
--discovery-url https://auth.example.com/.well-known/openid-configuration \
--client-secret -
agentcore project add gateway-target \
--gateway MyGateway \
--name MyMCPTarget \
--endpoint https://my-mcp-server.example.com \
--outbound-auth oauth \
--credential-name MyOauthCredential
agentcore project build
Actual behavior
CDK synthesis fails:
AgentCore CDK synthesis failed: Credential "MyOauthCredential" not found in deployed state
The generated CDK application resolves the target's credential reference only from .cli/deployed-state.json. That state cannot contain the credential before the first deployment.
The deploy path provisions credentials before calling build, so agentcore project deploy does not expose the same failure.
Expected behavior
A project whose resources reference other resources declared in the same project should synthesize before its first deployment. project build should not require deployed state for an in-project credential reference.
Suggested direction
Represent credential references symbolically during synthesis, or make the generated CDK application resolve credentials declared in the project without requiring deployed state. If this cannot be supported, project build should produce a targeted error and the project workflow should explicitly model the required credential provisioning phase.
Please add a regression test for a fresh project containing an OAuth credential and an MCP gateway target that references it.
- Lingua principale
- TypeScript
- Stelle
- 291
- Fork
- 96
- Merge medio
- 21h 31m
- PR unite (30g)
- 217
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/agentcore-cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
aws/agentcore-cli#2395 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
aws/agentcore-cli#2392 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws/agentcore-cli#2267 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/agentcore-cli#2258 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws/agentcore-cli#2176 ·
Tutte le issue di aws/agentcore-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bcgov/bc-wallet-mobile#4761 · 1 commento ·
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100