Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change XSC in Xray min version to 3.107.13 #1048

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading