Skip to content

Commit

Permalink
🐛 Fix forwarding testing endpoint to containers (QD-10281)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Nov 14, 2024
1 parent f58a0bf commit f16e0d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cloud/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
)

const (
QodanaEndpointOldEnv = "ENDPOINT"
QodanaEndpointEnv = "QODANA_ENDPOINT"
QodanaCloudRequestCooldownEnv = "QODANA_CLOUD_REQUEST_COOLDOWN"
QodanaCloudRequestTimeoutEnv = "QODANA_CLOUD_REQUEST_TIMEOUT"
Expand Down Expand Up @@ -76,8 +75,7 @@ func GetCloudRootEndpoint() *QdRootEndpoint {
if endpoint != nil {
return endpoint
}
oldEnvValue := GetEnvWithDefault(QodanaEndpointOldEnv, DefaultEndpoint)
userUrl := GetEnvWithDefault(QodanaEndpointEnv, oldEnvValue)
userUrl := GetEnvWithDefault(QodanaEndpointEnv, DefaultEndpoint)
host, err := parseRawURL(userUrl)
if err != nil {
log.Fatal(err)
Expand Down
4 changes: 4 additions & 0 deletions platform/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package platform

import (
"fmt"
"github.com/JetBrains/qodana-cli/v2024/cloud"
cienvironment "github.com/cucumber/ci-environment/go"
log "github.com/sirupsen/logrus"
"net/url"
Expand Down Expand Up @@ -61,6 +62,9 @@ func ExtractQodanaEnvironment(setEnvironmentFunc func(string, string)) {
if license := os.Getenv(QodanaLicense); license != "" {
setEnvironmentFunc(QodanaLicense, license)
}
if endpoint := os.Getenv(cloud.QodanaEndpointEnv); endpoint != "" {
setEnvironmentFunc(cloud.QodanaEndpointEnv, endpoint)
}
if remoteUrl := os.Getenv(QodanaRemoteUrl); remoteUrl != "" {
setEnvironmentFunc(QodanaRemoteUrl, remoteUrl)
}
Expand Down

0 comments on commit f16e0d9

Please sign in to comment.