Skip to content

feat: licensing changes #6474

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

Merged
merged 5 commits into from
Apr 1, 2025
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
7 changes: 5 additions & 2 deletions client/telemetry/TelemetryEventClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type TelemetryEventClientImpl struct {
userAttributesRepository repository.UserAttributesRepository
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService
telemetryConfig TelemetryConfig
globalEnvVariables *util.GlobalEnvVariables
}

type TelemetryEventClient interface {
Expand All @@ -96,7 +97,8 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
serverDataStore *serverDataStore.ServerDataStore, userAuditService user2.UserAuditService,
helmAppClient gRPC.HelmAppClient,
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService, cronLogger *cron3.CronLoggerImpl,
installedAppReadService installedAppReader.InstalledAppReadServiceEA) (*TelemetryEventClientImpl, error) {
installedAppReadService installedAppReader.InstalledAppReadServiceEA,
envVariables *util.EnvironmentVariables) (*TelemetryEventClientImpl, error) {
cron := cron.New(
cron.WithChain(cron.Recover(cronLogger)))
cron.Start()
Expand All @@ -118,6 +120,7 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
installedAppReadService: installedAppReadService,
cloudProviderIdentifierService: cloudProviderIdentifierService,
telemetryConfig: TelemetryConfig{},
globalEnvVariables: envVariables.GlobalEnvVariables,
}

watcher.HeartbeatEventForTelemetry()
Expand Down Expand Up @@ -423,7 +426,7 @@ func (impl *TelemetryEventClientImpl) EnqueueGenericPostHogEvent(ucid string, ev
impl.PosthogClient.Client = client
}
}
if impl.PosthogClient.Client != nil {
if impl.PosthogClient.Client != nil && !impl.globalEnvVariables.IsAirGapEnvironment {
err := impl.PosthogClient.Client.Enqueue(posthog.Capture{
DistinctId: ucid,
Event: eventType,
Expand Down
1 change: 0 additions & 1 deletion cmd/external-app/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ import (
func InitializeApp() (*App, error) {
wire.Build(
user.SelfRegistrationWireSet,

sql.PgSqlWireSet,
user.UserWireSet,
sso.SsoConfigWireSet,
Expand Down
4 changes: 2 additions & 2 deletions cmd/external-app/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion env_gen.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions env_gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@
| GRAFANA_USERNAME | string |admin | | | false |
| HIDE_IMAGE_TAGGING_HARD_DELETE | bool |false | | | false |
| IGNORE_AUTOCOMPLETE_AUTH_CHECK | bool |false | | | false |
| INSTALLED_MODULES | | | List of installed modules given in helm values/yaml are written in cm and used by devtron to know which modules are given | security.trivy,security.clair | false |
| INSTALLER_CRD_NAMESPACE | string |devtroncd | | | false |
| INSTALLER_CRD_OBJECT_GROUP_NAME | string |installer.devtron.ai | | | false |
| INSTALLER_CRD_OBJECT_RESOURCE | string |installers | | | false |
| INSTALLER_CRD_OBJECT_VERSION | string |v1alpha1 | | | false |
| IS_AIR_GAP_ENVIRONMENT | bool |false | | | false |
| JwtExpirationTime | int |120 | | | false |
| K8s_CLIENT_MAX_IDLE_CONNS_PER_HOST | int |25 | | | false |
| K8s_TCP_IDLE_CONN_TIMEOUT | int |300 | | | false |
Expand Down
19 changes: 8 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/hcl2 v0.0.0-20191002203319-fb75b3253c80
github.com/invopop/jsonschema v0.7.0
github.com/juju/errors v0.0.0-20200330140219-3fe23663418f
github.com/juju/errors v1.0.0
github.com/lib/pq v1.10.9
github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b5
github.com/otiai10/copy v1.0.2
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/posthog/posthog-go v0.0.0-20210610161230-cd4408afb35a
github.com/posthog/posthog-go v1.4.1
github.com/prometheus/client_golang v1.18.0
github.com/robfig/cron/v3 v3.0.1
github.com/satori/go.uuid v1.2.0
Expand All @@ -81,7 +81,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.33.0
gopkg.in/go-playground/validator.v9 v9.30.0
gopkg.in/go-playground/validator.v9 v9.31.0
gopkg.in/igm/sockjs-go.v3 v3.0.0
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.14.3
Expand Down Expand Up @@ -151,8 +151,8 @@ require (
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.6 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-redis/cache/v9 v9.0.0 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-xorm/xorm v0.7.9 // indirect
Expand Down Expand Up @@ -187,11 +187,10 @@ require (
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/juju/testing v0.0.0-20210324180055-18c50b0c2098 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
Expand Down Expand Up @@ -238,7 +237,6 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
Expand All @@ -258,7 +256,6 @@ require (
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down Expand Up @@ -291,8 +288,8 @@ require (

replace (
github.com/argoproj/argo-workflows/v3 v3.5.13 => github.com/devtron-labs/argo-workflows/v3 v3.5.13
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250327100051-86261f25ea82
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250327100051-86261f25ea82
github.com/devtron-labs/authenticator => github.com/devtron-labs/devtron-services/authenticator v0.0.0-20250401095543-affde454fe43
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250401095543-affde454fe43
github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
k8s.io/api => k8s.io/api v0.29.7
Expand Down
Loading
Loading