Skip to content

Bump lib-jobs to v0.2.0: job_logs table, /paginated filtering, log tailing - #132

Open
pconrad wants to merge 1 commit into
mainfrom
pc-lib-jobs-v0.2.0
Open

Bump lib-jobs to v0.2.0: job_logs table, /paginated filtering, log tailing#132
pconrad wants to merge 1 commit into
mainfrom
pc-lib-jobs-v0.2.0

Conversation

@pconrad

@pconrad pconrad commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bumps lib-jobs from v0.1.1 to v0.2.0. Dining is the pilot app for this release, chosen because it has no real users yet and no historical job-log data to backfill (see lib-jobs DESIGN.md §8).
  • v0.2.0 replaces the single jobs.log TEXT column with a normalized job_logs table (one row per log line), eliminating an O(N²) read-modify-write and a status-clobbering bug the old design enabled.
  • The new job_logs table ships as a Liquibase changeset inside the library jar's own bundled changelog, which this app already includes wholesale — no app-level Liquibase changeset or code change is needed here beyond the version bump.
  • /api/jobs/paginated gains optional filter query params (status, jobName, createdByEmail, scopeType, scopeId) and a widened sort allowlist; a new GET /api/jobs/logs/{id}/tail?afterId= endpoint supports incremental live-tailing of a running job's log. Dining has no frontend jobs UI yet, so these are being validated via a live dokku smoke test rather than a frontend change.

Test plan

  • mvn test — all tests pass, job_logs changeset applies cleanly against H2 (ddl-auto=validate)
  • mvn verify — jacoco 100%
  • mvn org.pitest:pitest-maven:mutationCoverage — 217/217 mutations killed
  • Verified com.github.ucsb-cs156:lib-jobs:v0.2.0 resolves from JitPack on a cold ~/.m2 cache
  • CI green
  • Live dokku smoke test: launch a test job, confirm /api/jobs/all, /api/jobs/logs/{id}, and /api/jobs/logs/{id}/tail all behave correctly against Postgres

🤖 Generated with Claude Code

…iling

v0.2.0 replaces jobs.log (single TEXT column) with a normalized
job_logs table (see ucsb-cs156/lib-jobs's DESIGN.md §8). Dining is
the pilot app for this migration, chosen because it has no real
users yet and no historical job-log data to backfill: the new
job_logs changeset ships inside the library jar's own bundled
changelog, which this app already includes wholesale, so no
app-level Liquibase changeset or code change is needed here beyond
the version bump.

/paginated also gains optional filter query params and a new
incremental GET /logs/{id}/tail endpoint for live-tailing running
jobs; dining has no frontend jobs UI yet, so these are validated via
a live dokku smoke test rather than a frontend change.

Backend: all tests pass, jacoco 100%, pitest 217/217 mutations killed.
(git-code-format-maven-plugin's pre-commit hook fails in this git
worktree with an unrelated JGit "bare repository" error; the
equivalent validate-code-format check already passed via mvn verify,
and CI runs it again server-side on the PR.)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant