ci / test (push) Failing after 5s
Implements real activity-calling logic in OrchestratorWorkflow and TaskUnitWorkflow (previously stubs), adds GitDiffActivity, and expands PlanningActivity's I/O to carry repo path and prior task results. Adds k8s/ deployment manifests (worker Deployment, orchestrator Job, Kustomize base) for the poimen-workflows Temporal worker, using a dedicated Kubernetes namespace `poimen` and Temporal namespace `poimen-harness` rather than sharing the Temporal server's own `temporal`/`production` namespaces.
51 lines
1.2 KiB
Go
51 lines
1.2 KiB
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
// TemporalConfig holds Temporal cluster configuration.
|
|
type TemporalConfig struct {
|
|
HostPort string // default: 127.0.0.1:7233
|
|
Namespace string // default: production
|
|
TLSCert string // env: TEMPORAL_TLS_CERT (file path)
|
|
TLSKey string // env: TEMPORAL_TLS_KEY (file path)
|
|
}
|
|
|
|
// AppConfig holds application configuration.
|
|
type AppConfig struct {
|
|
Temporal TemporalConfig
|
|
AnthropicAPIKey string
|
|
}
|
|
|
|
// LoadConfig loads application configuration from environment variables.
|
|
func LoadConfig() (AppConfig, error) {
|
|
cfg := AppConfig{
|
|
Temporal: TemporalConfig{
|
|
HostPort: addDefaultPort(getEnvOrDefault("TEMPORAL_HOSTPORT", "127.0.0.1:7233")),
|
|
Namespace: getEnvOrDefault("TEMPORAL_NAMESPACE", "poimen-harness"),
|
|
TLSCert: os.Getenv("TEMPORAL_TLS_CERT"),
|
|
TLSKey: os.Getenv("TEMPORAL_TLS_KEY"),
|
|
},
|
|
AnthropicAPIKey: os.Getenv("ANTHROPIC_API_KEY"),
|
|
}
|
|
|
|
return cfg, nil
|
|
}
|
|
|
|
func getEnvOrDefault(key, defaultVal string) string {
|
|
if val := os.Getenv(key); val != "" {
|
|
return val
|
|
}
|
|
return defaultVal
|
|
}
|
|
|
|
func addDefaultPort(hostPort string) string {
|
|
// If no port specified, add default port 7233
|
|
if !strings.Contains(hostPort, ":") {
|
|
return hostPort + ":7233"
|
|
}
|
|
return hostPort
|
|
}
|