From 2184b29eb9418afce699f7562e3df144ed58314c Mon Sep 17 00:00:00 2001 From: Jeff Welling Date: Tue, 15 Sep 2026 15:42:47 -0700 Subject: [PATCH] chore: remove kafka pkg, move influxdb off bitnami mirror (IP-3481) Co-Authored-By: Claude --- .../components/blockchain/sui_faucet_test.go | 8 +- lib/k8s/config/overrides.go | 4 + lib/k8s/pkg/helm/influxdb/influxdb.go | 63 ++++---- lib/k8s/pkg/helm/kafka/kafka.go | 147 ------------------ wasp/benchspy/report.go | 2 +- 5 files changed, 35 insertions(+), 189 deletions(-) delete mode 100644 lib/k8s/pkg/helm/kafka/kafka.go diff --git a/framework/components/blockchain/sui_faucet_test.go b/framework/components/blockchain/sui_faucet_test.go index 67fea5ac0..61d7fc9ee 100644 --- a/framework/components/blockchain/sui_faucet_test.go +++ b/framework/components/blockchain/sui_faucet_test.go @@ -45,10 +45,10 @@ func TestIsRetryableFaucetErr(t *testing.T) { // faucetStub is a configurable /gas handler that can fail the first N requests with // either an HTTP 5xx or a connection reset (hijack+close), then succeed. type faucetStub struct { - failN int32 // number of requests to fail - resetMode bool // true: hijack+close (transport reset); false: 503 - hits atomic.Int32 - successOK atomic.Bool + failN int32 // number of requests to fail + resetMode bool // true: hijack+close (transport reset); false: 503 + hits atomic.Int32 + successOK atomic.Bool } func (f *faucetStub) ServeHTTP(w http.ResponseWriter, r *http.Request) { diff --git a/lib/k8s/config/overrides.go b/lib/k8s/config/overrides.go index efeb91711..dba16672a 100644 --- a/lib/k8s/config/overrides.go +++ b/lib/k8s/config/overrides.go @@ -106,6 +106,10 @@ const ( EnvVarLocalChartsUserDescription = "Use local charts from the CTF repository directly" EnvVarLocalChartsExample = "true" + EnvVarInfluxdbImageRegistry = "INFLUXDB_IMAGE_REGISTRY" + EnvVarInfluxdbImageRegistryDescription = "Registry host for the influxdb image (default: ECR docker-io PTC)" + EnvVarInfluxdbImageRegistryExample = "804282218731.dkr.ecr.us-west-2.amazonaws.com" + EnvBase64ConfigOverride = "BASE64_CONFIG_OVERRIDE" EnvBase64ConfigOverriderDescription = "Base64-encoded TOML config (should contain at least chainlink image and version)" EnvBase64ConfigOverrideExample = "W0NoYWlubGlua0ltYWdlXQppbWFnZT0icHVibGljLmVjci5hd3MvY2hhaW5saW5rL2NoYWlubGluayIKdmVyc2lvbj0iMi43LjEtYXV0b21hdGlvbi0yMDIzMTEyNyIKCltBdXRvbWF0aW9uXQpbQXV0b21hdGlvbi5HZW5lcmFsXQpkdXJhdGlvbj0yMDAK" diff --git a/lib/k8s/pkg/helm/influxdb/influxdb.go b/lib/k8s/pkg/helm/influxdb/influxdb.go index 207d376f1..340fd7b74 100644 --- a/lib/k8s/pkg/helm/influxdb/influxdb.go +++ b/lib/k8s/pkg/helm/influxdb/influxdb.go @@ -8,6 +8,12 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment" ) +// influxdataChartURL pins the chart version; helm ignores --version for URL refs. +const ( + influxdataChartURL = "https://github.com/influxdata/helm-charts/releases/download/influxdb-4.12.5/influxdb-4.12.5.tgz" + defaultImageRegistry = "804282218731.dkr.ecr.us-west-2.amazonaws.com" +) + type Props struct { } @@ -55,59 +61,42 @@ func (m Chart) ExportData(e *environment.Environment) error { func defaultProps(reg string) map[string]interface{} { return map[string]interface{}{ - "global": map[string]interface{}{ - "security": map[string]interface{}{ - "allowInsecureImages": true, - }, - }, "image": map[string]interface{}{ - "registry": reg, - "repository": "containers/debian-12", - "tag": "3.4.2", - }, - "auth": map[string]interface{}{ - "enabled": "false", + "repository": fmt.Sprintf("%s/docker-io/library/influxdb", reg), + "tag": "1.8.10-alpine", }, - "influxdb": map[string]interface{}{ - "readinessProbe": map[string]interface{}{ - "enabled": false, - }, - "livenessProbe": map[string]interface{}{ - "enabled": false, + "resources": map[string]interface{}{ + "limits": map[string]interface{}{ + "memory": "19000Mi", + "cpu": "6", }, - "startupProbe": map[string]interface{}{ - "enabled": false, - }, - "resources": map[string]interface{}{ - "limits": map[string]interface{}{ - "memory": "19000Mi", - "cpu": "6", - }, - "requests": map[string]interface{}{ - "memory": "16000Mi", - "cpu": "5", - }, + "requests": map[string]interface{}{ + "memory": "16000Mi", + "cpu": "5", }, }, } } +func registry() string { + if reg := os.Getenv(config.EnvVarInfluxdbImageRegistry); reg != "" { + return reg + } + return defaultImageRegistry +} + func New(props map[string]interface{}) environment.ConnectedChart { return NewVersioned("", props) } -// NewVersioned enables choosing a specific helm chart version +// NewVersioned keeps its signature for API compatibility; the chart version is pinned in influxdataChartURL and the version argument is ignored. func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { - reg := os.Getenv("BITNAMI_PRIVATE_REGISTRY") - if reg == "" { - panic("BITNAMI_PRIVATE_REGISTRY not set, it is required for Helm charts") - } - dp := defaultProps(reg) + dp := defaultProps(registry()) config.MustMerge(&dp, props) return Chart{ Name: "influxdb", - Path: fmt.Sprintf("%s/charts/debian-12/influxdb:7.1.47", reg), + Path: influxdataChartURL, Values: &dp, - Version: helmVersion, + Version: "", } } diff --git a/lib/k8s/pkg/helm/kafka/kafka.go b/lib/k8s/pkg/helm/kafka/kafka.go deleted file mode 100644 index da201dd16..000000000 --- a/lib/k8s/pkg/helm/kafka/kafka.go +++ /dev/null @@ -1,147 +0,0 @@ -package kafka - -import ( - "fmt" - os "os" - - "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/config" - "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment" -) - -type Props struct { -} - -type Chart struct { - Name string - Path string - Version string - Props *Props - Values *map[string]interface{} -} - -func (m Chart) IsDeploymentNeeded() bool { - return true -} - -func (m Chart) GetName() string { - return m.Name -} - -func (m Chart) GetPath() string { - return m.Path -} - -func (m Chart) GetVersion() string { - return m.Version -} - -func (m Chart) GetProps() interface{} { - return m.Props -} - -func (m Chart) GetValues() *map[string]interface{} { - return m.Values -} - -func (m Chart) GetLabels() map[string]string { - return map[string]string{ - "chain.link/component": "kafka", - } -} - -func (m Chart) ExportData(e *environment.Environment) error { - return nil -} - -func defaultProps(reg string) map[string]interface{} { - return map[string]interface{}{ - "global": map[string]interface{}{ - "security": map[string]interface{}{ - "allowInsecureImages": true, - }, - }, - "image": map[string]interface{}{ - "registry": reg, - "repository": "containers/debian-12", - "tag": "4.1.0", - "debug": true, - }, - "auth": map[string]interface{}{ - "clientProtocol": "plaintext", - "interBrokerProtocol": "plaintext", - }, - "provisioning": map[string]interface{}{ - "enabled": true, - "resources": map[string]interface{}{ - "limits": map[string]interface{}{ - "cpu": "0.1", - "memory": "500M", - }, - }, - }, - "zookeeper": map[string]interface{}{ - "persistence": map[string]interface{}{ - "enabled": true, - }, - }, - "podSecurityContext": map[string]interface{}{ - "enabled": false, - }, - "containerSecurityContext": map[string]interface{}{ - "enabled": false, - }, - "persistence": map[string]interface{}{ - "enabled": false, - }, - "livenessProbe": map[string]interface{}{ - "enabled": true, - "initialDelaySeconds": 10, - "timeoutSeconds": 5, - "failureThreshold": 3, - "periodSeconds": 10, - "successThreshold": 1, - }, - "readinessProbe": map[string]interface{}{ - "enabled": true, - "initialDelaySeconds": 5, - "failureThreshold": 6, - "timeoutSeconds": 5, - "periodSeconds": 10, - "successThreshold": 1, - }, - "startupProbe": map[string]interface{}{ - "enabled": true, - "initialDelaySeconds": 30, - "periodSeconds": 10, - "timeoutSeconds": 1, - "failureThreshold": 15, - "successThreshold": 1, - }, - "commonLabels": map[string]interface{}{ - "app": "kafka", - }, - "commonAnnotations": map[string]interface{}{ - "app": "kafka", - }, - } -} - -func New(props map[string]interface{}) environment.ConnectedChart { - return NewVersioned("", props) -} - -// NewVersioned enables choosing a specific helm chart version -func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { - reg := os.Getenv("BITNAMI_PRIVATE_REGISTRY") - if reg == "" { - panic("BITNAMI_PRIVATE_REGISTRY not set, it is required for Helm charts") - } - dp := defaultProps(reg) - config.MustMerge(&dp, props) - return Chart{ - Name: "kafka", - Path: fmt.Sprintf("%s/charts/debian-12/kafka:32.4.6", reg), - Values: &dp, - Version: helmVersion, - } -} diff --git a/wasp/benchspy/report.go b/wasp/benchspy/report.go index 5645f6513..cf5ec6ed1 100644 --- a/wasp/benchspy/report.go +++ b/wasp/benchspy/report.go @@ -553,7 +553,7 @@ func NewStandardReport(commitOrTag string, opts ...StandardReportOption) (*Stand } if config.reportDirectory != "" { - sr.LocalStorage.Directory = config.reportDirectory + sr.Directory = config.reportDirectory } L.Info().