diff --git a/analysis/analysis_test.go b/analysis/analysis_test.go
index d1bb4de..4ac9372 100644
--- a/analysis/analysis_test.go
+++ b/analysis/analysis_test.go
@@ -1,88 +1,119 @@
package analysis
import (
- "encoding/json"
+ "fmt"
"os"
"strings"
"testing"
"time"
- "github.com/konveyor/go-konveyor-tests/utils/uniq"
+ "github.com/konveyor/go-konveyor-tests/hack/addon"
+ "github.com/konveyor/go-konveyor-tests/hack/uniq"
"github.com/konveyor/tackle2-hub/api"
"github.com/konveyor/tackle2-hub/test/assert"
)
-//
// Test application analysis
-// "Basic" means that there no other dependencies than the application itself (no need prepare credentials, proxy, etc)
func TestApplicationAnalysis(t *testing.T) {
+ for _, analyzerAddon := range Addons {
+ for _, testcase := range TestCases {
+ t.Run(fmt.Sprintf("%s_%s", testcase.Name, analyzerAddon), func(t *testing.T) {
+ // Prepare parallel execution if env variable PARALLEL is set.
+ tc := testcase
+ _, parallel := os.LookupEnv("PARALLEL")
+ if parallel {
+ t.Parallel()
+ }
- // Test using "richclient" methods (preffered way).
- for _, testcase := range TestCases {
-
- t.Run(testcase.Name, func(t *testing.T) {
- // Prepare parallel execution if env variable PARALLEL is set.
- tc := testcase
- _, parallel := os.LookupEnv("PARALLEL")
- if parallel {
- t.Parallel()
- }
+ // Create the application.
+ uniq.ApplicationName(&tc.Application)
+ assert.Should(t, RichClient.Application.Create(&tc.Application))
- // Create the application.
- uniq.ApplicationName(&tc.Application)
- assert.Should(t, RichClient.Application.Create(&tc.Application))
+ // Prepare custom rules.
+ for i := range tc.CustomRules {
+ r := &tc.CustomRules[i]
+ uniq.RuleSetName(r)
+ // ruleFiles := []api.File{}
+ rules := []api.Rule{}
+ for _, rule := range r.Rules {
+ ruleFile, err := RichClient.File.Put(rule.File.Name)
+ assert.Should(t, err)
+ rules = append(rules, api.Rule{
+ File: &api.Ref{
+ ID: ruleFile.ID,
+ },
+ })
+ // ruleFiles = append(ruleFiles, *ruleFile)
+ }
+ r.Rules = rules
+ assert.Should(t, RichClient.RuleSet.Create(r))
+ }
- // Prepare and submit the analyze task.
- json.Unmarshal([]byte(tc.TaskData), &tc.Task.Data)
- tc.Task.Application = &api.Ref{ID: tc.Application.ID}
- assert.Should(t, RichClient.Task.Create(&tc.Task))
+ // Prepare and submit the analyze task.
+ tc.Task.Addon = analyzerAddon
+ tc.Task.Application = &api.Ref{ID: tc.Application.ID}
+ taskData := tc.Task.Data.(addon.Data)
+ for _, r := range tc.CustomRules {
+ taskData.Rules.RuleSets = append(taskData.Rules.RuleSets, api.Ref{ID: r.ID, Name: r.Name})
+ }
+ tc.Task.Data = taskData
+ assert.Should(t, RichClient.Task.Create(&tc.Task))
- // Wait until task finishes
- var task *api.Task
- var err error
- for i := 0; i < Retry; i++ {
- task, err = RichClient.Task.Get(tc.Task.ID)
- if err != nil || task.State == "Succeeded" || task.State == "Failed" {
- break
+ // Wait until task finishes
+ var task *api.Task
+ var err error
+ for i := 0; i < Retry; i++ {
+ task, err = RichClient.Task.Get(tc.Task.ID)
+ if err != nil || task.State == "Succeeded" || task.State == "Failed" {
+ break
+ }
+ time.Sleep(Wait)
}
- time.Sleep(Wait)
- }
- if task.State != "Succeeded" {
- t.Errorf("Analyze Task failed. Details: %+v", task)
- }
+ if task.State != "Succeeded" {
+ t.Errorf("Analyze Task failed. Details: %+v", task)
+ }
- // Check the report content.
- for path, expectedElems := range tc.ReportContent {
- content := getReportText(t, &tc, path)
- // Check its content.
- for _, expectedContent := range expectedElems {
- if !strings.Contains(content, expectedContent) {
- t.Errorf("Error report contect check for %s. Cannot find %s in %s", path, expectedContent, content)
+ // Check the report content.
+ for path, expectedElems := range tc.ReportContent {
+ content := getReportText(t, &tc, path)
+ // Check its content.
+ for _, expectedContent := range expectedElems {
+ if !strings.Contains(content, expectedContent) {
+ t.Errorf("Error report contect check for %s. Cannot find %s in %s", path, expectedContent, content)
+ }
}
}
- }
- // Check analysis-created Tags.
- gotApp, _ := RichClient.Application.Get(tc.Application.ID)
- found, gotAnalysisTags := 0, 0
- for _, t := range gotApp.Tags {
- if t.Source == "Analysis" {
- gotAnalysisTags = gotAnalysisTags + 1
- for _, expectedTag := range tc.AnalysisTags {
- if expectedTag.Name == t.Name {
- found = found + 1
- break
+ // Check analysis-created Tags.
+ gotApp, _ := RichClient.Application.Get(tc.Application.ID)
+ found, gotAnalysisTags := 0, 0
+ for _, t := range gotApp.Tags {
+ if t.Source == "Analysis" {
+ gotAnalysisTags = gotAnalysisTags + 1
+ for _, expectedTag := range tc.AnalysisTags {
+ if expectedTag.Name == t.Name {
+ found = found + 1
+ break
+ }
}
}
}
- }
- if found != len(tc.AnalysisTags) || found < gotAnalysisTags {
- t.Errorf("Analysis Tags don't match. Got:\n %v\nexpected:\n %v\n", gotApp.Tags, tc.AnalysisTags)
- }
+ if found != len(tc.AnalysisTags) || found < gotAnalysisTags {
+ t.Errorf("Analysis Tags don't match. Got:\n %v\nexpected:\n %v\n", gotApp.Tags, tc.AnalysisTags)
+ }
- // Cleanup.
- assert.Must(t, RichClient.Application.Delete(tc.Application.ID))
- })
+ // Cleanup Application.
+ assert.Must(t, RichClient.Application.Delete(tc.Application.ID))
+
+ // Cleanup custom rules and their files.
+ for _, r := range tc.CustomRules {
+ assert.Should(t, RichClient.RuleSet.Delete(r.ID))
+ for _, rl := range r.Rules {
+ assert.Should(t, RichClient.File.Delete(rl.File.ID))
+ }
+ }
+ })
+ }
}
}
diff --git a/analysis/data/hz.windup.xml b/analysis/data/hz.windup.xml
new file mode 100644
index 0000000..fb12740
--- /dev/null
+++ b/analysis/data/hz.windup.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ This ruleset detects embedded hazelcast, which may be problematic
+ when migrating an application to a cloud environment.
+
+
+
+
+
+
+
+
+ Hazelcast
+
+
+
+
+
+
+ METHOD_CALL
+
+
+ METHOD_CALL
+
+
+
+
+
+ Consider using Kubernetes specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The project uses hazelcast with the version between 2.0.0 and less than 5.0.0. Please use hazelcast 5.0 or above. T
+
+
+
+
+
+
\ No newline at end of file
diff --git a/analysis/pkg.go b/analysis/pkg.go
index 5bb330c..27d2a4c 100644
--- a/analysis/pkg.go
+++ b/analysis/pkg.go
@@ -28,15 +28,19 @@ func init() {
RichClient = client.PrepareRichClient()
// Access REST client directly (some test API call need it)
- Client = RichClient.Client()
+ Client = RichClient.Client
}
// Test cases for Application Analysis.
type TC struct {
Name string
- Application api.Application
+ // Application and other test data declaration.
+ Application api.Application // Required.
+ CustomRules []api.RuleSet
+ // Analysis parameters.
Task api.Task
TaskData string
+ // After-analysis assertions.
ReportContent map[string][]string
AnalysisTags []api.Tag
}
diff --git a/analysis/test_cases.go b/analysis/test_cases.go
index fb95f9a..1a91508 100644
--- a/analysis/test_cases.go
+++ b/analysis/test_cases.go
@@ -1,11 +1,12 @@
package analysis
import (
+ "github.com/konveyor/go-konveyor-tests/hack/addon"
"github.com/konveyor/tackle2-hub/api"
)
//
-// Test cases for Application Analysis
+// Test cases for Application Analysis.
var TestCases = []TC{
{
Name: "Pathfinder cloud-readiness with tagger",
@@ -18,8 +19,7 @@ var TestCases = []TC{
Branch: "1.2.0",
},
},
- Task: WindupReady,
- TaskData: defaultTaskData,
+ Task: Windup,
ReportContent: map[string][]string{
"/windup/report/index.html": {
"5\nstory points",
@@ -38,17 +38,17 @@ var TestCases = []TC{
},
},
{
- Name: "Petclinic cloud-readiness with tagger",
+ Name: "Petclinic cloud-readiness with tagger main",
Application: api.Application{
Name: "Petclinic",
Description: "Spring framework app",
Repository: &api.Repository{
Kind: "git",
URL: "https://github.com/savitharaghunathan/spring-framework-petclinic.git",
+ Branch: "main",
},
},
- Task: WindupReady,
- TaskData: defaultTaskData,
+ Task: Windup,
ReportContent: map[string][]string{
"/windup/report/index.html": {
"5\nstory points",
@@ -66,42 +66,95 @@ var TestCases = []TC{
{Name: "JSP Page"},
},
},
+ {
+ Name: "Petclinic legacy cloud-readiness with tagger and hazelcast custom rules",
+ Application: api.Application{
+ Name: "Petclinic",
+ Description: "Spring framework app",
+ Repository: &api.Repository{
+ Kind: "git",
+ URL: "https://github.com/savitharaghunathan/spring-framework-petclinic.git",
+ Branch: "legacy",
+ },
+ },
+ CustomRules: []api.RuleSet{
+ {
+ Name: "Hazelcast Java distributed session store ruleset.",
+ Custom: true,
+ Image: api.Ref{
+ ID: 1,
+ },
+ Rules: []api.Rule{
+ {
+ File: &api.Ref{
+ Name: "./data/hz.windup.xml",
+ },
+ },
+ },
+ },
+ },
+ Task: Windup,
+ ReportContent: map[string][]string{
+ "/windup/report/index.html": {
+ "12\nstory points",
+ "8\nCloud Mandatory",
+ "13\nInformation",
+ },
+ },
+ AnalysisTags: []api.Tag{
+ {Name: "Java EE JAXB"},
+ {Name: "Servlet"},
+ {Name: "Spring MVC"},
+ {Name: "Spring JMX"},
+ {Name: "Common Annotations"},
+ {Name: "Properties"},
+ {Name: "JPA entities"},
+ {Name: "Spring Data JPA"},
+ {Name: "Bean Validation"},
+ {Name: "JSP Page"},
+ },
+ },
}
-
//
// Shared parameters.
-var WindupReady = api.Task{
- Addon: "windup",
- State: "Ready",
+var Addons = []string{
+ "windup", // legacy windup analyzer
+// "analyzer", // LSP analyzer
}
-var defaultTaskData = `{
- "mode": {
- "artifact": "",
- "binary": false,
- "withDeps": false,
- "diva": true
+var Windup = api.Task{
+ State: "Ready", // Created / Ready
+ Data: defaultTaskData,
+}
+
+var defaultTaskData = addon.Data{
+ Output: "/windup/report",
+ Mode: addon.Mode{
+ Artifact: "",
+ Binary: false,
+ WithDeps: false,
+ Diva: true,
},
- "output": "/windup/report",
- "rules": {
- "path": "",
- "tags": {
- "excluded": [ ]
- }
+ Sources: []string{},
+ Targets: []string{"cloud-readiness"},
+ Scope: addon.Scope{
+ WithKnown: false,
+ //Packages: {
+ // Included: []string{},
+ // Excluded: []string{},
+ //},
},
- "scope": {
- "packages": {
- "excluded": [ ],
- "included": [ ]
+ Rules: addon.Rules{
+ Path: "",
+ Labels: []string{
+ "cloud-readiness",
},
- "withKnown": false
+ //Tags: {
+ // Excluded: []string{},
+ //},
},
- "sources": [ ],
- "tagger": {
- "enabled": true
+ Tagger: addon.Tagger{
+ Enabled: true,
},
- "targets": [
- "cloud-readiness"
- ]
- }`
+}
diff --git a/go.mod b/go.mod
index 736f2f8..5a22bd4 100644
--- a/go.mod
+++ b/go.mod
@@ -2,15 +2,28 @@ module github.com/konveyor/go-konveyor-tests
go 1.18
-require github.com/konveyor/tackle2-hub v0.1.2-0.20230518212519-840262860b06
+require (
+ github.com/PuerkitoBio/goquery v1.8.1
+ github.com/gocolly/colly v1.2.0
+ github.com/konveyor/tackle2-hub v0.2.1-0.20230622161619-908a0a350015
+)
require (
github.com/Nerzal/gocloak/v10 v10.0.1 // indirect
+ github.com/andybalholm/cascadia v1.3.1 // indirect
+ github.com/andygrunwald/go-jira v1.16.0 // indirect
+ github.com/antchfx/htmlquery v1.3.0 // indirect
+ github.com/antchfx/xmlquery v1.3.17 // indirect
+ github.com/antchfx/xpath v1.2.4 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.8.0 // indirect
+ github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
+ github.com/clbanning/mxj v1.8.4 // indirect
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/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
@@ -22,11 +35,14 @@ require (
github.com/go-playground/validator/v10 v10.13.0 // indirect
github.com/go-resty/resty/v2 v2.6.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
+ github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.5.7-v3refs // 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/jinzhu/inflection v1.0.0 // indirect
@@ -34,19 +50,29 @@ require (
github.com/jortel/go-utils v0.1.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
+ github.com/kennygrant/sanitize v1.2.4 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
+ github.com/konveyor/tackle2-addon v0.2.0 // indirect
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
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
+ github.com/prometheus/client_golang v1.15.0 // indirect
+ github.com/prometheus/client_model v0.3.0 // indirect
+ github.com/prometheus/common v0.42.0 // indirect
+ github.com/prometheus/procfs v0.9.0 // indirect
+ github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
+ github.com/temoto/robotstxt v1.1.2 // 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
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
@@ -64,7 +90,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // 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 a0ea22e..ff395ca 100644
--- a/go.sum
+++ b/go.sum
@@ -2,15 +2,34 @@ 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/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
+github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
+github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
+github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
+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/antchfx/htmlquery v1.3.0 h1:5I5yNFOVI+egyia5F2s/5Do2nFWxJz41Tr3DyfKD25E=
+github.com/antchfx/htmlquery v1.3.0/go.mod h1:zKPDVTMhfOmcwxheXUsx4rKJy8KEY/PU6eXr/2SebQ8=
+github.com/antchfx/xmlquery v1.3.17 h1:d0qWjPp/D+vtRw7ivCwT5ApH/3CkQU8JOeo3245PpTk=
+github.com/antchfx/xmlquery v1.3.17/go.mod h1:Afkq4JIeXut75taLSuI31ISJ/zeq+3jG7TunF7noreA=
+github.com/antchfx/xpath v1.2.3/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
+github.com/antchfx/xpath v1.2.4 h1:dW1HB/JxKvGtJ9WyVGJ0sIoEcqftV3SqIstujI+B9XY=
+github.com/antchfx/xpath v1.2.4/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
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/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
+github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
+github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -23,11 +42,14 @@ 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/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
+github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
@@ -50,20 +72,28 @@ 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/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
+github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
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/gocolly/colly v1.2.0 h1:qRz9YAn8FIH0qzgNUw+HT9UN7wm1oF9OBAilwEWpyrI=
+github.com/gocolly/colly v1.2.0/go.mod h1:Hof5T3ZswNVsOHYmba1u03W65HDWgpV5HifSuueE0EA=
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=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
@@ -80,8 +110,12 @@ 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-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=
@@ -101,17 +135,23 @@ github.com/jortel/go-utils v0.1.1 h1:zkAAA+i5Z+151zUG7lkjILGxSo3pQ4bkLTRcPTCy3hs
github.com/jortel/go-utils v0.1.1/go.mod h1:sl6vav63ODI0sUfSz8e0pImNmCVFnVsuOFhZmwe9GDk=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o=
+github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
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/tackle2-hub v0.1.2-0.20230518212519-840262860b06 h1:8WNcTFOoDXubrUpm4fBFZEluWVvr7UFJNANVx99fwgs=
-github.com/konveyor/tackle2-hub v0.1.2-0.20230518212519-840262860b06/go.mod h1:FtXCHfgeWmOmfmcMVt6uebDNK7QPILRXGg4Y4vFSaK0=
+github.com/konveyor/tackle2-addon v0.2.0 h1:YWyFY72ZU2oKsPFb0Pt1U/1sWtD186BcYxtwJRDOni0=
+github.com/konveyor/tackle2-addon v0.2.0/go.mod h1:2poGMxU2vxmz7+FppLvSliMrk0mAtbDHp+LeZ/p2/Q8=
+github.com/konveyor/tackle2-hub v0.2.1-0.20230622161619-908a0a350015 h1:8Xu616eAKr4yrcL+EX26gzbSyMZqF2bFEjUTwfQTKDg=
+github.com/konveyor/tackle2-hub v0.2.1-0.20230622161619-908a0a350015/go.mod h1:UR7IJ1Qa9RgcdsO81yLWjTB6h7Qz1Y2bypu6YU2LFg8=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -122,9 +162,10 @@ 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=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
@@ -133,6 +174,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
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=
@@ -147,10 +190,17 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM=
+github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
+github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
+github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
+github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
+github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA=
+github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU=
github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
@@ -169,12 +219,17 @@ 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/temoto/robotstxt v1.1.2 h1:W2pOjSJ6SWvldyEuiFXNxz3xZ8aiWX5LbfDiOFd7Fxg=
+github.com/temoto/robotstxt v1.1.2/go.mod h1:+1AmkuG3IYkh1kv0d2qEB9Le88ehNO0zwOr3ujewlOo=
+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=
github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
@@ -192,6 +247,7 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
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-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -203,7 +259,11 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
+golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
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=
@@ -211,9 +271,11 @@ golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s=
golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -222,17 +284,29 @@ 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-20220520151302-bc2c85ada10a/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-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.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/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.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
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=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/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.6.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 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
@@ -245,6 +319,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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
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=
@@ -294,11 +369,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=
diff --git a/hack/addon/windupstructs.go b/hack/addon/windupstructs.go
new file mode 100644
index 0000000..8e094f6
--- /dev/null
+++ b/hack/addon/windupstructs.go
@@ -0,0 +1,96 @@
+package addon
+
+import (
+ "github.com/konveyor/tackle2-addon/repository"
+ "github.com/konveyor/tackle2-hub/api"
+)
+
+//
+// Originally from https://github.com/konveyor/tackle2-addon-windup/blob/main/cmd as of 2023-06-26
+// Would love replace this when https://github.com/konveyor/tackle2-addon-windup/issues/98 gets resolved.
+
+//
+// Data Addon data passed in the secret.
+type Data struct {
+ // Output directory within application bucket.
+ Output string `json:"output" binding:"required"`
+ // Mode options.
+ Mode Mode `json:"mode"`
+ // Sources list.
+ Sources Sources `json:"sources"`
+ // Targets list.
+ Targets Targets `json:"targets"`
+ // Scope options.
+ Scope Scope `json:"scope"`
+ // Rules options.
+ Rules Rules `json:"rules"`
+ // Tagger options.
+ Tagger Tagger `json:"tagger"`
+}
+
+//
+// Mode settings.
+type Mode struct {
+ Binary bool `json:"binary"`
+ Artifact string `json:"artifact"`
+ WithDeps bool `json:"withDeps"`
+ Diva bool `json:"diva"`
+ CSV bool `json:"csv"`
+ Repository repository.SCM
+}
+
+//
+// Sources list of sources.
+type Sources []string
+
+//
+// Targets list of target.
+type Targets []string
+
+//
+// Scope settings.
+type Scope struct {
+ WithKnown bool `json:"withKnown"`
+ Packages struct {
+ Included []string `json:"included,omitempty"`
+ Excluded []string `json:"excluded,omitempty"`
+ } `json:"packages"`
+}
+
+//
+// Rules settings.
+type Rules struct {
+ Path string `json:"path" binding:"required"`
+ Labels []string `json:"labels"`
+ RuleSets []api.Ref `json:"rulesets"`
+ Repository *api.Repository `json:"repository"`
+ Identity *api.Ref `json:"identity"`
+ Tags struct {
+ Included []string `json:"included,omitempty"`
+ Excluded []string `json:"excluded,omitempty"`
+ } `json:"tags"`
+ foundTargets []string
+}
+
+//
+// Tagger tags an application.
+type Tagger struct {
+ Enabled bool `json:"enabled"`
+}
+
+////
+//// RuleSet an XML document.
+//type RuleSet struct {
+// Metadata struct {
+// Target struct {
+// ID string `xml:"id,attr"`
+// } `xml:"targetTechnology"`
+// } `xml:"metadata"`
+//}
+//
+////
+//// Windup application analyzer.
+//type Windup struct {
+// application *api.Application
+// *Data
+//}
diff --git a/utils/uniq/name.go b/hack/uniq/name.go
similarity index 81%
rename from utils/uniq/name.go
rename to hack/uniq/name.go
index 8f9b2c5..fc08193 100644
--- a/utils/uniq/name.go
+++ b/hack/uniq/name.go
@@ -26,3 +26,9 @@ func RandString(lenght int) string {
func ApplicationName(r *api.Application) {
r.Name = fmt.Sprintf("%s %s", r.Name, RandString(5))
}
+
+//
+// Append random 3 chars to RuleSet Name.
+func RuleSetName(r *api.RuleSet) {
+ r.Name = fmt.Sprintf("%s %s", r.Name, RandString(3))
+}
diff --git a/hack/windupreport/parser.go b/hack/windupreport/parser.go
new file mode 100644
index 0000000..5618512
--- /dev/null
+++ b/hack/windupreport/parser.go
@@ -0,0 +1,48 @@
+package windupreport
+
+import (
+ "fmt"
+ "io"
+ "log"
+
+ "github.com/PuerkitoBio/goquery"
+ "github.com/gocolly/colly"
+ "github.com/konveyor/tackle2-hub/api"
+)
+
+
+
+func Parse(reader io.Reader) (analysis api.Analysis) {
+ doc, err := goquery.NewDocumentFromReader(reader)
+ if err != nil {
+ log.Fatal(err)
+ }
+ log.Printf("%+v", doc)
+
+ // Story points
+ doc.Find(".effortPoints.total span.points").Each(func(i int, s *goquery.Selection) {
+ // For each item found, get the title
+ points := s.Text()
+ fmt.Printf("Review %d: %s\n", i, points)
+ })
+
+ return
+}
+
+func ScrapeReport(reportUrl string) {
+ c := colly.NewCollector()
+ c.Visit(reportUrl)
+
+ // Each application
+ c.OnHTML("li.product", func(e *colly.HTMLElement) {
+
+
+ url := e.ChildAttr("a", "href")
+ name := e.ChildText(".name")
+
+ // append
+ })
+
+ // Parse application/dependency
+
+}
\ No newline at end of file
diff --git a/hack/windupreport/parser_test.go b/hack/windupreport/parser_test.go
new file mode 100644
index 0000000..da95e8e
--- /dev/null
+++ b/hack/windupreport/parser_test.go
@@ -0,0 +1,49 @@
+package windupreport
+
+import (
+ "bufio"
+ "log"
+ "os"
+ "testing"
+
+ "github.com/konveyor/tackle2-hub/api"
+ "github.com/konveyor/tackle2-hub/test/assert"
+)
+
+type TC struct {
+ Name string
+ ReportRoot string
+ AnalysisResult api.Analysis
+ // ReportContent map[string][]string
+}
+
+var Samples = []TC{
+ {
+ Name: "Pathfinder",
+ ReportRoot: "windup-report-index.html",
+ AnalysisResult: api.Analysis{
+ Issues: []api.Issue{
+ {
+ Name: "fooissue",
+ },
+ },
+ Dependencies: []api.TechDependency{
+
+ },
+ },
+ },
+}
+
+func TestParse(t *testing.T) {
+ for _, tc := range Samples {
+ f, err := os.Open(tc.ReportRoot)
+ if err != nil {
+ log.Fatal(err)
+ }
+ gotAnalysis := Parse(bufio.NewReader(f))
+
+ if !assert.FlatEqual(gotAnalysis, tc.AnalysisResult) {
+ t.Errorf("Different response error. Got %+v, expected %+v", gotAnalysis, tc.AnalysisResult)
+ }
+ }
+}
diff --git a/hack/windupreport/windup-report-index.html b/hack/windupreport/windup-report-index.html
new file mode 100644
index 0000000..9fabd31
--- /dev/null
+++ b/hack/windupreport/windup-report-index.html
@@ -0,0 +1,321 @@
+
+
+
+
+
+
+
+ Application List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ story points
+
+
+
+
+ Number of incidents |
+
+
+ 5 |
+ Cloud Mandatory |
+
+
+ 9 |
+ Information |
+
+
+ 14 |
+ Total |
+
+
+
+
+
+
+
+
+
+ Application Properties File
+
+
+ Bean Validation
+
+
+ CDI
+
+
+ JAX-RS
+
+
+ JPA entities
+
+
+ Java Source
+
+
+ Maven XML
+
+
+ Properties
+
+
+
+
+
+
+
+
+
+
+
+
Page generated: May 10, 2023, 9:06:40 AM
+
+
+
+
+
+
+
+