Skip to content

feat(cli): add daemon command#1200

Merged
paralta merged 8 commits intomainfrom
refactor/reconciler-server-start
Mar 31, 2026
Merged

feat(cli): add daemon command#1200
paralta merged 8 commits intomainfrom
refactor/reconciler-server-start

Conversation

@paralta
Copy link
Copy Markdown
Member

@paralta paralta commented Mar 27, 2026

Adds dirctl daemon start|stop|status — a self-contained local directory server that bundles the gRPC apiserver and reconciler in one process with embedded SQLite and filesystem OCI store.

  • Add dirctl daemon subcommands (start, stop, status) with PID file management, --data-dir override, and SIGTERM graceful shutdown
  • Export server.Start() and refactor reconciler/service.New() to accept DB/store/config so both can be embedded by the daemon
  • Change indexer task from *remote.Repository to registry.TagLister interface to support local OCI stores
  • Add walkReferrersViaPredecessors fallback in OCI store so sign/verify work on local layout stores without the Referrers API
  • Add test:e2e:daemon Taskfile task and Ginkgo test suite covering push, pull, sign, and verify against a running daemon
  • Register daemon e2e job in CI workflow matrix

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedMar 31, 2026, 8:52 AM

@github-actions github-actions bot added the size/M Denotes a PR that changes 200-999 lines label Mar 27, 2026
@paralta paralta force-pushed the refactor/reconciler-server-start branch 2 times, most recently from d1b014d to 896e88a Compare March 27, 2026 15:26
@paralta paralta marked this pull request as ready for review March 27, 2026 17:04
@paralta paralta requested a review from a team as a code owner March 27, 2026 17:04
@paralta paralta requested a review from ramizpolic March 30, 2026 09:38
@paralta paralta force-pushed the refactor/reconciler-server-start branch from 0a5a930 to 62617b0 Compare March 30, 2026 10:47
@paralta paralta requested a review from ramizpolic March 30, 2026 15:20
}

ginkgo.GinkgoWriter.Printf("Waiting for daemon at %s...\n", addr)
gomega.Expect(waitForServerReady(addr)).To(gomega.Succeed())
Copy link
Copy Markdown
Member

@ramizpolic ramizpolic Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we dont need to redeclare a new method for checking running state, simply reuse from utils package github.com/agntcy/dir/tests/e2e/shared/utils

Suggested change
gomega.Expect(waitForServerReady(addr)).To(gomega.Succeed())
ginkgo.GinkgoWriter.Printf("Waiting for Directory daemon at %s...\n", addr)
gomega.Eventually(utils.IsGrpcServerReady).
WithArguments(addr).
WithPolling(readyPollInterval).
WithTimeout(readyTimeout).
Should(gomega.Succeed())
ginkgo.GinkgoWriter.Printf("Directory apiserver is daemon at %s\n", addr)

Copy link
Copy Markdown
Member

@ramizpolic ramizpolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

paralta added 7 commits March 31, 2026 09:29
…package

Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
…rectory daemon

Signed-off-by: Catarina Paralta <clouropa@cisco.com>
…local store

Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
@paralta paralta force-pushed the refactor/reconciler-server-start branch from a0950c4 to aeb6112 Compare March 31, 2026 08:30
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
@paralta paralta force-pushed the refactor/reconciler-server-start branch from aeb6112 to f33c579 Compare March 31, 2026 08:52
@paralta paralta merged commit e3edff9 into main Mar 31, 2026
45 of 49 checks passed
@paralta paralta deleted the refactor/reconciler-server-start branch March 31, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: dirctl daemon command [Feature]: Refactor server and reconciler for library embedding

2 participants