diff options
author | Leo | 2021-04-07 09:11:36 +0800 |
---|---|---|
committer | Leo | 2021-04-07 09:15:23 +0800 |
commit | ecc33f56b1997df43867d53c51434f12a6542941 (patch) | |
tree | 34c4de45b3cba3652a8f5716a7baf5e319af1791 | |
parent | 797ba144088558d6db5491b22221786330fcc573 (diff) | |
download | aur-ecc33f56b1997df43867d53c51434f12a6542941.tar.gz |
New upstream version 2.0.4
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | 00-worker-log-level-info.patch | 22 | ||||
-rw-r--r-- | 03-rr-binary-log-output.patch | 532 | ||||
-rw-r--r-- | PKGBUILD | 25 |
4 files changed, 16 insertions, 578 deletions
@@ -1,23 +1,18 @@ pkgbase = roadrunner pkgdesc = High-performance PHP application server, load-balancer and process manager written in Golang - pkgver = 2.0.3 + pkgver = 2.0.4 pkgrel = 1 url = https://roadrunner.dev/ arch = x86_64 license = MIT makedepends = go>=1.16 - depends = php>=7.3 options = !buildflags - source = roadrunner-binary-2.0.3.tar.gz::https://github.com/spiral/roadrunner-binary/archive/v2.0.3.tar.gz - source = roadrunner-2.0.3.tar.gz::https://github.com/spiral/roadrunner/archive/v2.0.3.tar.gz + source = roadrunner-binary-2.0.4.tar.gz::https://github.com/spiral/roadrunner-binary/archive/v2.0.4.tar.gz + source = roadrunner-2.0.4.tar.gz::https://github.com/spiral/roadrunner/archive/v2.0.4.tar.gz source = .rr.yaml.sample-full source = .rr.yaml.sample-minimal - source = 00-worker-log-level-info.patch - source = 03-rr-binary-log-output.patch - sha256sums = aec72f655d477347e8ce6dd7fb1cd7ca4c581d1e9b4c3dc1e25bfa86af16d1ad - sha256sums = 65604afd79cb8a27458d82f74c9340f03d905aca115bc18c6d208ad3cd88d4ff - sha256sums = SKIP - sha256sums = SKIP + sha256sums = 2625a698a7a6f2ada05ca1333066923eca1cf1503ceb1e045138adb2d12561cf + sha256sums = 14ab387b378fd7909f5dc6e8be22442ca14fb5353ae1ef55ab70dea0381a5fd3 sha256sums = SKIP sha256sums = SKIP diff --git a/00-worker-log-level-info.patch b/00-worker-log-level-info.patch deleted file mode 100644 index c41c9c5cd37c..000000000000 --- a/00-worker-log-level-info.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go -index 95e593b..476f85d 100644 ---- a/plugins/server/plugin.go -+++ b/plugins/server/plugin.go -@@ -241,7 +241,7 @@ func (server *Plugin) collectEvents(event interface{}) { - server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) - case events.EventWorkerStderr: - // TODO unsafe byte to string convert -- server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) -+ server.log.Info(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) - } - } - } -@@ -255,7 +255,7 @@ func (server *Plugin) collectWorkerLogs(event interface{}) { - server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) - case events.EventWorkerStderr: - // TODO unsafe byte to string convert -- server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) -+ server.log.Info(strings.TrimRight(string(we.Payload.([]byte)), " \n\t")) - } - } - } diff --git a/03-rr-binary-log-output.patch b/03-rr-binary-log-output.patch deleted file mode 100644 index 8ad585660428..000000000000 --- a/03-rr-binary-log-output.patch +++ /dev/null @@ -1,532 +0,0 @@ -diff --git a/cli/plugins.go b/cli/plugins.go -deleted file mode 100644 -index b2c71bb..0000000 ---- a/cli/plugins.go -+++ /dev/null -@@ -1,53 +0,0 @@ --package cli -- --import ( -- "github.com/spiral/roadrunner/v2/plugins/gzip" -- "github.com/spiral/roadrunner/v2/plugins/headers" -- httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" -- "github.com/spiral/roadrunner/v2/plugins/informer" -- "github.com/spiral/roadrunner/v2/plugins/logger" -- "github.com/spiral/roadrunner/v2/plugins/metrics" -- "github.com/spiral/roadrunner/v2/plugins/reload" -- "github.com/spiral/roadrunner/v2/plugins/resetter" -- rpcPlugin "github.com/spiral/roadrunner/v2/plugins/rpc" -- "github.com/spiral/roadrunner/v2/plugins/server" -- "github.com/spiral/roadrunner/v2/plugins/static" -- "github.com/spiral/roadrunner/v2/plugins/status" -- "github.com/temporalio/roadrunner-temporal/activity" -- temporalClient "github.com/temporalio/roadrunner-temporal/client" -- "github.com/temporalio/roadrunner-temporal/workflow" --) -- --// Add plugins should be registered here --var plugins []interface{} = []interface{}{ -- // logger plugin -- &logger.ZapLogger{}, -- // metrics plugin -- &metrics.Plugin{}, -- // http server plugin -- &httpPlugin.Plugin{}, -- // reload plugin -- &reload.Plugin{}, -- // informer plugin (./rr workers, ./rr workers -i) -- &informer.Plugin{}, -- // resetter plugin (./rr reset) -- &resetter.Plugin{}, -- // rpc plugin (workers, reset) -- &rpcPlugin.Plugin{}, -- // server plugin (NewWorker, NewWorkerPool) -- &server.Plugin{}, -- -- // static -- &static.Plugin{}, -- // headers -- &headers.Plugin{}, -- // checker -- &status.Plugin{}, -- // gzip -- &gzip.Plugin{}, -- -- // temporal plugins -- &activity.Plugin{}, -- &workflow.Plugin{}, -- &temporalClient.Plugin{}, --} -diff --git a/cli/root.go b/cli/root.go -index 51f4854..33d3194 100644 ---- a/cli/root.go -+++ b/cli/root.go -@@ -7,12 +7,9 @@ import ( - "net/rpc" - "os" - "path/filepath" -- "time" - - "github.com/spiral/errors" -- - goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc" -- - rpcPlugin "github.com/spiral/roadrunner/v2/plugins/rpc" - - "github.com/spiral/roadrunner/v2/plugins/config" -@@ -23,16 +20,6 @@ import ( - endure "github.com/spiral/endure/pkg/container" - ) - --const EndureKey string = "endure" -- --// EndureConfig represents container configuration --type EndureConfig struct { -- GracePeriod time.Duration `mapstructure:"grace_period"` -- PrintGraph bool `mapstructure:"print_graph"` -- RetryOnFail bool `mapstructure:"retry_on_fail"` //TODO check for races, disabled at the moment -- LogLevel string `mapstructure:"log_level"` --} -- - var ( - // WorkDir is working directory - WorkDir string -@@ -41,12 +28,10 @@ var ( - // Debug mode - Debug bool - // Container is the pointer to the Endure container -- Container *endure.Endure -- RetryOnFail bool -- GracePeriod time.Duration = time.Second * 30 -- cfg *config.Viper -- override []string -- root = &cobra.Command{ -+ Container *endure.Endure -+ cfg *config.Viper -+ override []string -+ root = &cobra.Command{ - Use: "rr", - SilenceErrors: true, - SilenceUsage: true, -@@ -98,57 +83,10 @@ func init() { - // override flags if exist - cfg.Flags = override - -- endureCfg := initEndureConfig() -- if endureCfg == nil { -- panic("endure config should not be nil") -- } -- -- var lvl endure.Level -- -- switch endureCfg.LogLevel { -- case "debug": -- lvl = endure.DebugLevel -- case "info": -- lvl = endure.InfoLevel -- case "warning": -- lvl = endure.WarnLevel -- case "error": -- lvl = endure.ErrorLevel -- case "panic": -- lvl = endure.PanicLevel -- case "fatal": -- lvl = endure.FatalLevel -- default: -- panic(fmt.Sprintf("unknown log level, provided: %s, availabe: debug, info, warning, error, panic, fatal\n", endureCfg.LogLevel)) -- } -- -- var err error -- if endureCfg.PrintGraph { -- Container, err = endure.NewContainer(nil, endure.SetLogLevel(lvl), endure.RetryOnFail(endureCfg.RetryOnFail), endure.GracefulShutdownTimeout(endureCfg.GracePeriod), endure.Visualize(endure.StdOut, "")) -- } else { -- Container, err = endure.NewContainer(nil, endure.SetLogLevel(lvl), endure.RetryOnFail(endureCfg.RetryOnFail), endure.GracefulShutdownTimeout(endureCfg.GracePeriod)) -- } -- -- if err != nil { -- log.Fatal(err) -- } -- -- // register plugin from the plugins.go -- for i := 0; i < len(plugins); i++ { -- err = Container.Register( -- // register plugin -- plugins[i], -- ) -- if err != nil { -- log.Fatal(err) -- } -- } -- err = Container.Register( -- // register config -- cfg, -- ) -+ // register config -+ err := Container.Register(cfg) - if err != nil { -- log.Fatal(err) -+ panic(err) - } - - // if debug mode is on - run debug server -@@ -158,64 +96,20 @@ func init() { - }) - } - --func initEndureConfig() *EndureConfig { -- c := &config.Viper{ -- Path: CfgFile, -- Prefix: "rr", -- } -- err := c.Init() -- if err != nil { -- panic(err) -- } -- -- // init default config -- if !c.Has(EndureKey) { -- return &EndureConfig{ -- GracePeriod: time.Second * 30, -- PrintGraph: false, -- RetryOnFail: false, -- LogLevel: "debug", -- } -- } -- -- e := &EndureConfig{} -- err = c.UnmarshalKey(EndureKey, e) -- if err != nil { -- panic(err) -- } -- -- if e.LogLevel == "" { -- e.LogLevel = "error" -- } -- -- if e.GracePeriod == 0 { -- e.GracePeriod = time.Second * 30 -- } -- -- GracePeriod = e.GracePeriod -- RetryOnFail = e.RetryOnFail -- -- return e --} -- - // RPCClient is using to make a requests to the ./rr reset, ./rr workers - func RPCClient() (*rpc.Client, error) { - rpcConfig := &rpcPlugin.Config{} - -- c := &config.Viper{ -- Path: CfgFile, -- Prefix: "rr", -- } -- err := c.Init() -+ err := cfg.Init() - if err != nil { - return nil, err - } - -- if !c.Has(rpcPlugin.PluginName) { -+ if !cfg.Has(rpcPlugin.PluginName) { - return nil, errors.E("rpc service disabled") - } - -- err = c.UnmarshalKey(rpcPlugin.PluginName, rpcConfig) -+ err = cfg.UnmarshalKey(rpcPlugin.PluginName, rpcConfig) - if err != nil { - return nil, err - } -diff --git a/cli/serve.go b/cli/serve.go -index acd058b..993ec47 100644 ---- a/cli/serve.go -+++ b/cli/serve.go -@@ -38,45 +38,24 @@ func handler(_ *cobra.Command, _ []string) error { - - // https://golang.org/pkg/os/signal/#Notify - // should be of buffer size at least 1 -- shutdownHandler := make(chan os.Signal, 2) -- signal.Notify(shutdownHandler, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) -- -- stop := make(chan struct{}, 2) -- -- go func() { -- // first catch - stop the container -- <-shutdownHandler -- // send signal to stop execution -- stop <- struct{}{} -- -- // after first hit we are waiting for the second -- // second catch - exit from the process -- <-shutdownHandler -- println("\n") -- println("exit forced") -- os.Exit(1) -- }() -+ c := make(chan os.Signal, 1) -+ signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) - - for { - select { - case e := <-errCh: - err = multierr.Append(err, e.Error) -- log.Printf("error occurred: %v, plugin: %s", e.Error.Error(), e.VertexID) -- if !RetryOnFail { -- er := Container.Stop() -- if er != nil { -- err = multierr.Append(err, er) -- return errors.E(op, err) -- } -+ log.Printf("error occurred: %v, service: %s", e.Error.Error(), e.VertexID) -+ er := Container.Stop() -+ if er != nil { -+ err = multierr.Append(err, er) - return errors.E(op, err) - } -- -- case <-stop: -- log.Printf("stop signal received, grace timeout is: %d seconds", uint64(GracePeriod.Seconds())) -- // stop the container after first signal -+ return errors.E(op, err) -+ case <-c: - err = Container.Stop() - if err != nil { -- log.Printf("error occured during the stopping container: %v \n", err) -+ return errors.E(op, err) - } - return nil - } -diff --git a/go.mod b/go.mod -index 096a594..dabc2f1 100644 ---- a/go.mod -+++ b/go.mod -@@ -1,17 +1,17 @@ - module github.com/spiral/roadrunner-binary/v2 - --go 1.16 -+go 1.15 - - require ( - github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129 - github.com/fatih/color v1.10.0 - github.com/mattn/go-runewidth v0.0.10 - github.com/spf13/cobra v1.1.3 -- github.com/spiral/endure v1.0.0 -+ github.com/spiral/endure v1.0.0-RC.2 - github.com/spiral/errors v1.0.9 - github.com/spiral/goridge/v3 v3.0.1 -- github.com/spiral/roadrunner/v2 v2.0.3 -- github.com/temporalio/roadrunner-temporal v1.0.2 -+ github.com/spiral/roadrunner/v2 v2.0.0 -+ github.com/temporalio/roadrunner-temporal v1.0.0 - github.com/vbauerster/mpb/v5 v5.4.0 - go.uber.org/multierr v1.6.0 - ) -diff --git a/go.sum b/go.sum -index e36130e..328d232 100644 ---- a/go.sum -+++ b/go.sum -@@ -184,16 +184,16 @@ github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih - github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= - github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= - github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= --github.com/go-redis/redis/v8 v8.7.1 h1:8IYi6RO83fNcG5amcUUYTN/qH2h4OjZHlim3KWGFSsA= --github.com/go-redis/redis/v8 v8.7.1/go.mod h1:BRxHBWn3pO3CfjyX6vAoyeRmCquvxr6QG+2onGV2gYs= -+github.com/go-redis/redis/v8 v8.6.0 h1:swqbqOrxaPztsj2Hf1p94M3YAgl7hYEpcw21z299hh8= -+github.com/go-redis/redis/v8 v8.6.0/go.mod h1:DQ9q4Rk2HtwkrwVrdgmphoOQDMfpvcd/nHEwRsicg8s= - github.com/go-restit/lzjson v0.0.0-20161206095556-efe3c53acc68 h1:QR2R74UbwMtnEVGVvNfcx6mQmWGgN8abQeXOy92pQIo= - github.com/go-restit/lzjson v0.0.0-20161206095556-efe3c53acc68/go.mod h1:7vXSKQt83WmbPeyVjCfNT9YDJ5BUFmcwFsEjI9SCvYM= - github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= - github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= - github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= - github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= --github.com/gofiber/fiber/v2 v2.6.0 h1:OywSUL6QPY/+/b89Ulnb8reovwm5QGjZQfk74v0R7Uc= --github.com/gofiber/fiber/v2 v2.6.0/go.mod h1:f8BRRIMjMdRyt2qmJ/0Sea3j3rwwfufPrh9WNBRiVZ0= -+github.com/gofiber/fiber/v2 v2.5.0 h1:yml405Um7b98EeMjx63OjSFTATLmX985HPWFfNUPV0w= -+github.com/gofiber/fiber/v2 v2.5.0/go.mod h1:f8BRRIMjMdRyt2qmJ/0Sea3j3rwwfufPrh9WNBRiVZ0= - github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= - github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= - github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= -@@ -226,10 +226,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W - github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= - github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= - github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -+github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= - github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= --github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= --github.com/golang/protobuf v1.5.1 h1:jAbXjIeW2ZSW2AwFxlGTDoc2CjI2XujLkV3ArsZFCvc= --github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= - github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= - github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= - github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -@@ -240,9 +238,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw - github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= - github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= - github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -+github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= - github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= --github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= --github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= - github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= - github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= - github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -@@ -293,8 +290,8 @@ github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh - github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= - github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= - github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= --github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= --github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -+github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= -+github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= - github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= - github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= - github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= -@@ -573,17 +570,17 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An - github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= - github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= - github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= --github.com/spiral/endure v1.0.0 h1:RCHtsfqmfjYhTnj1YK9tc7olU9eLhAmVpcT6q1WL9iI= --github.com/spiral/endure v1.0.0/go.mod h1:+gB0/jI9tXdHgv0x4P9vXLER8fLgwt9a7aPi0QZeJHE= -+github.com/spiral/endure v1.0.0-RC.2 h1:w5NBxxz00cwTJ7fVRwU73zUxftXPIpT/TrGKntJ7bkI= -+github.com/spiral/endure v1.0.0-RC.2/go.mod h1:+gB0/jI9tXdHgv0x4P9vXLER8fLgwt9a7aPi0QZeJHE= -+github.com/spiral/endure v1.0.0-beta.23 h1:iIK+lrOTaWUyJpENxvjNjlhBA0QIrhks1uxcza3bmUQ= -+github.com/spiral/endure v1.0.0-beta.23/go.mod h1:+gB0/jI9tXdHgv0x4P9vXLER8fLgwt9a7aPi0QZeJHE= - github.com/spiral/errors v1.0.5/go.mod h1:SwMSZVdZkkJVgXNNafccqOaxWg0XPzVU/dEdUEInE0o= - github.com/spiral/errors v1.0.9 h1:RcVZ7a1RYkaT3HWFGDuQiDB02pG6yqh7715Uwd7urwM= - github.com/spiral/errors v1.0.9/go.mod h1:SwMSZVdZkkJVgXNNafccqOaxWg0XPzVU/dEdUEInE0o= - github.com/spiral/goridge/v3 v3.0.1 h1:mWo6hVEDJV3nRwsszx9y262CtrLQNojbONF4ikvKCBg= - github.com/spiral/goridge/v3 v3.0.1/go.mod h1:rYfsBwigGneLgYJTIh5urotnH63I5O+p6ZcVq7xc1lY= --github.com/spiral/roadrunner/v2 v2.0.2 h1:XfphwrvAZ9Tk8PWzhpSbMHiOnFUX8NgQqJ8ZINb6g4I= --github.com/spiral/roadrunner/v2 v2.0.2/go.mod h1:iqkChgXidV3fvzUjHqr9Gu3SMEy4mD/zgcyF7mIQ/zc= --github.com/spiral/roadrunner/v2 v2.0.3 h1:9NHRUNUTO3xZljVwYysKrDtewUMQWvRLyygkuNal8VQ= --github.com/spiral/roadrunner/v2 v2.0.3/go.mod h1:iqkChgXidV3fvzUjHqr9Gu3SMEy4mD/zgcyF7mIQ/zc= -+github.com/spiral/roadrunner/v2 v2.0.0 h1:xFJKH6VkiWMTaxC1Msrvfg44u8N2cJZGKg3Y3thHiCY= -+github.com/spiral/roadrunner/v2 v2.0.0/go.mod h1:wc4Vfe2elQ724gaxHmsQDP8XlKUR5obXM62g/ijNApg= - github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= - github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= - github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -@@ -602,8 +599,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc - github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= - github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= - github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= --github.com/temporalio/roadrunner-temporal v1.0.2 h1:AEwgXwCYwgHktDZu9JzhtvEQg0TCYmdlYNhdOlVKiSQ= --github.com/temporalio/roadrunner-temporal v1.0.2/go.mod h1:o+6YC9jsHX5tDnWgS/YjYU68oivw13Ym+cSmSccOweg= -+github.com/temporalio/roadrunner-temporal v1.0.0 h1:M43fxElOZ3g+DKsh1hqXw+wbJKgHnJHgm+UBgf6XV+Q= -+github.com/temporalio/roadrunner-temporal v1.0.0/go.mod h1:86YAyUVsJvUL7IZnYZmTfT56vKiC5yACBWMeJS2r604= - github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= - github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= - github.com/tklauser/numcpus v0.2.1 h1:ct88eFm+Q7m2ZfXJdan1xYoXKlmwsfP+k88q05KvlZc= -@@ -651,14 +648,14 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= - go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= - go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= - go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= --go.opentelemetry.io/otel v0.18.0 h1:d5Of7+Zw4ANFOJB+TIn2K3QWsgS2Ht7OU9DqZHI6qu8= --go.opentelemetry.io/otel v0.18.0/go.mod h1:PT5zQj4lTsR1YeARt8YNKcFb88/c2IKoSABK9mX0r78= --go.opentelemetry.io/otel/metric v0.18.0 h1:yuZCmY9e1ZTaMlZXLrrbAPmYW6tW1A5ozOZeOYGaTaY= --go.opentelemetry.io/otel/metric v0.18.0/go.mod h1:kEH2QtzAyBy3xDVQfGZKIcok4ZZFvd5xyKPfPcuK6pE= --go.opentelemetry.io/otel/oteltest v0.18.0 h1:FbKDFm/LnQDOHuGjED+fy3s5YMVg0z019GJ9Er66hYo= --go.opentelemetry.io/otel/oteltest v0.18.0/go.mod h1:NyierCU3/G8DLTva7KRzGii2fdxdR89zXKH1bNWY7Bo= --go.opentelemetry.io/otel/trace v0.18.0 h1:ilCfc/fptVKaDMK1vWk0elxpolurJbEgey9J6g6s+wk= --go.opentelemetry.io/otel/trace v0.18.0/go.mod h1:FzdUu3BPwZSZebfQ1vl5/tAa8LyMLXSJN57AXIt/iDk= -+go.opentelemetry.io/otel v0.17.0 h1:6MKOu8WY4hmfpQ4oQn34u6rYhnf2sWf1LXYO/UFm71U= -+go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= -+go.opentelemetry.io/otel/metric v0.17.0 h1:t+5EioN8YFXQ2EH+1j6FHCKMUj+57zIDSnSGr/mWuug= -+go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0= -+go.opentelemetry.io/otel/oteltest v0.17.0 h1:TyAihUowTDLqb4+m5ePAsR71xPJaTBJl4KDArIdi9k4= -+go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE= -+go.opentelemetry.io/otel/trace v0.17.0 h1:SBOj64/GAOyWzs5F680yW1ITIfJkm6cJWL2YAvuL9xY= -+go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg= - go.temporal.io/api v1.4.0 h1:Ga1Ih8YE5ULs+UGt7u6Ppcf5SUMLyh4BATAs6SyPO0w= - go.temporal.io/api v1.4.0/go.mod h1:H0yXehwGE9Sn9zVruyy9aumq17SMsK1WmIy4GX3MIKw= - go.temporal.io/sdk v1.5.0 h1:iOeovA+0XALkpZtIO0oRnhgiOi+r8QcF1TKehGIYp+k= -@@ -905,10 +902,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 - google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= - google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= - google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= - google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= --google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= --google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= --google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= - gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= - gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= - gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -diff --git a/main.go b/main.go -index 0b4281e..52aeab8 100644 ---- a/main.go -+++ b/main.go -@@ -1,12 +1,71 @@ - package main - - import ( -+ "log" -+ -+ endure "github.com/spiral/endure/pkg/container" -+ "github.com/spiral/roadrunner/v2/plugins/gzip" -+ "github.com/spiral/roadrunner/v2/plugins/headers" -+ "github.com/spiral/roadrunner/v2/plugins/static" -+ "github.com/spiral/roadrunner/v2/plugins/status" -+ -+ // plugins - "github.com/spiral/roadrunner-binary/v2/cli" -+ httpPlugin "github.com/spiral/roadrunner/v2/plugins/http" -+ "github.com/spiral/roadrunner/v2/plugins/informer" -+ "github.com/spiral/roadrunner/v2/plugins/logger" -+ "github.com/spiral/roadrunner/v2/plugins/metrics" -+ "github.com/spiral/roadrunner/v2/plugins/reload" -+ "github.com/spiral/roadrunner/v2/plugins/resetter" -+ "github.com/spiral/roadrunner/v2/plugins/rpc" -+ "github.com/spiral/roadrunner/v2/plugins/server" -+ "github.com/temporalio/roadrunner-temporal/activity" -+ temporalClient "github.com/temporalio/roadrunner-temporal/client" -+ "github.com/temporalio/roadrunner-temporal/workflow" - ) - --// PLUGINS LOCATED IN THE cli/plugins.go --// All new plugins should be added here -- - func main() { -+ var err error -+ cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel), endure.RetryOnFail(false)) -+ if err != nil { -+ log.Fatal(err) -+ } -+ -+ err = cli.Container.RegisterAll( -+ // logger plugin -+ &logger.ZapLogger{}, -+ // metrics plugin -+ &metrics.Plugin{}, -+ // http server plugin -+ &httpPlugin.Plugin{}, -+ // reload plugin -+ &reload.Plugin{}, -+ // informer plugin (./rr workers, ./rr workers -i) -+ &informer.Plugin{}, -+ // resetter plugin (./rr reset) -+ &resetter.Plugin{}, -+ // rpc plugin (workers, reset) -+ &rpc.Plugin{}, -+ // server plugin (NewWorker, NewWorkerPool) -+ &server.Plugin{}, -+ -+ // static -+ &static.Plugin{}, -+ // headers -+ &headers.Plugin{}, -+ // checker -+ &status.Plugin{}, -+ // gzip -+ &gzip.Plugin{}, -+ -+ // temporal plugins -+ &activity.Plugin{}, -+ &workflow.Plugin{}, -+ &temporalClient.Plugin{}, -+ ) -+ if err != nil { -+ log.Fatal(err) -+ } -+ - cli.Execute() - } @@ -2,27 +2,23 @@ pkgname=roadrunner binname=${pkgname}-binary -pkgver=2.0.3 +pkgver=2.0.4 pkgrel=1 pkgdesc="High-performance PHP application server, load-balancer and process manager written in Golang" arch=(x86_64) url="https://roadrunner.dev/" license=(MIT) -depends=("php>=7.3") +depends=() makedepends=("go>=1.16") source=( "$binname-$pkgver.tar.gz::https://github.com/spiral/$binname/archive/v$pkgver.tar.gz" "$pkgname-$pkgver.tar.gz::https://github.com/spiral/$pkgname/archive/v$pkgver.tar.gz" ".rr.yaml.sample-full" ".rr.yaml.sample-minimal" - "00-worker-log-level-info.patch" - "03-rr-binary-log-output.patch" ) sha256sums=( - "aec72f655d477347e8ce6dd7fb1cd7ca4c581d1e9b4c3dc1e25bfa86af16d1ad" - "65604afd79cb8a27458d82f74c9340f03d905aca115bc18c6d208ad3cd88d4ff" - SKIP - SKIP + "2625a698a7a6f2ada05ca1333066923eca1cf1503ceb1e045138adb2d12561cf" + "14ab387b378fd7909f5dc6e8be22442ca14fb5353ae1ef55ab70dea0381a5fd3" SKIP SKIP ) @@ -31,12 +27,7 @@ options=("!buildflags") prepare() { export GOPATH="$srcdir"/gopath - cd "$srcdir/$pkgname-$pkgver" - patch -p1 < "$srcdir/00-worker-log-level-info.patch" -# patch -p1 < "$srcdir/03-rr-log-output.patch" - cd "$srcdir/$binname-$pkgver" - patch -p1 <"$srcdir/03-rr-binary-log-output.patch" go mod edit -replace "github.com/spiral/roadrunner/v2=../roadrunner-$pkgver" go mod download } @@ -56,7 +47,13 @@ build() { -X github.com/spiral/roadrunner-binary/v2/cli.Version=${pkgver}\ -X github.com/spiral/roadrunner-binary/v2/cli.BuildTime=$(date +%FT%T%z)" \ -o ./rr \ - ./main.go + ./cmd/rr +} + +check() { + cd "$srcdir/$binname-$pkgver" + + go test -race -covermode=atomic -coverprofile ./coverage.txt ./... } package() { |