Skip to content

Commit 7740b47

Browse files
authored
chore(agentrun): update agent harness default opencode version to 0.6.8 (#567)
* fix(agentrun): update agent harness default opencode version to 0.6.8 * fix(agent-runtime): handle nil receiver in ToAgentRuntimeConfigRaw and ToOpenCodeConfigRaw methods * fix(agentrun): handle nil config in agent run processing
1 parent 47e5dfe commit 7740b47

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

api/v1alpha1/agentruntime_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ type AgentRuntimeConfig struct {
7474
}
7575

7676
func (in *AgentRuntimeConfig) ToAgentRuntimeConfigRaw(secretGetter func(corev1.SecretKeySelector) (*corev1.Secret, error)) (*AgentRuntimeConfigRaw, error) {
77+
if in == nil {
78+
return nil, nil
79+
}
80+
7781
openCode, err := in.OpenCode.ToOpenCodeConfigRaw(secretGetter)
7882
if err != nil {
7983
return nil, err
@@ -153,6 +157,10 @@ type OpenCodeConfig struct {
153157
}
154158

155159
func (in *OpenCodeConfig) ToOpenCodeConfigRaw(secretGetter func(corev1.SecretKeySelector) (*corev1.Secret, error)) (*OpenCodeConfigRaw, error) {
160+
if in == nil {
161+
return nil, nil
162+
}
163+
156164
tokenSecret, err := secretGetter(in.TokenSecretRef)
157165
if err != nil {
158166
return nil, err

internal/controller/agentrun_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ func (r *AgentRunReconciler) getSecretData(run *v1alpha1.AgentRun, config *v1alp
284284
EnvAgentRunID: run.Status.GetID(),
285285
}
286286

287+
if config == nil {
288+
return result
289+
}
290+
287291
if runtimeType == console.AgentRuntimeTypeOpencode {
288292
if config.OpenCode == nil {
289293
return result

internal/controller/agentrun_pod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var (
2626

2727
defaultContainerVersions = map[console.AgentRuntimeType]string{
2828
console.AgentRuntimeTypeGemini: "latest", // TODO
29-
console.AgentRuntimeTypeOpencode: "0.6.5-opencode-0.15.4",
29+
console.AgentRuntimeTypeOpencode: "0.6.8-opencode-0.15.4",
3030
}
3131

3232
defaultTmpVolume = corev1.Volume{

0 commit comments

Comments
 (0)