From 350282ce29b7dc2fd606376f6d93a099d772f21f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 21 Aug 2023 09:29:45 +0200 Subject: [PATCH] make WOODPECKER_MIGRATIONS_ALLOW_LONG have an actuall effect (#2251) close #2079 as we sett the global vars **after** migrations we did never had a chance to propagate a **true** in WOODPECKER_MIGRATIONS_ALLOW_LONG to the migrations ... --------- Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> --- cmd/server/server.go | 1 - cmd/server/setup.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/server/server.go b/cmd/server/server.go index 719669fe5..0753deee9 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -354,7 +354,6 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { server.Config.Pipeline.Networks = c.StringSlice("network") server.Config.Pipeline.Volumes = c.StringSlice("volume") server.Config.Pipeline.Privileged = c.StringSlice("escalate") - server.Config.Server.Migrations.AllowLong = c.Bool("migrations-allow-long") server.Config.Server.EnableSwagger = c.Bool("enable-swagger") // prometheus diff --git a/cmd/server/setup.go b/cmd/server/setup.go index dd907c917..320762a30 100644 --- a/cmd/server/setup.go +++ b/cmd/server/setup.go @@ -52,6 +52,8 @@ import ( ) func setupStore(c *cli.Context) (store.Store, error) { + // TODO: find a better way than global var to pass down to allow long migrations + server.Config.Server.Migrations.AllowLong = c.Bool("migrations-allow-long") datasource := c.String("datasource") driver := c.String("driver") xorm := store.XORM{