diff --git a/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml b/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml index ef9952e2..5244e0fc 100644 --- a/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml +++ b/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml @@ -80,7 +80,7 @@ spec: certificatePath: {{ .Values.keyVault.azureKeyVault.certificatePath }} secretKey: {{ .Values.keyVault.azureKeyVault.secretKey }} {{- else }} - {{- fail "Unsupported vaultConfig type: " .Values.vaultConfig.type }} + {{- fail "Unsupported keyVault type: " .Values.keyVault.type }} {{- end }} {{- end }} diff --git a/cmd/ghalistener/config/config.go b/cmd/ghalistener/config/config.go index e8cf1192..0df638bc 100644 --- a/cmd/ghalistener/config/config.go +++ b/cmd/ghalistener/config/config.go @@ -91,7 +91,11 @@ func Read(ctx context.Context, configPath string) (*Config, error) { return nil, fmt.Errorf("config validation failed: %w", err) } - return &config, ctx.Err() + if ctx.Err() != nil { + return nil, ctx.Err() + } + + return &config, nil } // Validate checks the configuration for errors. diff --git a/cmd/ghalistener/config/config_validation_test.go b/cmd/ghalistener/config/config_validation_test.go index 308a0e3d..18551f66 100644 --- a/cmd/ghalistener/config/config_validation_test.go +++ b/cmd/ghalistener/config/config_validation_test.go @@ -69,7 +69,7 @@ func TestConfigValidationAppKey(t *testing.T) { RunnerScaleSetId: 1, } err := config.Validate() - expectedError := "AppConfig validation failed: no credentials provided: either a PAT or GitHub App credentials should be provide" + expectedError := "AppConfig validation failed: no credentials provided: either a PAT or GitHub App credentials should be provided" assert.ErrorContains(t, err, expectedError, "Expected error about missing auth") }) }