Skip to content

Commit

Permalink
chore: remove ee references in MIT licensed code (#5901)
Browse files Browse the repository at this point in the history
* chore: remove ee references in MIT licensed code

* chore: add target

---------

Co-authored-by: Prashant Shahi <[email protected]>
  • Loading branch information
srikanthccv and prashant-shahi authored Sep 9, 2024
1 parent b8d228a commit 6f0cf03
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- release/v*

jobs:
check-no-ee-references:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run check
run: make check-no-ee-references

build-frontend:
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 0 additions & 7 deletions .scripts/commentLinesForSetup.sh

This file was deleted.

9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ clear-swarm-ch:
@docker run --rm -v "$(PWD)/$(SWARM_DIRECTORY)/data:/pwd" busybox \
sh -c "cd /pwd && rm -rf clickhouse*/* zookeeper-*/*"

check-no-ee-references:
@echo "Checking for 'ee' package references in 'pkg' directory..."
@if grep -R --include="*.go" '.*/ee/.*' pkg/; then \
echo "Error: Found references to 'ee' packages in 'pkg' directory"; \
exit 1; \
else \
echo "No references to 'ee' packages found in 'pkg' directory"; \
fi

test:
go test ./pkg/query-service/app/metrics/...
go test ./pkg/query-service/cache/...
Expand Down
2 changes: 0 additions & 2 deletions ee/query-service/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ const (
var LicenseSignozIo = "https://license.signoz.io/api/v1"
var LicenseAPIKey = GetOrDefaultEnv("SIGNOZ_LICENSE_API_KEY", "")
var SaasSegmentKey = GetOrDefaultEnv("SIGNOZ_SAAS_SEGMENT_KEY", "")
var SpanRenderLimitStr = GetOrDefaultEnv("SPAN_RENDER_LIMIT", "2500")
var MaxSpansInTraceStr = GetOrDefaultEnv("MAX_SPANS_IN_TRACE", "250000")
var FetchFeatures = GetOrDefaultEnv("FETCH_FEATURES", "false")
var ZeusFeaturesURL = GetOrDefaultEnv("ZEUS_FEATURES_URL", "ZeusFeaturesURL")

Expand Down
5 changes: 2 additions & 3 deletions pkg/query-service/app/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
promModel "github.com/prometheus/common/model"
"go.uber.org/multierr"

"go.signoz.io/signoz/ee/query-service/constants"
"go.signoz.io/signoz/pkg/query-service/app/metrics"
"go.signoz.io/signoz/pkg/query-service/app/queryBuilder"
"go.signoz.io/signoz/pkg/query-service/auth"
Expand Down Expand Up @@ -255,7 +254,7 @@ func ParseSearchTracesParams(r *http.Request) (*model.SearchTracesParams, error)
levelDownStr = "0"
}
if SpanRenderLimitStr == "" || SpanRenderLimitStr == "null" {
SpanRenderLimitStr = constants.SpanRenderLimitStr
SpanRenderLimitStr = baseconstants.SpanRenderLimitStr
}

levelUpInt, err := strconv.Atoi(levelUpStr)
Expand All @@ -270,7 +269,7 @@ func ParseSearchTracesParams(r *http.Request) (*model.SearchTracesParams, error)
if err != nil {
return nil, err
}
MaxSpansInTraceInt, err := strconv.Atoi(constants.MaxSpansInTraceStr)
MaxSpansInTraceInt, err := strconv.Atoi(baseconstants.MaxSpansInTraceStr)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/query-service/app/preferences/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/jmoiron/sqlx"
"go.signoz.io/signoz/ee/query-service/model"
"go.signoz.io/signoz/pkg/query-service/model"
)

type Range struct {
Expand Down
3 changes: 3 additions & 0 deletions pkg/query-service/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,6 @@ const DefaultFilterSuggestionsAttributesLimit = 50
const MaxFilterSuggestionsAttributesLimit = 100
const DefaultFilterSuggestionsExamplesLimit = 2
const MaxFilterSuggestionsExamplesLimit = 10

var SpanRenderLimitStr = GetOrDefaultEnv("SPAN_RENDER_LIMIT", "2500")
var MaxSpansInTraceStr = GetOrDefaultEnv("MAX_SPANS_IN_TRACE", "250000")

0 comments on commit 6f0cf03

Please sign in to comment.