Skip to content

fix: Refactor job status#1666

Open
Richard87 wants to merge 12 commits intomasterfrom
refactor-job-status
Open

fix: Refactor job status#1666
Richard87 wants to merge 12 commits intomasterfrom
refactor-job-status

Conversation

@Richard87
Copy link
Copy Markdown
Contributor

To avoid guesswork by operator and radix-api, the pipeline runner should own most of the RadixJob.Status field and update it as it progresses.

@Richard87 Richard87 self-assigned this Apr 14, 2026
@Richard87 Richard87 linked an issue Apr 14, 2026 that may be closed by this pull request
3 tasks
@Richard87 Richard87 force-pushed the refactor-job-status branch from 85fa402 to cc69ce7 Compare April 14, 2026 08:54
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 refactors how pipeline execution outcomes are represented by moving “pipeline runner result” data into RadixJob.Status.PipelineRunStatus, removing the prior ConfigMap-based result handoff.

Changes:

  • Adds pipelineRunStatus to RadixJobStatus and removes the legacy RadixJobResult types.
  • Updates pipeline-runner to write job result/build flags directly to the RadixJob status subresource during execution.
  • Updates operator-side job condition derivation to read from Status.PipelineRunStatus.Result (instead of a result ConfigMap) when the Kubernetes Job succeeds.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pkg/apis/radix/v1/zz_generated.deepcopy.go Updates generated deepcopy logic for the new RadixJobPipelineRunStatus pointer field.
pkg/apis/radix/v1/radixjobtypes.go Introduces PipelineRunStatus in the RadixJob status schema and removes old result types.
pkg/apis/job/kubejob.go Removes ConfigMap result parsing and derives final condition from PipelineRunStatus.Result (only on success currently).
pkg/apis/job/job.go Updates the caller to use the renamed condition finder.
pipeline-runner/main.go Removes result ConfigMap creation/teardown logic; runner now only executes and exits.
pipeline-runner/internal/runner/app.go Adds status updates to RadixJob during pipeline execution, and removes ConfigMap result creation.
charts/radix-operator/templates/radixjob.yaml Extends the CRD schema to include status.pipelineRunStatus.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pipeline-runner/internal/runner/app.go Outdated
Comment thread pipeline-runner/internal/runner/app.go
Comment thread pipeline-runner/internal/runner/app.go Outdated
Comment thread pipeline-runner/internal/runner/app.go
Comment thread pkg/apis/job/kubejob.go
type RadixJobPipelineRunStatus struct {
UsedBuildKit bool `json:"usedBuildKit"`
UsedBuildCache bool `json:"usedBuildCache"`
Result RadixJobCondition `json:"status"`
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

In RadixJobPipelineRunStatus, the Go field is named Result but is serialized as JSON status. Since this is a new API surface, it’s likely clearer to align the field name with the JSON name (e.g., Status or Condition) or align the JSON tag with the field name, to reduce confusion for readers and API consumers.

Suggested change
Result RadixJobCondition `json:"status"`
Status RadixJobCondition `json:"status"`

Copilot uses AI. Check for mistakes.
@Richard87 Richard87 marked this pull request as ready for review April 15, 2026 12:21
@Richard87 Richard87 requested a review from nilsgstrabo April 15, 2026 12:21
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.

Migrate ACR tasks to Buildkit

2 participants