Skip to content

Commit 3031920

Browse files
authored
✨ Support identity roles. (#172)
Hub compat with: konveyor/tackle2-hub#911 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Expanded identity lookup now considers both direct and indirect matches, improving detection and association during command execution. - Improvements - More reliable option population when identities are found, leading to smoother workflows. - Chores - Upgraded core platform dependency to the latest beta and refreshed related libraries, improving compatibility, stability, and tooling support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jeff Ortel <[email protected]>
1 parent c83e7b7 commit 3031920

File tree

4 files changed

+74
-14
lines changed

4 files changed

+74
-14
lines changed

cmd/injector.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ func (r *ResourceInjector) build(md *Metadata) (err error) {
345345
parsed.With(resource.Selector)
346346
switch strings.ToLower(parsed.kind) {
347347
case "identity":
348-
identity, found, nErr := addon.Application.Identity(application.ID).Find(parsed.value)
348+
identity, found, nErr :=
349+
addon.Application.Identity(application.ID).Search().
350+
Direct(parsed.value).
351+
Indirect(parsed.value).
352+
Find()
349353
if nErr != nil {
350354
err = nErr
351355
return

cmd/mode.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ func (r *Mode) fetchRepository(application *api.Application) (err error) {
6969
return
7070
}
7171
var options []any
72-
idapi := addon.Application.Identity(application.ID)
73-
identity, found, err := idapi.Find("source")
72+
identity, found, err :=
73+
addon.Application.Identity(application.ID).Search().
74+
Direct("source").
75+
Indirect("source").
76+
Find()
7477
if err != nil {
7578
return
7679
}

go.mod

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/gin-gonic/gin v1.9.1
99
github.com/konveyor/analyzer-lsp v0.7.0-alpha.2.0.20250528164516-ec5a199590bf
1010
github.com/konveyor/tackle2-addon v0.8.0-beta.2.0.20250902130618-7007f002e757
11-
github.com/konveyor/tackle2-hub v0.7.0-alpha.2.0.20250708195852-4e3f74795b04
11+
github.com/konveyor/tackle2-hub v0.8.0-beta.4.0.20250915141536-ccf24542dd57
1212
github.com/onsi/gomega v1.31.1
1313
github.com/rogpeppe/go-internal v1.10.0
1414
go.lsp.dev/uri v0.3.0
@@ -20,6 +20,8 @@ require (
2020
require (
2121
github.com/Nerzal/gocloak/v13 v13.9.0 // indirect
2222
github.com/PaesslerAG/gval v1.2.2 // indirect
23+
github.com/a8m/envsubst v1.4.2 // indirect
24+
github.com/alecthomas/participle/v2 v2.1.1 // indirect
2325
github.com/andygrunwald/go-jira v1.16.0 // indirect
2426
github.com/beorn7/perks v1.0.1 // indirect
2527
github.com/bytedance/sonic v1.9.1 // indirect
@@ -28,8 +30,11 @@ require (
2830
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
2931
github.com/clbanning/mxj v1.8.4 // indirect
3032
github.com/davecgh/go-spew v1.1.1 // indirect
33+
github.com/dimchansky/utfbom v1.1.1 // indirect
34+
github.com/elliotchance/orderedmap v1.5.1 // indirect
3135
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
3236
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
37+
github.com/fatih/color v1.16.0 // indirect
3338
github.com/fatih/structs v1.1.0 // indirect
3439
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
3540
github.com/gin-contrib/sse v0.1.0 // indirect
@@ -43,6 +48,7 @@ require (
4348
github.com/go-playground/validator/v10 v10.14.0 // indirect
4449
github.com/go-resty/resty/v2 v2.12.0 // indirect
4550
github.com/goccy/go-json v0.10.2 // indirect
51+
github.com/goccy/go-yaml v1.11.3 // indirect
4652
github.com/gogo/protobuf v1.3.2 // indirect
4753
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
4854
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
@@ -54,28 +60,33 @@ require (
5460
github.com/google/uuid v1.6.0 // indirect
5561
github.com/hashicorp/go-version v1.6.0 // indirect
5662
github.com/imdario/mergo v0.3.12 // indirect
63+
github.com/jinzhu/copier v0.4.0 // indirect
5764
github.com/jinzhu/inflection v1.0.0 // indirect
5865
github.com/jinzhu/now v1.1.5 // indirect
5966
github.com/jortel/go-utils v0.1.4 // indirect
6067
github.com/josharian/intern v1.0.0 // indirect
6168
github.com/json-iterator/go v1.1.12 // indirect
6269
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
6370
github.com/leodido/go-urn v1.2.4 // indirect
71+
github.com/magiconair/properties v1.8.7 // indirect
6472
github.com/mailru/easyjson v0.7.7 // indirect
65-
github.com/mattn/go-isatty v0.0.19 // indirect
73+
github.com/mattn/go-colorable v0.1.13 // indirect
74+
github.com/mattn/go-isatty v0.0.20 // indirect
6675
github.com/mattn/go-sqlite3 v1.14.17 // indirect
6776
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
77+
github.com/mikefarah/yq/v4 v4.44.1 // indirect
6878
github.com/moby/spdystream v0.2.0 // indirect
6979
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7080
github.com/modern-go/reflect2 v1.0.2 // indirect
7181
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7282
github.com/opentracing/opentracing-go v1.2.0 // indirect
73-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
83+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
7484
github.com/pkg/errors v0.9.1 // indirect
7585
github.com/prometheus/client_golang v1.15.0 // indirect
7686
github.com/prometheus/client_model v0.3.0 // indirect
7787
github.com/prometheus/common v0.42.0 // indirect
7888
github.com/prometheus/procfs v0.9.0 // indirect
89+
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
7990
github.com/segmentio/ksuid v1.0.4 // indirect
8091
github.com/shopspring/decimal v1.3.1 // indirect
8192
github.com/sirupsen/logrus v1.9.3 // indirect
@@ -86,6 +97,7 @@ require (
8697
github.com/trivago/tgo v1.0.7 // indirect
8798
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
8899
github.com/ugorji/go/codec v1.2.11 // indirect
100+
github.com/yuin/gopher-lua v1.1.1 // indirect
89101
go.opentelemetry.io/otel v1.28.0 // indirect
90102
go.opentelemetry.io/otel/exporters/jaeger v1.11.2 // indirect
91103
go.opentelemetry.io/otel/metric v1.28.0 // indirect
@@ -99,11 +111,13 @@ require (
99111
golang.org/x/term v0.23.0 // indirect
100112
golang.org/x/text v0.17.0 // indirect
101113
golang.org/x/time v0.5.0 // indirect
114+
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
102115
google.golang.org/appengine v1.6.8 // indirect
103116
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
104117
google.golang.org/grpc v1.64.1 // indirect
105118
google.golang.org/protobuf v1.34.2 // indirect
106119
gopkg.in/inf.v0 v0.9.1 // indirect
120+
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
107121
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 // indirect
108122
k8s.io/api v0.25.0 // indirect
109123
k8s.io/apimachinery v0.25.0 // indirect

0 commit comments

Comments
 (0)