From 29300567b664fd322331ca143e1b43445e84e4e5 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sun, 8 Oct 2023 17:33:44 +0200 Subject: [PATCH] chore: more improvenments Signed-off-by: Valery Piashchynski --- builder/builder.go | 13 +++--- builder/template_test.go | 24 ++++++++++ builder/templates/entry.go | 8 ++-- builder/templates/templateV2023.go | 6 ++- github/modinfo.go | 33 +++++++++++++ github/parse_test.go | 62 ++++++++++++++++++++++++ github/pool.go | 75 +++++++++++++++++++----------- go.mod | 3 +- go.sum | 27 +++++++++-- modulesInfo.go | 4 +- velox_rr_v2023.toml | 2 +- 11 files changed, 210 insertions(+), 47 deletions(-) create mode 100644 github/modinfo.go create mode 100644 github/parse_test.go diff --git a/builder/builder.go b/builder/builder.go index 7612368..d3851f5 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -63,12 +63,11 @@ func (b *Builder) Build(rrModule string) error { //nolint:gocyclo t.Entries = make([]*templates.Entry, len(b.modules)) for i := 0; i < len(b.modules); i++ { t.Entries[i] = &templates.Entry{ - Time: b.modules[i].Time, - Module: b.modules[i].ModuleName, - Prefix: randStringBytes(5), - Structure: pluginStructureStr, - Version: b.modules[i].Version, - Replace: b.modules[i].Replace, + Module: b.modules[i].ModuleName, + Prefix: randStringBytes(5), + Structure: pluginStructureStr, + PseudoVersion: b.modules[i].PseudoVersion, + Replace: b.modules[i].Replace, } } @@ -148,6 +147,8 @@ func (b *Builder) Build(rrModule string) error { //nolint:gocyclo return fmt.Errorf("unknown module version: %s", t.ModuleVersion) } + b.log.Debug("[RESULTING TEMPLATE]", zap.String("template", buf.String())) + _, err = goModFile.Write(buf.Bytes()) if err != nil { return err diff --git a/builder/template_test.go b/builder/template_test.go index 0df58d4..72d95c3 100644 --- a/builder/template_test.go +++ b/builder/template_test.go @@ -14,6 +14,9 @@ package container import ( "github.com/roadrunner-server/informer/v4" "github.com/roadrunner-server/resetter/v4" + aba "github.com/roadrunner-server/some_plugin" + abc "github.com/roadrunner-server/some_plugin/v2" + abd "github.com/roadrunner-server/some_plugin/v22234" ab "github.com/roadrunner-server/rpc/v4" cd "github.com/roadrunner-server/http/v4" ef "github.com/roadrunner-server/grpc/v4" @@ -30,6 +33,9 @@ func Plugins() []any { &resetter.Plugin{}, // std and custom plugins + &aba.Plugin{}, + &abc.Plugin{}, + &abd.Plugin{}, &ab.Plugin{}, &cd.Plugin{}, &ef.Plugin{}, @@ -44,6 +50,24 @@ func TestCompile(t *testing.T) { Entries: make([]*templates.Entry, 0, 10), } + tt.Entries = append(tt.Entries, &templates.Entry{ + Module: "github.com/roadrunner-server/some_plugin", + Structure: "Plugin{}", + Prefix: "aba", + }) + + tt.Entries = append(tt.Entries, &templates.Entry{ + Module: "github.com/roadrunner-server/some_plugin/v2", + Structure: "Plugin{}", + Prefix: "abc", + }) + + tt.Entries = append(tt.Entries, &templates.Entry{ + Module: "github.com/roadrunner-server/some_plugin/v22234", + Structure: "Plugin{}", + Prefix: "abd", + }) + tt.Entries = append(tt.Entries, &templates.Entry{ Module: "github.com/roadrunner-server/rpc/v4", Structure: "Plugin{}", diff --git a/builder/templates/entry.go b/builder/templates/entry.go index 0394933..ad7a82e 100644 --- a/builder/templates/entry.go +++ b/builder/templates/entry.go @@ -7,11 +7,13 @@ import ( // Entry represents all info about module type Entry struct { - Time string + // Module is the module name (github.com/roadrunner-server/logger/v2) Module string Structure string - Prefix string - Version string + // Prefix is the prefix for the plugin to avoid collisions + Prefix string + // PseudoVersion is the pseudo version of the module (v0.0.0-20210101000000-000000000000) + PseudoVersion string // Replace directive, should include a path Replace string } diff --git a/builder/templates/templateV2023.go b/builder/templates/templateV2023.go index 78724bc..b09107b 100644 --- a/builder/templates/templateV2023.go +++ b/builder/templates/templateV2023.go @@ -13,12 +13,14 @@ require ( github.com/joho/godotenv v1.5.1 github.com/olekukonko/tablewriter v0.0.5 github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.15.0 + github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.2 go.uber.org/automaxprocs v1.5.2 + github.com/roadrunner-server/informer/v4 latest + github.com/roadrunner-server/resetter/v4 latest // Go module pseudo-version - {{range $v := .Entries}}{{$v.Module}} v4.0.0-{{$v.Time}}-{{$v.Version}} + {{range $v := .Entries}}{{$v.Module}} {{$v.PseudoVersion}} {{end}} ) diff --git a/github/modinfo.go b/github/modinfo.go new file mode 100644 index 0000000..69b1710 --- /dev/null +++ b/github/modinfo.go @@ -0,0 +1,33 @@ +package github + +import ( + "fmt" + "regexp" + "strconv" + "time" + + m "golang.org/x/mod/module" +) + +var vr = regexp.MustCompile(`/v(\\d+)$`) + +// here we accept a module name and return the version +// e.g.: github.com/roadrunner-server/logger/v2 => v2 +func parseModuleInfo(module string, t time.Time, rev string) string { + match := vr.FindStringSubmatch(module) + var version string + if len(match) > 1 { + if !IsDigit(match[1]) { + return m.PseudoVersion("", "", t, rev) + } + + version = fmt.Sprintf("v%s", match[1]) + } + + return m.PseudoVersion(version, "", t, rev) +} + +func IsDigit(num string) bool { + _, err := strconv.ParseInt(num, 10, 64) + return err == nil +} diff --git a/github/parse_test.go b/github/parse_test.go new file mode 100644 index 0000000..18297cd --- /dev/null +++ b/github/parse_test.go @@ -0,0 +1,62 @@ +package github + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type tm struct { + module string + tm time.Time + sha string + expect string +} + +func TestParse(t *testing.T) { + tn, err := time.Parse("20060102150405", "20231008162055") + require.NoError(t, err) + + tests := []tm{ + { + module: "github.com/roadrunner-server/logger/va", + tm: tn, + sha: "1234567890", + expect: "v0.0.0-20231008162055-1234567890", + }, + { + module: "github.com/roadrunner-server/logger/v2", + tm: tn, + sha: "1234567890", + expect: "v2.0.0-20231008162055-1234567890", + }, + { + module: "github.com/roadrunner-server/logger/v2222222222222", + tm: tn, + sha: "1234567890", + expect: "v2222222222222.0.0-20231008162055-1234567890", + }, + { + module: "github.com/roadrunner-server/logger", + tm: tn, + sha: "1234567890", + expect: "v0.0.0-20231008162055-1234567890", + }, + { + module: "github.com/roadrunner-server/logger/v2", + tm: tn, + sha: "", + expect: "v2.0.0-20231008162055-", + }, + { + expect: "v0.0.0-00010101000000-", + }, + } + + for _, tt := range tests { + out := parseModuleInfo(tt.module, tt.tm, tt.sha) + assert.Equal(t, tt.expect, out) + } +} diff --git a/github/pool.go b/github/pool.go index 109a7ec..0ffa456 100644 --- a/github/pool.go +++ b/github/pool.go @@ -3,6 +3,7 @@ package github import ( "bufio" "context" + "errors" "fmt" "net/http" "path" @@ -16,7 +17,8 @@ import ( ) const ( - referenceFormat string = "20060102150405" + gomod string = "go.mod" + modLine string = "module" ) type processor struct { @@ -77,7 +79,7 @@ func (p *processor) run() { rc, resp, err := p.client.Repositories.DownloadContents(context.Background(), v.pluginCfg.Owner, v.pluginCfg.Repo, - path.Join(v.pluginCfg.Folder, "go.mod"), &github.RepositoryContentGetOptions{Ref: v.pluginCfg.Ref}, + path.Join(v.pluginCfg.Folder, gomod), &github.RepositoryContentGetOptions{Ref: v.pluginCfg.Ref}, ) if err != nil { p.mu.Lock() @@ -95,23 +97,33 @@ func (p *processor) run() { continue } - rdr := bufio.NewReader(rc) - ret, err := rdr.ReadString('\n') - if err != nil { - p.mu.Lock() - p.errs = append(p.errs, err) - p.mu.Unlock() - p.wg.Done() - continue + scanner := bufio.NewScanner(rc) + for scanner.Scan() { + line := scanner.Text() + switch { //nolint:gocritic + case strings.HasPrefix(line, modLine): + p.log.Debug("[READING MODULE INFO]", zap.String("plugin", v.name), zap.String("module", line)) + + // module github.com/roadrunner-server/logger/v2, we split and get the second part + retMod := strings.Split(line, " ") + if len(retMod) < 2 || len(retMod) > 2 { + p.mu.Lock() + p.errs = append(p.errs, fmt.Errorf("failed to parse module info for the plugin: %s", line)) + p.mu.Unlock() + p.wg.Done() + continue + } + + modInfo.ModuleName = strings.TrimRight(retMod[1], "\n") + goto out + } } - p.log.Debug("[READING MODULE INFO]", zap.String("plugin", v.name), zap.String("mod", ret)) + out: - // module github.com/roadrunner-server/logger/v2, we split and get the second part - retMod := strings.Split(ret, " ") - if len(retMod) < 2 { + if errs := scanner.Err(); errs != nil { p.mu.Lock() - p.errs = append(p.errs, fmt.Errorf("failed to parse module info for the plugin: %s", ret)) + p.errs = append(p.errs, errs) p.mu.Unlock() p.wg.Done() continue @@ -119,15 +131,9 @@ func (p *processor) run() { err = resp.Body.Close() if err != nil { - p.mu.Lock() - p.errs = append(p.errs, err) - p.mu.Unlock() - p.wg.Done() - continue + p.log.Warn("[FAILED TO CLOSE RESPONSE BODY]", zap.Error(err)) } - modInfo.ModuleName = strings.TrimRight(retMod[1], "\n") - p.log.Debug("[REQUESTING COMMIT SHA-1]", zap.String("plugin", v.name), zap.String("ref", v.pluginCfg.Ref)) commits, rsp, err := p.client.Repositories.ListCommits(context.Background(), v.pluginCfg.Owner, v.pluginCfg.Repo, &github.CommitsListOptions{ SHA: v.pluginCfg.Ref, @@ -153,13 +159,28 @@ func (p *processor) run() { continue } - for j := 0; j < len(commits); j++ { - at := commits[j].GetCommit().GetCommitter().GetDate() - modInfo.Time = at.Format(referenceFormat) - // [:12] because of go.mod pseudo format specs - modInfo.Version = commits[j].GetSHA()[:12] + if len(commits) == 0 { + p.mu.Lock() + p.errs = append(p.errs, errors.New("empty commit SHA")) + p.mu.Unlock() + p.wg.Done() + continue } + // should be only one commit + at := commits[0].GetCommit().GetCommitter().GetDate() + // [:12] because of go.mod pseudo format specs + if len(commits[0].GetSHA()) < 12 { + p.mu.Lock() + p.errs = append(p.errs, fmt.Errorf("commit SHA is too short: %s", commits[0].GetSHA())) + p.mu.Unlock() + p.wg.Done() + continue + } + + modInfo.Version = commits[0].GetSHA()[:12] + modInfo.PseudoVersion = parseModuleInfo(modInfo.ModuleName, at.Time, commits[0].GetSHA()[:12]) + if v.pluginCfg.Replace != "" { p.log.Debug("[REPLACE REQUESTED]", zap.String("plugin", v.name), zap.String("path", v.pluginCfg.Replace)) } diff --git a/go.mod b/go.mod index 4bb11f8..3284a10 100644 --- a/go.mod +++ b/go.mod @@ -14,11 +14,12 @@ require ( github.com/stretchr/testify v1.8.4 github.com/xanzy/go-gitlab v0.93.0 go.uber.org/zap v1.26.0 + golang.org/x/mod v0.13.0 golang.org/x/oauth2 v0.13.0 ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect diff --git a/go.sum b/go.sum index 9a2236c..fede17b 100644 --- a/go.sum +++ b/go.sum @@ -38,15 +38,14 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE= +github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -243,6 +242,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -281,6 +282,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -314,6 +318,9 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -336,6 +343,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -371,16 +379,21 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -390,6 +403,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -445,6 +461,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/modulesInfo.go b/modulesInfo.go index bf25a1e..fe25361 100644 --- a/modulesInfo.go +++ b/modulesInfo.go @@ -2,10 +2,10 @@ package velox // ModulesInfo represents single go module type ModulesInfo struct { - // Time - commit time - Time string // Version - commit sha or tag Version string + // PseudoVersion - Go pseudo version + PseudoVersion string // module name - eg: github.com/roadrunner-server/logger/v2 ModuleName string // Replace (for the local dev) diff --git a/velox_rr_v2023.toml b/velox_rr_v2023.toml index 85372fa..94dd987 100644 --- a/velox_rr_v2023.toml +++ b/velox_rr_v2023.toml @@ -86,5 +86,5 @@ ref = "v2023.3.0" # test_plugin_2 = { ref = "main", owner = "rustatian", repository = "36405235" } # [log] -level = "debug" +level = "info" mode = "development"