diff --git a/builder/issue.go b/builder/issue.go index 056f283..d45c30a 100644 --- a/builder/issue.go +++ b/builder/issue.go @@ -1,8 +1,9 @@ package builder import ( - "encoding/json" + "fmt" output "github.com/konveyor/analyzer-lsp/output/v1/konveyor" + hub "github.com/konveyor/tackle2-hub/addon" "github.com/konveyor/tackle2-hub/api" "go.lsp.dev/uri" "gopkg.in/yaml.v3" @@ -10,11 +11,16 @@ import ( "os" ) +var ( + addon = hub.Addon +) + // // Issues builds issues and facts. type Issues struct { - facts []api.Fact - Path string + ruleErr RuleError + facts []api.Fact + Path string } // @@ -44,6 +50,10 @@ func (b *Issues) Write(writer io.Writer) (err error) { } encoder := yaml.NewEncoder(writer) for _, ruleset := range input { + b.ruleErr.Append(ruleset) + if b.ruleErr.NotEmpty() { + continue + } for ruleid, v := range ruleset.Violations { issue := api.Issue{ RuleSet: ruleset.Name, @@ -81,6 +91,13 @@ func (b *Issues) Write(writer io.Writer) (err error) { _ = encoder.Encode(&issue) } } + if err != nil { + return + } + if b.ruleErr.NotEmpty() { + err = &b.ruleErr + return + } return } @@ -124,24 +141,46 @@ func (b *Issues) Tags() (tags []string) { // // Facts builds facts. -func (b *Issues) Facts() (facts []api.Fact) { - input, err := b.read() - if err != nil { +func (b *Issues) Facts() (facts api.FactMap) { + return +} + +// +// RuleError reported by the analyzer. +type RuleError struct { + hub.SoftError + items []string +} + +func (e *RuleError) Error() (s string) { + s = fmt.Sprintf( + "Analyser reported %d errors.", + len(e.items)) + return +} + +func (e *RuleError) Is(err error) (matched bool) { + _, matched = err.(*RuleError) + return +} + +func (e *RuleError) Append(ruleset output.RuleSet) { + for s, _ := range ruleset.Errors { + e.items = append(e.items, s) + } +} + +func (e *RuleError) NotEmpty() (b bool) { + return len(e.items) > 0 +} + +func (e *RuleError) Report() { + if len(e.items) == 0 { return } - for _, r := range input { - for _, v := range r.Violations { - mp := make(map[string]interface{}) - _ = json.Unmarshal(v.Extras, &mp) - for k, v := range mp { - facts = append( - facts, - api.Fact{ - Key: k, - Value: v, - }) - } - } + addon.Activity("Analyzer reported:") + for _, s := range e.items { + addon.Activity("> [ERROR] %s.", s) + addon.Error("Error", s) } - return } diff --git a/cmd/analyzer.go b/cmd/analyzer.go index 81e58c2..9b8ce1e 100644 --- a/cmd/analyzer.go +++ b/cmd/analyzer.go @@ -1,11 +1,14 @@ package main import ( + "errors" "github.com/konveyor/tackle2-addon-analyzer/builder" "github.com/konveyor/tackle2-addon/command" "path" ) +type RuleError = builder.RuleError + // // Analyzer application analyzer. type Analyzer struct { @@ -24,6 +27,9 @@ func (r *Analyzer) Run() (b *builder.Issues, err error) { b = &builder.Issues{Path: output} err = cmd.Run() if err != nil { + if errors.Is(err, &RuleError{}) { + err.(*RuleError).Report() + } return } return @@ -33,13 +39,13 @@ func (r *Analyzer) Run() (b *builder.Issues, err error) { // options builds Analyzer options. func (r *Analyzer) options(output string) (options command.Options, err error) { settings := &Settings{} - err = settings.Read(SETTINGS) + err = settings.Read() if err != nil { return } options = command.Options{ "--provider-settings", - SETTINGS, + settings.path(), "--output-file", output, } @@ -59,10 +65,11 @@ func (r *Analyzer) options(output string) (options command.Options, err error) { if err != nil { return } - err = settings.Write(SETTINGS) + err = settings.Write() if err != nil { return } + settings.Report() return } @@ -93,13 +100,13 @@ func (r *DepAnalyzer) Run() (b *builder.Deps, err error) { // options builds Analyzer options. func (r *DepAnalyzer) options(output string) (options command.Options, err error) { settings := &Settings{} - err = settings.Read(SETTINGS) + err = settings.Read() if err != nil { return } options = command.Options{ "--provider-settings", - SETTINGS, + settings.path(), "--output-file", output, } @@ -107,7 +114,7 @@ func (r *DepAnalyzer) options(output string) (options command.Options, err error if err != nil { return } - err = settings.Write(SETTINGS) + err = settings.Write() if err != nil { return } diff --git a/cmd/cmd_test.go b/cmd/cmd_test.go new file mode 100644 index 0000000..b7df34a --- /dev/null +++ b/cmd/cmd_test.go @@ -0,0 +1,68 @@ +package main + +import ( + "github.com/onsi/gomega" + "testing" +) + +func TestRuleSelector(t *testing.T) { + g := gomega.NewGomegaWithT(t) + // all clauses + selector := RuleSelector{} + selector.Included = []string{ + "p1", + "p2", + "konveyor.io/source=s1", + "konveyor.io/source=s2", + "konveyor.io/target=t1", + "konveyor.io/target=t2", + } + expected := + "(p1||p2)||((konveyor.io/source=s1||konveyor.io/source=s2)&&(konveyor.io/target=t1||konveyor.io/target=t2))" + g.Expect(selector.String()).To(gomega.Equal(expected)) + // other + selector = RuleSelector{} + selector.Included = []string{ + "p1", + "p2", + } + expected = "(p1||p2)" + g.Expect(selector.String()).To(gomega.Equal(expected)) + // sources and targets + selector = RuleSelector{} + selector.Included = []string{ + "konveyor.io/source=s1", + "konveyor.io/source=s2", + "konveyor.io/target=t1", + "konveyor.io/target=t2", + } + expected = + "(konveyor.io/source=s1||konveyor.io/source=s2)&&(konveyor.io/target=t1||konveyor.io/target=t2)" + g.Expect(selector.String()).To(gomega.Equal(expected)) + // sources + selector = RuleSelector{} + selector.Included = []string{ + "konveyor.io/source=s1", + "konveyor.io/source=s2", + } + expected = "(konveyor.io/source=s1||konveyor.io/source=s2)" + g.Expect(selector.String()).To(gomega.Equal(expected)) + // targets + selector = RuleSelector{} + selector.Included = []string{ + "konveyor.io/target=t1", + "konveyor.io/target=t2", + } + expected = "(konveyor.io/target=t1||konveyor.io/target=t2)" + g.Expect(selector.String()).To(gomega.Equal(expected)) + // other and targets + selector = RuleSelector{} + selector.Included = []string{ + "p1", + "p2", + "konveyor.io/target=t1", + "konveyor.io/target=t2", + } + expected = "(p1||p2)||(konveyor.io/target=t1||konveyor.io/target=t2)" + g.Expect(selector.String()).To(gomega.Equal(expected)) +} diff --git a/cmd/labels.go b/cmd/labels.go deleted file mode 100644 index 513b115..0000000 --- a/cmd/labels.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import "github.com/konveyor/tackle2-addon/command" - -// -// Labels list of sources. -type Labels []string - -// -// AddOptions add options. -func (r Labels) AddOptions(options *command.Options) (err error) { - for _, source := range r { - options.Add("--source", source) - } - return -} diff --git a/cmd/main.go b/cmd/main.go index db3b7c3..4412196 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -18,11 +18,13 @@ var ( Dir = "" M2Dir = "" RuleDir = "" + OptDir = "" Source = "Analysis" ) func init() { Dir, _ = os.Getwd() + OptDir = path.Join(Dir, "opt") SourceDir = path.Join(Dir, "source") BinDir = path.Join(Dir, "bin") RuleDir = path.Join(Dir, "rules") @@ -58,7 +60,7 @@ func main() { } // // Create directories. - for _, dir := range []string{BinDir, M2Dir, RuleDir} { + for _, dir := range []string{BinDir, M2Dir, RuleDir, OptDir} { err = nas.MkDir(dir, 0755) if err != nil { return diff --git a/cmd/mode.go b/cmd/mode.go index 68eed9b..91c7985 100644 --- a/cmd/mode.go +++ b/cmd/mode.go @@ -1,8 +1,11 @@ package main import ( + "github.com/konveyor/analyzer-lsp/provider" "github.com/konveyor/tackle2-addon/repository" "github.com/konveyor/tackle2-hub/api" + "github.com/konveyor/tackle2-hub/nas" + "os" "path" "strings" ) @@ -14,37 +17,36 @@ type Mode struct { Artifact string `json:"artifact"` WithDeps bool `json:"withDeps"` Repository repository.SCM - appDir string + // + path struct { + appDir string + binary string + maven struct { + settings string + } + } } // // Build assets. func (r *Mode) Build(application *api.Application) (err error) { if !r.Binary { - if application.Repository == nil { - err = &SoftError{Reason: "Application repository not defined."} + err = r.fetchRepository(application) + if err != nil { return } - SourceDir = path.Join( - SourceDir, - strings.Split( - path.Base( - application.Repository.URL), - ".")[0]) - r.appDir = path.Join(SourceDir, application.Repository.Path) - var r repository.SCM - r, err = repository.New( - SourceDir, - application.Repository, - application.Identities) + err = r.buildMavenSettings(application) if err != nil { return } - err = r.Fetch() } else { if r.Artifact != "" { - bucket := addon.Bucket() - err = bucket.Get(r.Artifact, BinDir) + err = r.getArtifact() + return + } + if application.Binary != "" { + err = r.mavenArtifact(application) + return } } return @@ -53,11 +55,119 @@ func (r *Mode) Build(application *api.Application) (err error) { // // AddOptions adds analyzer options. func (r *Mode) AddOptions(settings *Settings) (err error) { + if r.WithDeps { + settings.MavenSettings(r.path.maven.settings) + settings.Mode(provider.FullAnalysisMode) + } else { + settings.Mode(provider.SourceOnlyAnalysisMode) + } if r.Binary { - // settings.Binary(BinDir) + settings.Location(r.path.binary) } else { - settings.Location(r.appDir) + settings.Location(r.path.appDir) + } + return +} + +// +// fetchRepository get SCM repository. +func (r *Mode) fetchRepository(application *api.Application) (err error) { + if application.Repository == nil { + err = &SoftError{Reason: "Application repository not defined."} + return + } + SourceDir = path.Join( + SourceDir, + strings.Split( + path.Base( + application.Repository.URL), + ".")[0]) + r.path.appDir = path.Join(SourceDir, application.Repository.Path) + var rp repository.SCM + rp, nErr := repository.New( + SourceDir, + application.Repository, + application.Identities) + if nErr != nil { + err = nErr + return } + err = rp.Fetch() + return +} +// +// getArtifact get uploaded artifact. +func (r *Mode) getArtifact() (err error) { + bucket := addon.Bucket() + err = bucket.Get(r.Artifact, BinDir) + r.path.binary = path.Join(BinDir, path.Base(r.Artifact)) + return +} + +// +// mavenArtifact get maven artifact. +func (r *Mode) mavenArtifact(application *api.Application) (err error) { + binDir := path.Join(BinDir, "maven") + maven := repository.Maven{ + M2Dir: M2Dir, + BinDir: binDir, + Remote: repository.Remote{ + Identities: application.Identities, + }, + } + err = maven.FetchArtifact(application.Binary) + if err != nil { + return + } + dir, nErr := os.ReadDir(binDir) + if nErr != nil { + err = nErr + return + } + if len(dir) > 0 { + r.path.binary = path.Join(binDir, dir[0].Name()) + } + return +} + +// +// buildMavenSettings creates maven settings. +func (r *Mode) buildMavenSettings(application *api.Application) (err error) { + id, found, nErr := addon.Application.FindIdentity( + application.ID, + "maven") + if nErr != nil { + err = nErr + return + } + if found { + addon.Activity( + "[MVN] Using credentials (id=%d) %s.", + id.ID, + id.Name) + } else { + return + } + p := path.Join( + OptDir, + "maven", + "settings.xml") + err = nas.MkDir(path.Dir(p), 0755) + if err != nil { + return + } + f, err := os.Create(p) + if err != nil { + return + } + defer func() { + _ = f.Close() + }() + _, err = f.WriteString(id.Settings) + if err != nil { + return + } + r.path.maven.settings = p return } diff --git a/cmd/rules.go b/cmd/rules.go index f7143a1..9309f0d 100644 --- a/cmd/rules.go +++ b/cmd/rules.go @@ -78,21 +78,34 @@ func (r *Rules) addFiles() (err error) { // // addRuleSets adds rulesets. func (r *Rules) addRuleSets() (err error) { - for _, ref := range r.RuleSets { - var ruleset *api.RuleSet - ruleset, err = addon.RuleSet.Get(ref.ID) - if err != nil { - return - } - err = r.addRules(ruleset) - if err != nil { - return - } - err = r.addRuleSetRepository(ruleset) - if err != nil { - return + var add func(refs []api.Ref, dep bool) + add = func(refs []api.Ref, dep bool) { + for _, ref := range refs { + var ruleset *api.RuleSet + ruleset, err = addon.RuleSet.Get(ref.ID) + if err != nil { + return + } + err = r.addRules(ruleset) + if err != nil { + return + } + err = r.addRuleSetRepository(ruleset) + if err != nil { + return + } + if dep { + for _, rule := range ruleset.Rules { + r.Labels.Included = append(r.Labels.Included, rule.Labels...) + } + } + add(ruleset.DependsOn, true) + if err != nil { + return + } } } + add(r.RuleSets, false) return } @@ -206,34 +219,10 @@ func (r *Rules) addRepository() (err error) { // // addSelector adds label selector. func (r *Rules) addSelector(options *command.Options) (err error) { - var clauses []string - var sources, targets []string - for _, s := range r.Labels.Included { - label := Label(s) - if label.Namespace() != "konveyor.io" { - continue - } - switch label.Name() { - case "source": - sources = append(sources, s) - case "target": - targets = append(targets, s) - } - } - if len(sources) > 0 { - clauses = append( - clauses, - "("+strings.Join(sources, "||")+")") - } - if len(targets) > 0 { - clauses = append( - clauses, - "("+strings.Join(targets, "||")+")") - } - if len(clauses) > 0 { - options.Add( - "--label-selector", - strings.Join(clauses, "&&")) + ruleSelector := RuleSelector{Included: r.Labels.Included} + selector := ruleSelector.String() + if selector != "" { + options.Add("--label-selector", selector) } return } @@ -277,3 +266,72 @@ func (r *Label) Value() (s string) { } return } + +// +// RuleSelector - Label-based rule selector. +type RuleSelector struct { + Included []string + Excluded []string +} + +// +// String returns string representation. +func (r *RuleSelector) String() (selector string) { + var other, sources, targets []string + for _, s := range r.unique(r.Included) { + label := Label(s) + if label.Namespace() != "konveyor.io" { + other = append(other, s) + continue + } + switch label.Name() { + case "source": + sources = append(sources, s) + case "target": + targets = append(targets, s) + default: + other = append(other, s) + } + } + var ands []string + ands = append(ands, r.join("||", sources...)) + ands = append(ands, r.join("||", targets...)) + selector = r.join("||", other...) + selector = r.join("||", selector, r.join("&&", ands...)) + if strings.HasPrefix(selector, "((") { + selector = selector[1 : len(selector)-1] + } + return +} + +// +// join clauses. +func (r *RuleSelector) join(operator string, operands ...string) (joined string) { + var packed []string + for _, s := range operands { + if len(s) > 0 { + packed = append(packed, s) + } + } + switch len(packed) { + case 0: + case 1: + joined = strings.Join(packed, operator) + default: + joined = "(" + strings.Join(packed, operator) + ")" + } + return +} + +// +// unique returns unique strings. +func (r *RuleSelector) unique(in []string) (out []string) { + mp := make(map[string]int) + for _, s := range in { + if _, found := mp[s]; !found { + out = append(out, s) + mp[s] = 0 + } + } + return +} diff --git a/cmd/settings.go b/cmd/settings.go index fd7cd03..4a3640c 100644 --- a/cmd/settings.go +++ b/cmd/settings.go @@ -1,14 +1,13 @@ package main import ( + "bufio" "github.com/konveyor/analyzer-lsp/provider" "gopkg.in/yaml.v3" "io" "os" -) - -const ( - SETTINGS = "/addon/opt/settings.json" + "path" + "strings" ) // @@ -17,8 +16,8 @@ type Settings []provider.Config // // Read file. -func (r *Settings) Read(path string) (err error) { - f, err := os.Open(path) +func (r *Settings) Read() (err error) { + f, err := os.Open(r.path()) if err != nil { return } @@ -32,8 +31,8 @@ func (r *Settings) Read(path string) (err error) { // // Write file. -func (r *Settings) Write(path string) (err error) { - f, err := os.Create(path) +func (r *Settings) Write() (err error) { + f, err := os.Create(r.path()) if err != nil { return } @@ -56,3 +55,48 @@ func (r *Settings) Location(path string) { p.InitConfig[0].Location = path } } + +// +// Mode update the mode on each provider. +func (r *Settings) Mode(mode provider.AnalysisMode) { + for i := range *r { + p := &(*r)[i] + switch p.Name { + case "java": + p.InitConfig[0].AnalysisMode = mode + } + } +} + +// +// MavenSettings set maven settings path. +func (r *Settings) MavenSettings(path string) { + if path == "" { + return + } + for i := range *r { + p := &(*r)[i] + switch p.Name { + case "java": + p.InitConfig[0].ProviderSpecificConfig["mavenSettingsFile"] = path + } + } +} + +// +// Report self as activity. +func (r *Settings) Report() { + b, _ := yaml.Marshal(r) + addon.Activity("Settings: %s", r.path()) + reader := strings.NewReader(string(b)) + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + addon.Activity("> %s", scanner.Text()) + } +} + +// +// Path +func (r *Settings) path() (p string) { + return path.Join(OptDir, "settings.json") +} diff --git a/go.mod b/go.mod index f9419eb..6dacde2 100644 --- a/go.mod +++ b/go.mod @@ -4,15 +4,17 @@ go 1.18 require ( github.com/gin-gonic/gin v1.9.0 - github.com/konveyor/analyzer-lsp v0.0.0-20230621153005-fb49760f7762 + github.com/konveyor/analyzer-lsp v0.0.0-20230627143304-7d8ae4d70e6e github.com/konveyor/tackle2-addon v0.1.2-0.20230510185644-c600b133619a - github.com/konveyor/tackle2-hub v0.2.0-alpha.2.0.20230601170349-69ffe6db0868 + github.com/konveyor/tackle2-hub v0.2.1-0.20230703140704-8e7520555b96 + github.com/onsi/gomega v1.27.6 go.lsp.dev/uri v0.3.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/Nerzal/gocloak/v10 v10.0.1 // indirect + github.com/andygrunwald/go-jira v1.16.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bytedance/sonic v1.8.0 // indirect github.com/cbroglie/mustache v1.4.0 // indirect @@ -22,6 +24,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/fatih/structs v1.1.0 // indirect github.com/getkin/kin-openapi v0.108.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logr/logr v1.2.4 // indirect @@ -39,6 +42,8 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -52,7 +57,7 @@ require ( github.com/leodido/go-urn v1.2.3 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-sqlite3 v1.14.16 // indirect + github.com/mattn/go-sqlite3 v1.14.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -67,6 +72,7 @@ require ( github.com/prometheus/procfs v0.9.0 // indirect github.com/segmentio/ksuid v1.0.4 // indirect github.com/sirupsen/logrus v1.9.0 // indirect + github.com/trivago/tgo v1.0.7 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.9 // indirect go.opentelemetry.io/otel v1.11.2 // indirect @@ -89,7 +95,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gorm.io/datatypes v1.2.0 // indirect gorm.io/driver/mysql v1.4.7 // indirect - gorm.io/gorm v1.25.0 // indirect + gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 // indirect k8s.io/api v0.25.0 // indirect k8s.io/apimachinery v0.25.0 // indirect k8s.io/client-go v0.25.0 // indirect diff --git a/go.sum b/go.sum index 2d3d377..8378a8b 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Nerzal/gocloak/v10 v10.0.1 h1:W9pyD4I6w57ceNmjJoS4mXezBAxpupj11ytxper2KA8= github.com/Nerzal/gocloak/v10 v10.0.1/go.mod h1:18jh1lwSHEJeSvmdH+08JyJU/XjPdNYLWEZ7paDB2k8= +github.com/andygrunwald/go-jira v1.16.0 h1:PU7C7Fkk5L96JvPc6vDVIrd99vdPnYudHu4ju2c2ikQ= +github.com/andygrunwald/go-jira v1.16.0/go.mod h1:UQH4IBVxIYWbgagc0LF/k9FRs9xjIiQ8hIcC6HfLwFU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bombsimon/logrusr/v3 v3.0.0 h1:tcAoLfuAhKP9npBxWzSdpsvKPQt1XV02nSf2lZA82TQ= @@ -30,6 +32,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/getkin/kin-openapi v0.108.0 h1:EYf0GtsKa4hQNIlplGS+Au7NEfGQ1F7MoHD2kcVevPQ= github.com/getkin/kin-openapi v0.108.0/go.mod h1:QtwUNt0PAAgIIBEvFWYfB7dfngxtAaqCX1zYHMZDeK8= @@ -64,11 +68,13 @@ github.com/go-resty/resty/v2 v2.6.0 h1:joIR5PNLM2EFqqESUjCMGXrWmXNHEU9CEiK813oKY github.com/go-resty/resty/v2 v2.6.0/go.mod h1:PwvJS6hvaPkjtjNg9ph+VrSD92bi5Zq73w/BIH7cC3Q= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= @@ -95,11 +101,17 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 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.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -127,12 +139,12 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/konveyor/analyzer-lsp v0.0.0-20230621153005-fb49760f7762 h1:XNnUbEamV9VJikrRDgaUK3nyoOFrUTX5exoBqPIsHKU= -github.com/konveyor/analyzer-lsp v0.0.0-20230621153005-fb49760f7762/go.mod h1:+k6UreVv8ztI29/RyQN8/71AAmB0aWwQoWwZd3yR8sc= +github.com/konveyor/analyzer-lsp v0.0.0-20230627143304-7d8ae4d70e6e h1:BImXY7PsY3aUK9Atomi7xwU9i29ybSuw75qjSlnPcEE= +github.com/konveyor/analyzer-lsp v0.0.0-20230627143304-7d8ae4d70e6e/go.mod h1:+k6UreVv8ztI29/RyQN8/71AAmB0aWwQoWwZd3yR8sc= github.com/konveyor/tackle2-addon v0.1.2-0.20230510185644-c600b133619a h1:ujBSPC+MzWyF5GRALc7KXd96wJZEuN/ao1meUfvBT2M= github.com/konveyor/tackle2-addon v0.1.2-0.20230510185644-c600b133619a/go.mod h1:2poGMxU2vxmz7+FppLvSliMrk0mAtbDHp+LeZ/p2/Q8= -github.com/konveyor/tackle2-hub v0.2.0-alpha.2.0.20230601170349-69ffe6db0868 h1:7xHz+o/mcP+/+3du7I23aeekWmeM5DynfK/GeFFN0Q4= -github.com/konveyor/tackle2-hub v0.2.0-alpha.2.0.20230601170349-69ffe6db0868/go.mod h1:FtXCHfgeWmOmfmcMVt6uebDNK7QPILRXGg4Y4vFSaK0= +github.com/konveyor/tackle2-hub v0.2.1-0.20230703140704-8e7520555b96 h1:ad9WGM95eq1xcLdxQzVv3Kk71s5322iXv3Cj7vJffD8= +github.com/konveyor/tackle2-hub v0.2.1-0.20230703140704-8e7520555b96/go.mod h1:UR7IJ1Qa9RgcdsO81yLWjTB6h7Qz1Y2bypu6YU2LFg8= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -149,8 +161,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= +github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE= @@ -165,8 +177,9 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= @@ -205,6 +218,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM= +github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= @@ -269,11 +284,13 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.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-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -292,6 +309,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= 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= @@ -347,11 +365,11 @@ gorm.io/datatypes v1.2.0/go.mod h1:o1dh0ZvjIjhH/bngTpypG6lVRJ5chTBxE09FH/71k04= gorm.io/driver/mysql v1.4.7 h1:rY46lkCspzGHn7+IYsNpSfEv9tA+SU4SkkB+GFX125Y= gorm.io/driver/mysql v1.4.7/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc= gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U= -gorm.io/driver/sqlite v1.5.0 h1:zKYbzRCpBrT1bNijRnxLDJWPjVfImGEn0lSnUY5gZ+c= +gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc= gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= -gorm.io/gorm v1.25.0 h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU= -gorm.io/gorm v1.25.0/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 h1:sC1Xj4TYrLqg1n3AN10w871An7wJM0gzgcm8jkIkECQ= +gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0=