From bf2fa91690973316f049ad9816cf6da0a5eebc2b Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 5 Nov 2020 16:30:04 +0100 Subject: [PATCH 1/4] do not override config, use shallow copy instead --- accounts/pkg/command/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/pkg/command/server.go b/accounts/pkg/command/server.go index 781edfc7445..a55671f2e1b 100644 --- a/accounts/pkg/command/server.go +++ b/accounts/pkg/command/server.go @@ -57,8 +57,8 @@ func Server(cfg *config.Config) *cli.Command { http.Context(ctx), http.Config(cfg), http.Metrics(mtrcs), - http.Flags(flagset.RootWithConfig(cfg)), - http.Flags(flagset.ServerWithConfig(cfg)), + http.Flags(flagset.RootWithConfig(config.New())), + http.Flags(flagset.ServerWithConfig(config.New())), http.Handler(handler), ) From dbbe58e440fa0a7dba8c47ed574ae1ab8e909322 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 5 Nov 2020 16:33:40 +0100 Subject: [PATCH 2/4] add changelog file --- changelog/unreleased/fix-672.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/fix-672.md diff --git a/changelog/unreleased/fix-672.md b/changelog/unreleased/fix-672.md new file mode 100644 index 00000000000..64ea95619b4 --- /dev/null +++ b/changelog/unreleased/fix-672.md @@ -0,0 +1,6 @@ +Bugfix: Accounts config sometimes being overwritten + +Tags: accounts + +Sometimes when running the accounts extensions flags were not being taken into consideration. + From ecd2b8474d2f7bdafcb97b9cd502fe86d12de482 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 5 Nov 2020 16:40:35 +0100 Subject: [PATCH 3/4] ditto for seettings & webdav --- settings/pkg/command/server.go | 7 ++++--- webdav/pkg/command/server.go | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/settings/pkg/command/server.go b/settings/pkg/command/server.go index f08b7340908..8f7774e92dc 100644 --- a/settings/pkg/command/server.go +++ b/settings/pkg/command/server.go @@ -2,12 +2,13 @@ package command import ( "context" - "github.com/owncloud/ocis/settings/pkg/metrics" "os" "os/signal" "strings" "time" + "github.com/owncloud/ocis/settings/pkg/metrics" + "contrib.go.opencensus.io/exporter/jaeger" "contrib.go.opencensus.io/exporter/ocagent" "contrib.go.opencensus.io/exporter/zipkin" @@ -143,8 +144,8 @@ func Server(cfg *config.Config) *cli.Command { http.Context(ctx), http.Config(cfg), http.Metrics(mtrcs), - http.Flags(flagset.RootWithConfig(cfg)), - http.Flags(flagset.ServerWithConfig(cfg)), + http.Flags(flagset.RootWithConfig(config.New())), + http.Flags(flagset.ServerWithConfig(config.New())), ) gr.Add(server.Run, func(_ error) { diff --git a/webdav/pkg/command/server.go b/webdav/pkg/command/server.go index 2759b2d52e9..7218a98f985 100644 --- a/webdav/pkg/command/server.go +++ b/webdav/pkg/command/server.go @@ -139,8 +139,8 @@ func Server(cfg *config.Config) *cli.Command { http.Context(ctx), http.Config(cfg), http.Metrics(metrics), - http.Flags(flagset.RootWithConfig(cfg)), - http.Flags(flagset.ServerWithConfig(cfg)), + http.Flags(flagset.RootWithConfig(config.New())), + http.Flags(flagset.ServerWithConfig(config.New())), ) if err != nil { From da25289ccc93f313622488ebcc625225633797be Mon Sep 17 00:00:00 2001 From: Alex Unger Date: Tue, 10 Nov 2020 19:20:20 +0100 Subject: [PATCH 4/4] Update fix-672.md --- changelog/unreleased/fix-672.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/unreleased/fix-672.md b/changelog/unreleased/fix-672.md index 64ea95619b4..9f42986baa4 100644 --- a/changelog/unreleased/fix-672.md +++ b/changelog/unreleased/fix-672.md @@ -4,3 +4,4 @@ Tags: accounts Sometimes when running the accounts extensions flags were not being taken into consideration. +https://github.com/owncloud/ocis/pull/808