Skip to content

Resolve copied-job logs, artifacts, and test results to the original job#1110

Open
skipi wants to merge 4 commits into
mk/job-rerun/job-level-partial-rerunfrom
mk/job-rerun/job-lineage-read-path
Open

Resolve copied-job logs, artifacts, and test results to the original job#1110
skipi wants to merge 4 commits into
mk/job-rerun/job-level-partial-rerunfrom
mk/job-rerun/job-lineage-read-path

Conversation

@skipi

@skipi skipi commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Read-path resolution for copied jobs. Stacked on #1095 (which is stacked on #1094). This is the documented blocker for enabling the job-level partial rerun feature flag.

Copied jobs produced by a job-level partial rerun are lightweight rows: their logs, artifacts, and test results live under the original job's id. This PR makes the UI resolve that lineage.

Foundation

  • server_farm.job vendored proto: additive original_job_id field (28) on the Job message (zebra + front copies; field 26 stays reserved)
  • zebra: InternalJobApi.Serializer includes original_job_id, so job describe/list expose it
  • front: Models.Job carries original_job_id and provides the single resolve rule source_job_id/1 (original_job_id || id)

Front indirection (all through source_job_id/1)

  • job page: log events, raw logs (incl. the self-hosted loghub redirect + logs_url), agent log artifacts, loghub token generation
  • artifacts tab: listing and downloads
  • test results tab: test-results/junit.json signed URL
  • velocity job summary preload

Kept on the copy's own id (deliberate)

  • status, badge, pollman polling, block lookup in the pipeline view
  • artifact destroy — deleting from a copy's page must never delete the original's artifacts (it is a no-op on the copy's empty store)

UI

  • "Copied job" banner on the job page linking to the original job (member layout; the guest page renders without the layout and keeps current behavior)
  • Copied badge in pipeline/block job lists is deferred: the pipeline describe payload carries no per-job lineage today

Storage services stay lineage-unaware: requesting a copy's id returns that id's (empty) data, and API consumers resolve via original_job_id from job describe themselves.

Tests

  • zebra: .describe round-trip for a copied job returns original_job_id; regular jobs return ""
  • front: source_job_id/1 units; copied-job page renders the banner with a link to the original

🤖 Generated with Claude Code

@github-project-automation github-project-automation Bot moved this to Backlog in Roadmap Jul 14, 2026
@skipi skipi changed the title Expose copied-job lineage on the internal job read path Resolve copied-job logs, artifacts, and test results to the original job Jul 14, 2026
@skipi
skipi force-pushed the mk/job-rerun/job-lineage-read-path branch from 898da89 to 4bd8537 Compare July 15, 2026 09:23
@skipi
skipi force-pushed the mk/job-rerun/job-level-partial-rerun branch from a471dc0 to daf5bb8 Compare July 21, 2026 07:52
skipi and others added 4 commits July 21, 2026 09:52
Additive field 28 on the Job message (26 stays reserved) so the internal
job describe/list surface can expose copied-job lineage to consumers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
source_job_id/1 returns the original job's id for copies and the job's
own id otherwise; execution-data reads (logs, artifacts, test results)
will go through it while identity and status keep the copy's own id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copied jobs read their logs (live events, raw, self-hosted redirect),
artifact listings/downloads, junit test results, and velocity summary
via source_job_id/1. Identity surfaces (status, badge, block lookup)
and artifact destroy keep the copy's own id, so deleting from a copy
can never touch the original's artifacts. The job page shows a banner
linking to the original job.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@skipi
skipi force-pushed the mk/job-rerun/job-lineage-read-path branch from 4bd8537 to bbe8416 Compare July 21, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant