Skip to content

Commit acc982d

Browse files
Merge pull request #1055 from jacobweinstock/workflow-bug
Fix Workflow's not moving out of STATE_PREPARING: ## Description <!--- Please describe what this PR is going to change --> This resolves an issue where a Workflow with only BootOption -> `toggleAllowNetboot: true` will stay indefinitely in a preparing state. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 66c3d7c + 2fe31e9 commit acc982d

File tree

8 files changed

+13
-7
lines changed

8 files changed

+13
-7
lines changed

cmd/tink-agent/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.20.3
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
6+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
77

88
COPY bin/tink-agent-${TARGETOS}-${TARGETARCH} /usr/bin/tink-agent
99

cmd/tink-controller-v1alpha2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.20.3
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
6+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
77

88
COPY bin/tink-controller-v1alpha2-${TARGETOS}-${TARGETARCH} /usr/bin/tink-controller
99

cmd/tink-controller/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.20.3
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
6+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
77

88
COPY bin/tink-controller-${TARGETOS}-${TARGETARCH} /usr/bin/tink-controller
99

cmd/tink-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG TARGETARCH
55

66
EXPOSE 42113 42114
77

8-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
8+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
99

1010
COPY bin/tink-server-${TARGETOS}-${TARGETARCH} /usr/bin/tink-server
1111

cmd/tink-worker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.20.3
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
6+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
77

88
COPY bin/tink-worker-${TARGETOS}-${TARGETARCH} /usr/bin/tink-worker
99

cmd/virtual-worker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:3.20.3
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0
6+
RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1
77

88
COPY bin/virtual-worker-${TARGETOS}-${TARGETARCH} /usr/bin/virtual-worker
99

internal/deprecated/workflow/pre.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ func (s *state) prepareWorkflow(ctx context.Context) (reconcile.Result, error) {
121121
return r, err
122122
}
123123
}
124+
s.workflow.Status.State = v1alpha1.WorkflowStatePending
124125

125126
return reconcile.Result{}, nil
126127
}

internal/deprecated/workflow/pre_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ func TestPrepareWorkflow(t *testing.T) {
3434
hardware: &v1alpha1.Hardware{},
3535
wantHardware: &v1alpha1.Hardware{},
3636
workflow: &v1alpha1.Workflow{},
37-
wantWorkflow: &v1alpha1.Workflow{},
37+
wantWorkflow: &v1alpha1.Workflow{
38+
Status: v1alpha1.WorkflowStatus{
39+
State: v1alpha1.WorkflowStatePending,
40+
},
41+
},
3842
},
3943
"toggle allowPXE": {
4044
wantResult: reconcile.Result{},
@@ -82,6 +86,7 @@ func TestPrepareWorkflow(t *testing.T) {
8286
},
8387
wantWorkflow: &v1alpha1.Workflow{
8488
Status: v1alpha1.WorkflowStatus{
89+
State: v1alpha1.WorkflowStatePending,
8590
BootOptions: v1alpha1.BootOptionsStatus{
8691
AllowNetboot: v1alpha1.AllowNetbootStatus{
8792
ToggledTrue: true,

0 commit comments

Comments
 (0)