-
Notifications
You must be signed in to change notification settings - Fork 219
Support template creation in local dev #1449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
# Conflicts: # packages/orchestrator/internal/sandbox/template/storage_template.go
Pull Request Review: Support template creation in local devSummaryThis PR refactors the orchestrator configuration to support local template creation with better configuration management and absolute path handling. ✅ Strengths
🔴 Critical Issues1. Missing Directory Creation (High Priority)The PR description mentions 'Create dirs at startup (ensureDirs)' but this implementation is not in the diff. Cache directories may not exist at startup. Recommendation: Add EnsureDirs() method and call it after Parse()/ParseBuilder() 2. Inconsistent Naming Convention (Medium)Mixed use of *Path and *Dir suffixes. Consider standardizing on one convention. 3. Breaking Change Documentation (High)Removing global OrchestratorBasePath - ensure migration path is documented for existing deployments. 🟡 Moderate Concerns1. Test Coverage Gaps (High Priority)Missing tests for:
2. Environment Variable Defaults (Medium)SnapshotCacheDir defaults to /mnt/snapshot-cache which requires root permissions and may not exist in all environments. Consider fallback for local dev. 3. Missing .env.local ValidationAdd startup validation for required vs optional variables with clear error messages. 🟢 Minor Issues
🔒 Security
🧪 Testing Priority 1 (Block merge)
📝 Documentation Needs
✅ Fix Before Merge
🎯 Overall AssessmentCode Quality: 8/10 Recommendation: ✅ Approve with changes requested The PR is fundamentally sound with valuable improvements. Main blockers are missing directory creation, test coverage, and documentation of requirements. 🙏 Positive Notes
Great work on this substantial refactoring! 🚀 |
| assert.Equal(t, []string{"service1", "service2"}, config.Services) | ||
| }) | ||
|
|
||
| t.Run("env defaults get defaults before expansion", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the test!
jakubno
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀 leaving the decision to you
Note
Adds local template build workflow and logs collector to local dev, and refactors orchestrator/storage to use configurable absolute cache paths with startup dir creation.
DEV-LOCAL.mdwith end-to-end steps to build/run locally (kernels/envd/fc versions, base template build).packages/local-dev/vector.tomlandvectorservice; add Loki healthcheck indocker-compose.yaml..env.localvars forapi,client-proxy, andorchestrator(incl.LOGS_COLLECTOR_ADDRESS, local cluster, cache dirs).download-public-kernels; addshared/scriptstargetlocal-build-base-template.BuilderConfig(DefaultCacheDir,SandboxCacheDir,SnapshotCacheDir,TemplateCacheDir,TemplatesDir, etc.) and ensure directories exist at startup.BuilderConfigthrough builder/template/sandbox code; remove reliance on global base path.build-templatecmd and benchmarks updated to parse/pass builder config.storagehelpers to accept aBuilderConfiginterface for cache/snapshot/template paths; removeshared/pkg/config.go..gitignore: ignore/packages/fc-kernels.Makefile: simplifyrun-local(no explicit port).Written by Cursor Bugbot for commit 75950b7. This will update automatically on new commits. Configure here.