fix: [nomad-step-1] S1.1 — add nomad/jobs/forgejo.hcl (service job, host_volume, port 3000) (#840) #844
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#844
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-840"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #840
Changes
First Nomad jobspec to land under nomad/jobs/ as part of the Nomad+Vault migration. Proves the docker driver + host_volume plumbing wired up in Step 0 (client.hcl) by defining a real factory service: - job type=service, datacenters=["dc1"], 1 group × 1 task - docker driver, image pinned to codeberg.org/forgejo/forgejo:11.0 (matches docker-compose.yml) - network port "http" static=3000, to=3000 (same host:port as compose, so agents/woodpecker/caddy reach forgejo unchanged across cutover) - mounts the forgejo-data host_volume from nomad/client.hcl at /data - non-secret env subset from docker-compose's forgejo service (DB type, ROOT_URL, HTTP_PORT, INSTALL_LOCK, DISABLE_REGISTRATION, webhook allow-list); OAuth/secret env vars land in Step 2 via Vault - Nomad-native service discovery (provider="nomad", no Consul) with HTTP check on /api/v1/version (10s interval, 3s timeout). No initial_status override — Nomad waits for first probe to pass. - restart: 3 attempts / 5m / 15s delay / mode=delay - resources: cpu=300 memory=512 baseline No changes to docker-compose.yml — the docker stack remains the factory's runtime until cutover. CI integration (`nomad job validate`) is tracked by #843. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>AI Review
Summary
Adding the first Nomad jobspec for Forgejo (S1.1). Structure and logic are correct — host_volume source matches
client.hcl, port is static at 3000 for cut-over compatibility, no secrets present (Step 2 deferred appropriately), health check path and resource limits are reasonable. Two blocking issues before this lands.Blockers
medium
nomad/jobs/forgejo.hcl(filename): Naming convention violation.nomad/AGENTS.mdline 38 explicitly documents the convention: "Drop a file innomad/jobs/<service>.nomad.hcl". The file is namedforgejo.hcl, notforgejo.nomad.hcl. This is the first jobspec and sets the pattern for all that follow. Any future tooling or glob (*.nomad.hcl) that enumerates jobspecs will miss this file. Rename toforgejo.nomad.hcl.medium
.woodpecker/nomad-validate.yml(missing step): CI does not validate the new jobspec.nomad config validate(step 1, line 57) is the Nomad agent config validator — it acceptsserver.hcl/client.hclsyntax, not job specs. Job HCL is validated withnomad job validate. The newforgejo.hclis not passed to any validation command; CI passes but the job file's syntax is unchecked.nomad/AGENTS.mdstep 4 says to wire CI to validate it. Add a step (e.g.nomad job validate nomad/jobs/forgejo.nomad.hcl) using the pinnedhashicorp/nomad:1.9.5image.Non-blocking observations
FORGEJO__server__ROOT_URL = "http://forgejo:3000/": In Nomad native service discovery (no Consul),forgejowon't resolve as a hostname inside peer containers without additional DNS wiring. The header acknowledges this is not the live runtime yet, so acceptable for now — worth tracking before cutover.datacenters = ["dc1"]:server.hcldoes not set an explicit datacenter so Nomad defaults todc1. This matches. Fine.Verdict
REQUEST_CHANGES — File naming violates documented convention; CI does not validate the new jobspec (config validate != job validate)
Reviewed at
2ad4bdc| AGENTS.mdAI Review: REQUEST_CHANGES — File naming violates documented convention; CI does not validate the new jobspec (config validate != job validate)
AI Re-review (round 2)
Previous Findings
nomad job validatestep) → FIXED:nomad-job-validatestep added at position 2, using pinnedhashicorp/nomad:1.9.5image, validatingnomad/jobs/forgejo.nomad.hclexplicitly. Step numbering in header comment updated consistently.New Issues
None. The incremental diff is minimal and correct — rename + CI wiring only, no functional changes to the jobspec.
Verdict
APPROVE — Both previous blockers addressed: file renamed to forgejo.nomad.hcl, nomad-job-validate CI step added
Reviewed at
db64f2f| Previous:2ad4bdc| AGENTS.mdAI Re-review (round 2): APPROVE — Both previous blockers addressed: file renamed to forgejo.nomad.hcl, nomad-job-validate CI step added