Skip to content

Commit b308e95

Browse files
committed
fix: Add missing Kafka config setting after the viper upgrade
1 parent e5c982f commit b308e95

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

internal/pkg/configuration/builder/viper.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,8 @@ func (vb *ViperBuilder) Build() (*viper.Viper, error) {
7373
vb.vConf.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
7474
vb.vConf.AutomaticEnv()
7575

76-
// Bind the ENV values manually.
77-
//
78-
// Workaround for `Unmarshal` which doesn't respect the environment
79-
// variables when loading the values.
80-
//
81-
// See: https://github.com/spf13/viper/issues/761
82-
for _, k := range vb.vConf.AllKeys() {
76+
allKeys := vb.vConf.AllKeys()
77+
for _, k := range allKeys {
8378
if err := vb.vConf.BindEnv(strings.ToUpper(k)); err != nil {
8479
return nil, fmt.Errorf("Could not configure %s for ENV %s", k, env)
8580
}

pkg/pubsub/testdata/config/pubsub.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ test: &test
2323
subscriber:
2424
topic: "test-topic"
2525
group_id: ""
26+
auto_commit:
27+
enabled: true
2628
tls:
2729
enabled: false
2830
ca: ""

0 commit comments

Comments
 (0)