-
Notifications
You must be signed in to change notification settings - Fork 50
Remove use of dagger #916
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
Remove use of dagger #916
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.
Pull request overview
This PR removes the Dagger dependency from the website tooling and replaces it with direct BuildKit integration. The change eliminates dependency conflicts, improves compatibility (avoiding issues with nftables), and reduces the overall tooling requirements by using the project's existing BuildKit infrastructure.
Key Changes:
- Replaced Dagger-based website build and serve with custom BuildKit integration
- Enhanced bkfs package to support ReadDir operations on directory file handles
- Reorganized architecture documentation from MDX import to standalone Markdown file
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
website/main.go |
Complete rewrite using BuildKit client, LLB state generation, and built-in HTTP server to replace Dagger orchestration |
website/go.mod |
Removed Dagger dependency and all its transitive dependencies |
website/go.sum |
Removed all Dagger-related dependency checksums |
website/Dockerfile |
New file defining Node.js base image for BuildKit frontend |
website/docusaurus.config.ts |
Made baseUrl configurable via environment variable for flexible deployments |
website/docs/architecture.mdx |
Removed MDX file that imported root ARCHITECTURE.md |
website/docs/architecture.md |
Added standalone architecture documentation for website |
ARCHITECTURE.md |
Replaced with file path reference to website location |
frontend/pkg/bkfs/bkfs.go |
Added ReadDir method to stateRefFile to implement fs.ReadDirFile interface |
website/main.go
Outdated
| srv.Shutdown(context.WithoutCancel(ctx)) | ||
|
|
Copilot
AI
Jan 6, 2026
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 HTTP server shutdown is called with context.WithoutCancel(ctx), but this creates a background context that never gets canceled. Since the server is being shut down because ctx.Done() was signaled (line 265), using WithoutCancel means the shutdown will wait indefinitely for all connections to close. Consider using a timeout context (e.g., context.WithTimeout) to ensure the server shuts down within a reasonable timeframe.
| srv.Shutdown(context.WithoutCancel(ctx)) | |
| shutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) | |
| defer cancel() | |
| _ = srv.Shutdown(shutdownCtx) |
website/main.go
Outdated
| srv := &http.Server{ | ||
| Handler: handler, | ||
| } | ||
| go srv.Serve(l) |
Copilot
AI
Jan 6, 2026
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 HTTP server is started in a goroutine with go srv.Serve(l), but the error returned by Serve is not checked. If Serve returns an error other than http.ErrServerClosed, it should be logged to help with debugging server issues.
| go srv.Serve(l) | |
| go func() { | |
| if err := srv.Serve(l); err != nil && err != http.ErrServerClosed { | |
| slog.Error("HTTP server error", "error", err) | |
| } | |
| }() |
| @@ -0,0 +1,141 @@ | |||
| # Dalec Architecture | |||
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.
This is just moved from the repo root (and root has a symlink) so that the builder has access to it.
f6e5cc9 to
b28bc3c
Compare
b28bc3c to
b253975
Compare
b253975 to
6cb22e0
Compare
6cb22e0 to
18a233a
Compare
Dagger was convenient at the time for getting the site running without needing a bunch of things installed on the machine, but is overkill for the usage and even problematic because: 1. Introduces a whole different go module (b/c dagger dependencies) 2. Doesn't work in some cases (namely I have issues with dagger+nftables) 3. Is still an extra thing in the tooling that needs to be installed even if its handled automatically. Now that we have better stuff for interacting with buildkit, and understand more of how to do that, we can actually serve the whole website directly out of a buildkit build without any extra tooling than what is required to work on the rest of the project. This uses buildkit to build the static site content and then serves it directly out of the buildkit cache. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
18a233a to
e0b4e07
Compare
|
@MorrisLaw A few more minor cleanups here if you could take another look. |
Dagger was convenient at the time for getting the site running without needing a bunch of things installed on the machine, but is overkill for the usage and even problematic because:
Now that we have better stuff for interacting with buildkit, and understand more of how to do that, we can actually serve the whole website directly out of a buildkit build without any extra tooling than what is required to work on the rest of the project.
This uses buildkit to build the static site content and then serves it directly out of the buildkit cache.