Skip to content

Commit

Permalink
Change xsc in xray min version to 3.107.13 (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
orz25 authored Nov 26, 2024
1 parent 50bd3e5 commit 443e60b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xray/services/xsc/xsc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/jfrog/jfrog-client-go/xsc/services"
)

// XscService is the Xray Source Control service in the Xray service, available from v3.108.0.
// XscService is the Xray Source Control service in the Xray service, available from v3.107.13.
// This service replaces the Xray Source Control service, which was available as a standalone service.
type XscInnerService struct {
client *jfroghttpclient.JfrogHttpClient
Expand Down
2 changes: 1 addition & 1 deletion xsc/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// XscServicesManager defines the http client and general configuration
// Deprecated from Xray version 3.108.0, XSC is transitioning to Xray as inner service.
// Deprecated from Xray version 3.107.13, XSC is transitioning to Xray as inner service.
type XscServicesManager struct {
client *jfroghttpclient.JfrogHttpClient
config config.Config
Expand Down
4 changes: 2 additions & 2 deletions xsc/services/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const (
xscSuffix = "/xsc/"
apiV1Suffix = "api/v1"
XscInXraySuffix = apiV1Suffix + xscSuffix
MinXrayVersionXscTransitionToXray = "3.108.0"
MinXrayVersionXscTransitionToXray = "3.107.13"
)

// From Xray version 3.108.0, XSC is transitioning to Xray as inner service. This function will return compatible URL.
// From Xray version 3.107.13, XSC is transitioning to Xray as inner service. This function will return compatible URL.
func XrayUrlToXscUrl(xrayUrl, xrayVersion string) string {
if !IsXscXrayInnerService(xrayVersion) {
log.Debug(fmt.Sprintf("Xray version is lower than %s, XSC is not an inner service in Xray.", MinXrayVersionXscTransitionToXray))
Expand Down
4 changes: 2 additions & 2 deletions xsc/services/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ func TestXrayUrlToXscUrl(t *testing.T) {
xrayVersion string
expectedValue string
}{
{"after transition", "http://platform.jfrog.io/xray/", "3.108.0", "http://platform.jfrog.io/xray/api/v1/xsc/"},
{"before transition", "http://platform.jfrog.io/xray/", "3.107.0", "http://platform.jfrog.io/xsc/api/v1/"},
{"after transition", "http://platform.jfrog.io/xray/", "3.107.13", "http://platform.jfrog.io/xray/api/v1/xsc/"},
{"before transition", "http://platform.jfrog.io/xray/", "3.106.0", "http://platform.jfrog.io/xsc/api/v1/"},
}
for _, test := range tests {
t.Run(test.testName, func(t *testing.T) {
Expand Down

0 comments on commit 443e60b

Please sign in to comment.