Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 3aa0b74

Browse files
committed
Supress licensing module
1 parent bf70a5a commit 3aa0b74

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

cmd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ func main() {
7070
log.Fatalf("error validating configuration: %v", err)
7171
}
7272

73-
licenseMod := licensing.Init(&cfg)
73+
_ = licensing.Init(&cfg)
7474
qmcLogChannel := logger.InitLogger(logger.Configuration{
7575
FileLogging: cfg.Logging.FileLogging,
7676
Path: cfg.Logging.Path,
7777
RemoteLogDrainUrl: cfg.Logging.RemoteLogDrainUrl.ToUrl(),
7878
Level: *cfg.Logging.Level,
79-
ClientId: licenseMod.License.ClientID,
79+
ClientId: "",
8080
}, sig, doneCh)
8181
defer logger.StdLogFile.Close()
8282
defer logger.ErrLogFile.Close()
@@ -89,7 +89,7 @@ func main() {
8989
var connectionPool = clickhouse.InitDBConnectionPool(&cfg)
9090
//var connectionPool = doris.InitDBConnectionPool(&cfg)
9191

92-
phoneHomeAgent := telemetry.NewPhoneHomeAgent(&cfg, connectionPool, licenseMod.License.ClientID)
92+
phoneHomeAgent := telemetry.NewPhoneHomeAgent(&cfg, connectionPool, "")
9393
phoneHomeAgent.Start()
9494

9595
virtualTableStorage := persistence.NewElasticJSONDatabase(cfg.Elasticsearch, common_table.VirtualTableElasticIndexName)

platform/connectors/connector.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
package connectors
44

55
import (
6-
"fmt"
76
"github.com/QuesmaOrg/quesma/platform/config"
87
"github.com/QuesmaOrg/quesma/platform/database_common"
9-
"github.com/QuesmaOrg/quesma/platform/licensing"
108
"github.com/QuesmaOrg/quesma/platform/logger"
119
"github.com/QuesmaOrg/quesma/platform/telemetry"
1210
quesma_api "github.com/QuesmaOrg/quesma/platform/v2/core"
@@ -27,14 +25,14 @@ func (c *ConnectorManager) GetConnector() *database_common.LogManager {
2725
if len(c.connectors) == 0 {
2826
panic("No connectors found")
2927
}
30-
conn := c.connectors[0]
31-
if !c.connectors[0].GetConnector().IsInTransparentProxyMode() {
32-
go func() {
33-
if err := conn.LicensingCheck(); err != nil {
34-
licensing.PanicWithLicenseViolation(fmt.Errorf("connector [%s] reported licensing issue: [%v]", conn.Type(), err))
35-
}
36-
}()
37-
}
28+
//conn := c.connectors[0]
29+
//if !c.connectors[0].GetConnector().IsInTransparentProxyMode() {
30+
// go func() {
31+
// if err := conn.LicensingCheck(); err != nil {
32+
// licensing.PanicWithLicenseViolation(fmt.Errorf("connector [%s] reported licensing issue: [%v]", conn.Type(), err))
33+
// }
34+
// }()
35+
//}
3836
return c.connectors[0].GetConnector()
3937
}
4038

platform/licensing/model.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import (
1010

1111
// License is an object returned by the license server based on the provided (and positively verified) license key
1212
type License struct {
13-
InstallationID string `json:"installation_id"`
14-
ClientID string `json:"client_id"`
13+
InstallationID string `json:"installation_id"`
14+
// Deprecated
15+
ClientID string `json:"client_id"` // used to be a human-readable organization name for telemetry purposes, given licensing module disabling its now irrelevant
1516
Connectors []string `json:"connectors"`
1617
Processors []string `json:"processors"`
1718
ExpirationDate time.Time `json:"expiration_date"`

platform/licensing/runner.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import (
1616
type LicenseModule struct {
1717
InstallationID string
1818
LicenseKey []byte
19-
License *License
20-
Config *config.QuesmaConfiguration
19+
//Deprecated
20+
License *License // License module has been disabled
21+
Config *config.QuesmaConfiguration
2122
}
2223

2324
const (
@@ -66,16 +67,16 @@ func (l *LicenseModule) Run() {
6667
} else {
6768
l.logInfo("License key not supplied in the configuration, will attempt to obtain temporary license with limited functionalities")
6869
l.setInstallationID()
69-
if err := l.obtainLicenseKey(); err != nil {
70-
PanicWithLicenseViolation(fmt.Errorf("failed to obtain license key: %v", err))
71-
}
72-
}
73-
if err := l.processLicense(); err != nil {
74-
PanicWithLicenseViolation(fmt.Errorf("failed to process license: %v", err))
75-
}
76-
if err := l.validateConfig(); err != nil {
77-
PanicWithLicenseViolation(fmt.Errorf("failed to validate configuration: %v", err))
70+
//if err := l.obtainLicenseKey(); err != nil {
71+
// PanicWithLicenseViolation(fmt.Errorf("failed to obtain license key: %v", err))
72+
//}
7873
}
74+
//if err := l.processLicense(); err != nil {
75+
// PanicWithLicenseViolation(fmt.Errorf("failed to process license: %v", err))
76+
//}
77+
//if err := l.validateConfig(); err != nil {
78+
// PanicWithLicenseViolation(fmt.Errorf("failed to validate configuration: %v", err))
79+
//}
7980
}
8081

8182
func (l *LicenseModule) validateConfig() error {

0 commit comments

Comments
 (0)