Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Dependabot version updates for Go modules and GitHub Actions (`.github/dependabot.yml`), running weekly on Mondays
- Scheduled workflow (`.github/workflows/update-tool-versions.yaml`) that runs `scripts/update-tool-versions.sh` every Monday and opens a PR when `ZARF_VERSION` or `UDS_VERSION` change upstream; fills the gap Dependabot leaves since its Docker ecosystem only tracks `FROM` lines, not `ARG` values
### Added
- `TestDeriveConditions_ReconcilingReason`: covers all six phases to verify the `Reconciling` reason is correct for terminal vs in-progress states
- `TestDeriveConditions_DeterministicOrder`: asserts two `DeriveConditions` calls with identical input produce identical condition order

### Fixed
- `Reconciling` condition `Reason` was always `Progressing` even when `Status=False` (terminal); now correctly reflects the outcome — `Succeeded` when `PhaseCompleted`, `Failed` when `PhaseFailed`
- Per-operation conditions in the status slice had non-deterministic order (map iteration); `OperationConditionTypes` is now an ordered slice so conditions appear in stable order (`build → create → publish → deploy`)

### Changed
- `ConditionReasonSuspended` comment updated to clearly mark it as a forward declaration for a future `spec.suspend` feature
- `conditionsToUnstructured` now logs via `klog.ErrorS` when a condition cannot be converted rather than silently dropping it

## [0.12.0] - 2026-05-29

Expand Down
63 changes: 63 additions & 0 deletions chart/forge/crds/forge.dev_udsbundlejobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,69 @@ spec:
status:
description: UDSBundleJobStatus defines the observed state of a UDSBundleJob
properties:
conditions:
description: |-
Conditions is the standard Kubernetes condition array for this job.
The Ready condition reflects the overall outcome; per-operation conditions
(CreateSucceeded, PublishSucceeded, DeploySucceeded) track individual steps.
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
createStatus:
description: CreateStatus tracks the create operation status
properties:
Expand Down
63 changes: 63 additions & 0 deletions chart/forge/crds/forge.dev_zarfpackagejobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,69 @@ spec:
format: date-time
type: string
type: object
conditions:
description: |-
Conditions is the standard Kubernetes condition array for this job.
The Ready condition reflects the overall outcome; per-operation conditions
(BuildSucceeded, PublishSucceeded, DeploySucceeded) track individual steps.
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
deployStatus:
description: DeployStatus contains deploy operation status
properties:
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/uds/v1alpha3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,14 @@ type UDSBundleJobStatus struct {
// +optional
Message string `json:"message,omitempty"`

// Conditions is the standard Kubernetes condition array for this job.
// The Ready condition reflects the overall outcome; per-operation conditions
// (CreateSucceeded, PublishSucceeded, DeploySucceeded) track individual steps.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`

// CreateStatus tracks the create operation status
// +optional
CreateStatus *OperationStatus `json:"createStatus,omitempty"`
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/uds/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/apis/zarf/v1alpha3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,14 @@ type ZarfPackageJobStatus struct {
// +optional
Message string `json:"message,omitempty"`

// Conditions is the standard Kubernetes condition array for this job.
// The Ready condition reflects the overall outcome; per-operation conditions
// (BuildSucceeded, PublishSucceeded, DeploySucceeded) track individual steps.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`

// BuildStatus contains build operation status
// +optional
BuildStatus *OperationStatus `json:"buildStatus,omitempty"`
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/zarf/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions pkg/constants/conditions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package constants

const (
// ConditionTypeReady indicates the overall job completed successfully.
// True=succeeded, False=failed terminally, Unknown=in progress.
ConditionTypeReady = "Ready"

// ConditionTypeReconciling indicates the controller is actively working on the job.
ConditionTypeReconciling = "Reconciling"

// ConditionTypeBuildSucceeded reflects the build operation outcome.
ConditionTypeBuildSucceeded = "BuildSucceeded"

// ConditionTypeCreateSucceeded reflects the UDS create operation outcome.
ConditionTypeCreateSucceeded = "CreateSucceeded"

// ConditionTypePublishSucceeded reflects the publish operation outcome.
ConditionTypePublishSucceeded = "PublishSucceeded"

// ConditionTypeDeploySucceeded reflects the deploy operation outcome.
ConditionTypeDeploySucceeded = "DeploySucceeded"
)

const (
// ConditionReasonSucceeded is used when an operation or job completed successfully.
ConditionReasonSucceeded = "Succeeded"
// ConditionReasonFailed is used when an operation or job terminated with an error.
ConditionReasonFailed = "Failed"
// ConditionReasonProgressing is used while an operation or job is in flight.
ConditionReasonProgressing = "Progressing"
// ConditionReasonSuspended is reserved for when spec.suspend is added.
// Not yet wired; defined here so the constant is stable when that feature lands.
ConditionReasonSuspended = "Suspended"
)

// OperationConditionTypes maps OperationStatus JSON field names to condition types.
// Keys must match the json tags on the status types exactly — renaming a status
// field requires updating this list in sync.
// Slice order determines the order conditions appear in the status output.
var OperationConditionTypes = []struct {
Field string
CondType string
}{
{"buildStatus", ConditionTypeBuildSucceeded},
{"createStatus", ConditionTypeCreateSucceeded},
{"publishStatus", ConditionTypePublishSucceeded},
{"deployStatus", ConditionTypeDeploySucceeded},
}
Loading
Loading