-
Notifications
You must be signed in to change notification settings - Fork 52
Add comprehensive GitHub Copilot instructions and workflow optimizations for Dalec development #731
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
Changes from all commits
ca5b413
470e478
d504394
672b63d
c004302
e9af4bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,108 @@ | ||||||||||||||
| # Dalec - Package and Container Builder | ||||||||||||||
|
|
||||||||||||||
| Dalec is a Docker BuildKit frontend for building system packages (RPM, DEB) and containers from declarative YAML specifications. It supports multiple Linux distributions and Windows containers. | ||||||||||||||
|
|
||||||||||||||
| Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here. | ||||||||||||||
|
|
||||||||||||||
| ## Working Effectively | ||||||||||||||
|
|
||||||||||||||
| ### Bootstrap and Basic Development | ||||||||||||||
| - Download Go dependencies: `go mod download` -- takes ~5 seconds | ||||||||||||||
| - Run unit tests: `go test --test.short --timeout=10m ./...` -- takes ~52 seconds. NEVER CANCEL. Set timeout to 15+ minutes. | ||||||||||||||
| - Generate source files: `go generate` -- takes ~1 second | ||||||||||||||
| - Run custom linters: `go run ./cmd/lint ./...` -- takes ~3 seconds | ||||||||||||||
| - Validate generated files are up to date: `git diff --exit-code` after running `go generate` | ||||||||||||||
|
|
||||||||||||||
| ### Building CLI Tools | ||||||||||||||
| - Build frontend binary: `go build -o /tmp/frontend ./cmd/frontend` -- takes ~1 second | ||||||||||||||
| - Build dalec-redirectio: `go build -o /tmp/dalec-redirectio ./cmd/dalec-redirectio` -- takes ~1 second | ||||||||||||||
| - Generate JSON schema: `go run ./cmd/gen-jsonschema` -- takes ~0.2 seconds | ||||||||||||||
| - All other CLI tools in `cmd/` can be built with `go build` or run with `go run` | ||||||||||||||
|
|
||||||||||||||
| ### Docker Frontend Build System | ||||||||||||||
| **IMPORTANT**: Docker builds may fail in some environments due to TLS certificate issues with proxy.golang.org. This is an environmental limitation, not a code issue. | ||||||||||||||
|
|
||||||||||||||
| - Build frontend image: `docker buildx bake frontend` -- takes ~2-5 minutes when working. NEVER CANCEL. Set timeout to 15+ minutes. | ||||||||||||||
| - **Alternative when Docker builds fail**: Use host-compiled binaries for development and testing | ||||||||||||||
| - The frontend requires Docker BuildKit with buildx support | ||||||||||||||
|
|
||||||||||||||
| ### Integration Testing | ||||||||||||||
| - Run specific distro tests: `go test -timeout=59m -v ./test -run=TestMariner2` -- takes 30+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | ||||||||||||||
| - Run all integration tests: `go test -timeout=59m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | ||||||||||||||
|
||||||||||||||
| - Run all integration tests: `go test -timeout=59m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | |
| - Run specific distro tests: `go test -timeout=75m -v ./test -run=TestMariner2` -- takes 30+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | |
| - Run all integration tests: `go test -timeout=75m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. |
Copilot
AI
Aug 7, 2025
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.
The timeout flag value (59m) is inconsistent with the recommended timeout in the same line (75+ minutes). The command should use -timeout=75m or higher to match the stated recommendation.
| - Run all integration tests: `go test -timeout=59m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | |
| - Run specific distro tests: `go test -timeout=75m -v ./test -run=TestMariner2` -- takes 30+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. | |
| - Run all integration tests: `go test -timeout=75m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. |
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.
The timeout flag value (10m) is inconsistent with the recommended timeout in the same line (15+ minutes). Either update the command to use
--timeout=15mor adjust the recommendation to match the 10-minute timeout.