chore(rest-api): enable rest api use of local core for local dev env#3371
chore(rest-api): enable rest api use of local core for local dev env#3371pbreton wants to merge 4 commits into
Conversation
Signed-off-by: Patrice Breton <pbreton@nvidia.com>
Signed-off-by: Patrice Breton <pbreton@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughAdds local NICo Core support for REST deployments, standardizes site-agent Core gRPC settings and certificate paths, updates macOS local-development documentation and startup handling, and introduces an end-to-end REST/Core smoke-test script. ChangesLocal Core REST Integration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant Makefile
participant Kind
participant SiteAgent
participant LocalNicoCore
participant RESTAPI
Developer->>Makefile: Run LOCAL_CORE REST setup
Makefile->>Kind: Configure certificates and CORE_GRPC endpoint
Kind->>SiteAgent: Restart and await rollout
SiteAgent->>LocalNicoCore: Establish mTLS connection
Developer->>RESTAPI: Run integration smoke test
RESTAPI->>LocalNicoCore: Execute VPC operation
LocalNicoCore-->>RESTAPI: Return operation status
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-07-10 17:37:51 UTC | Commit: 563856d |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
rest-api/deploy/INSTALLATION.md (1)
719-723: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winStale mount path in "Secrets mounted at runtime" table.
core-grpc-client-site-agent-certsis documented as mounted at/etc/nico(line 722), but the accompanyingstatefulset.yamlchange in this same cohort moves that mount to/etc/core-grpc. This table wasn't updated to match.📝 Proposed fix
-| `core-grpc-client-site-agent-certs` | `/etc/nico` | SPIFFE cert for gRPC to NICo core (optional, issued by cert-manager) | +| `core-grpc-client-site-agent-certs` | `/etc/core-grpc` | SPIFFE cert for gRPC to NICo core (optional, issued by cert-manager) |As per path instructions,
rest-api/deploy/**manifests should be reviewed for "service wiring, environment variables, and secret/config references" — this table entry no longer reflects the actual mount path wired instatefulset.yaml.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rest-api/deploy/INSTALLATION.md` around lines 719 - 723, Update the “Secrets mounted at runtime” table entry for core-grpc-client-site-agent-certs to use /etc/core-grpc instead of /etc/nico, matching the mount configured in statefulset.yaml.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dev/mac-local-dev/check-rest-core-integration.sh`:
- Around line 173-181: Prevent strict-mode pipeline failure from bypassing the
intended validation: update the UPDATE_TAG assignment in the current database
update step and the equivalent assignment in step 3c to neutralize grep’s
non-match status with `|| true` (or an equivalent guarded pipeline). Preserve
the existing empty-output and zero-row checks so they invoke `die` with the
intended messages.
In `@dev/mac-local-dev/README.md`:
- Line 14: Update the documentation sentence describing the integration test to
hyphenate the compound adjective, changing “full stack integration” to
“full-stack integration.”
---
Outside diff comments:
In `@rest-api/deploy/INSTALLATION.md`:
- Around line 719-723: Update the “Secrets mounted at runtime” table entry for
core-grpc-client-site-agent-certs to use /etc/core-grpc instead of /etc/nico,
matching the mount configured in statefulset.yaml.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 032391b6-f136-447b-8e7a-ca346a242c4a
📒 Files selected for processing (8)
dev/mac-local-dev/README.mddev/mac-local-dev/check-rest-core-integration.shhelm-prereqs/values/nico-site-agent.yamlhelm/rest/nico-rest-site-agent/values.yamlrest-api/Makefilerest-api/deploy/INSTALLATION.mdrest-api/deploy/kustomize/base/site-agent/configmap.yamlrest-api/deploy/kustomize/base/site-agent/statefulset.yaml
Signed-off-by: Patrice Breton <pbreton@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dev/mac-local-dev/run-nico-api.sh`:
- Around line 175-177: Preserve uniqueness when creating the final TOML
configuration path: update the temporary-file setup around NICO_TMP_CONFIG to
use a private temporary directory, track it as NICO_TMP_DIR, and ensure cleanup
removes that directory. Do not rely on mv to a suffixed path, since it may
overwrite an existing file; update the associated cleanup handling accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: dfaf0fb8-cb29-48f4-8f95-034028e376ac
📒 Files selected for processing (1)
dev/mac-local-dev/run-nico-api.sh
Signed-off-by: Patrice Breton <pbreton@nvidia.com>
22be36b to
3accfbc
Compare
| # NICo Core configuration | ||
| NICO_ADDRESS: "nico-rest-mock-core:11079" | ||
| NICO_SEC_OPT: "0" | ||
| CORE_GRPC_ADDRESS: "nico-rest-mock-core:11079" |
There was a problem hiding this comment.
We can have cluster name or domain name for core server?
Enhance REST API local stack launched by
make kind-resetto enable the use of a localnico-apicore instead of a mock.Type of Change
Breaking Changes
Testing