Skip to content

Commit

Permalink
Merge pull request #3549 from SigNoz/release/v0.29.0
Browse files Browse the repository at this point in the history
Release/v0.29.0
  • Loading branch information
prashant-shahi authored Sep 14, 2023
2 parents aeee8b4 + 63ba9fb commit 9c8125f
Show file tree
Hide file tree
Showing 239 changed files with 12,542 additions and 3,072 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,27 @@ jobs:
run: |
make build-frontend-amd64
build-frontend-ee:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env file
run: echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
- name: Install dependencies
run: cd frontend && yarn install
- name: Run ESLint
run: cd frontend && npm run lint
- name: Run Jest
run: cd frontend && npm run jest
- name: TSC
run: yarn tsc
working-directory: ./frontend
- name: Build frontend docker image
shell: bash
run: |
make build-frontend-amd64
build-query-service:
runs-on: ubuntu-latest
steps:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,49 @@ jobs:
fi
- name: Build and push docker image
run: make build-push-frontend

image-build-and-push-frontend-ee:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env file
run: echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
- name: Install dependencies
working-directory: frontend
run: yarn install
- name: Run Prettier
working-directory: frontend
run: npm run prettify
continue-on-error: true
- name: Run ESLint
working-directory: frontend
run: npm run lint
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: benjlevesque/short-sha@v2.2
id: short-sha
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Set docker tag environment
run: |
if [ '${{ steps.branch-name.outputs.is_tag }}' == 'true' ]; then
tag="${{ steps.branch-name.outputs.tag }}"
tag="${tag:1}"
echo "DOCKER_TAG=${tag}-ee" >> $GITHUB_ENV
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
echo "DOCKER_TAG=latest-ee" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}-ee" >> $GITHUB_ENV
fi
- name: Build and push docker image
run: make build-push-frontend
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ frontend/src/constants/env.ts
**/locust-scripts/__pycache__/
**/__debug_bin

frontend/*.env
frontend/.env
pkg/query-service/signoz.db

pkg/query-service/tests/test-deploy/data/
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,4 @@ test:
go test ./pkg/query-service/app/querier/...
go test ./pkg/query-service/converter/...
go test ./pkg/query-service/formatter/...
go test ./pkg/query-service/tests/integration/...
16 changes: 10 additions & 6 deletions deploy/docker-swarm/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ services:
# - ./data/clickhouse-3/:/var/lib/clickhouse/

alertmanager:
image: signoz/alertmanager:0.23.3
image: signoz/alertmanager:0.23.4
volumes:
- ./data/alertmanager:/data
command:
Expand All @@ -144,8 +144,12 @@ services:
condition: on-failure

query-service:
image: signoz/query-service:0.28.0
command: [ "-config=/root/config/prometheus.yml" ]
image: signoz/query-service:0.29.0
command:
[
"-config=/root/config/prometheus.yml",
"--prefer-delta=true"
]
# ports:
# - "6060:6060" # pprof port
# - "8080:8080" # query-service port
Expand Down Expand Up @@ -180,7 +184,7 @@ services:
<<: *clickhouse-depend

frontend:
image: signoz/frontend:0.28.0
image: signoz/frontend:0.29.0
deploy:
restart_policy:
condition: on-failure
Expand All @@ -193,7 +197,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector:
image: signoz/signoz-otel-collector:0.79.6
image: signoz/signoz-otel-collector:0.79.7
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down Expand Up @@ -226,7 +230,7 @@ services:
<<: *clickhouse-depend

otel-collector-metrics:
image: signoz/signoz-otel-collector:0.79.6
image: signoz/signoz-otel-collector:0.79.7
command:
[
"--config=/etc/otel-collector-metrics-config.yaml",
Expand Down
6 changes: 3 additions & 3 deletions deploy/docker/clickhouse-setup/docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:

alertmanager:
container_name: signoz-alertmanager
image: signoz/alertmanager:0.23.3
image: signoz/alertmanager:0.23.4
volumes:
- ./data/alertmanager:/data
depends_on:
Expand All @@ -48,7 +48,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`
otel-collector:
container_name: signoz-otel-collector
image: signoz/signoz-otel-collector:0.79.6
image: signoz/signoz-otel-collector:0.79.7
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down Expand Up @@ -78,7 +78,7 @@ services:

otel-collector-metrics:
container_name: signoz-otel-collector-metrics
image: signoz/signoz-otel-collector:0.79.6
image: signoz/signoz-otel-collector:0.79.7
command:
[
"--config=/etc/otel-collector-metrics-config.yaml",
Expand Down
6 changes: 5 additions & 1 deletion deploy/docker/clickhouse-setup/docker-compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ services:
- ./prometheus.yml:/root/config/prometheus.yml
- ../dashboards:/root/config/dashboards
- ./data/signoz/:/var/lib/signoz/
command: [ "-config=/root/config/prometheus.yml" ]
command:
[
"-config=/root/config/prometheus.yml",
"--prefer-delta=true"
]
ports:
- "6060:6060"
- "8080:8080"
Expand Down
16 changes: 10 additions & 6 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ services:
# - ./user_scripts:/var/lib/clickhouse/user_scripts/

alertmanager:
image: signoz/alertmanager:${ALERTMANAGER_TAG:-0.23.3}
image: signoz/alertmanager:${ALERTMANAGER_TAG:-0.23.4}
container_name: signoz-alertmanager
volumes:
- ./data/alertmanager:/data
Expand All @@ -162,9 +162,13 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`

query-service:
image: signoz/query-service:${DOCKER_TAG:-0.28.0}
image: signoz/query-service:${DOCKER_TAG:-0.29.0}
container_name: signoz-query-service
command: [ "-config=/root/config/prometheus.yml" ]
command:
[
"-config=/root/config/prometheus.yml",
"--prefer-delta=true"
]
# ports:
# - "6060:6060" # pprof port
# - "8080:8080" # query-service port
Expand Down Expand Up @@ -197,7 +201,7 @@ services:
<<: *clickhouse-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.28.0}
image: signoz/frontend:${DOCKER_TAG:-0.29.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -209,7 +213,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.6}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.7}
container_name: signoz-otel-collector
command:
[
Expand Down Expand Up @@ -240,7 +244,7 @@ services:
<<: *clickhouse-depend

otel-collector-metrics:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.6}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.79.7}
container_name: signoz-otel-collector-metrics
command:
[
Expand Down
2 changes: 1 addition & 1 deletion ee/query-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN cd ee/query-service \


# use a minimal alpine image
FROM alpine:3.7
FROM alpine:3.16.7

# Add Maintainer Info
LABEL maintainer="signoz"
Expand Down
2 changes: 1 addition & 1 deletion ee/query-service/app/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (ah *APIHandler) registerUser(w http.ResponseWriter, r *http.Request) {
RespondError(w, model.InternalError(basemodel.ErrSignupFailed{}), nil)
}

precheckResp := &model.PrecheckResponse{
precheckResp := &basemodel.PrecheckResponse{
SSO: false,
IsUser: false,
}
Expand Down
4 changes: 2 additions & 2 deletions ee/query-service/app/api/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func (ah *APIHandler) queryRangeMetricsV2(w http.ResponseWriter, r *http.Request
var s basemodel.Series
s.QueryName = name
s.Labels = v.Metric.Copy().Map()
for _, p := range v.Points {
s.Points = append(s.Points, basemodel.MetricPoint{Timestamp: p.T, Value: p.V})
for _, p := range v.Floats {
s.Points = append(s.Points, basemodel.MetricPoint{Timestamp: p.T, Value: p.F})
}
seriesList = append(seriesList, &s)
}
Expand Down
2 changes: 1 addition & 1 deletion ee/query-service/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (s *Server) Start() error {

go func() {
zap.S().Info("Starting OpAmp Websocket server", zap.String("addr", baseconst.OpAmpWsEndpoint))
err := opamp.InitalizeServer(baseconst.OpAmpWsEndpoint, &opAmpModel.AllAgents)
err := opamp.InitializeAndStartServer(baseconst.OpAmpWsEndpoint, &opAmpModel.AllAgents)
if err != nil {
zap.S().Info("opamp ws server failed to start", err)
s.unavailableChannel <- healthcheck.Unavailable
Expand Down
1 change: 0 additions & 1 deletion ee/query-service/dao/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type ModelDao interface {
DB() *sqlx.DB

// auth methods
PrecheckLogin(ctx context.Context, email, sourceUrl string) (*model.PrecheckResponse, basemodel.BaseApiError)
CanUsePassword(ctx context.Context, email string) (bool, basemodel.BaseApiError)
PrepareSsoRedirect(ctx context.Context, redirectUri, email string) (redirectURL string, apierr basemodel.BaseApiError)
GetDomainFromSsoResponse(ctx context.Context, relayState *url.URL) (*model.OrgDomain, error)
Expand Down
4 changes: 2 additions & 2 deletions ee/query-service/dao/sqlite/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ func (m *modelDao) CanUsePassword(ctx context.Context, email string) (bool, base

// PrecheckLogin is called when the login or signup page is loaded
// to check sso login is to be prompted
func (m *modelDao) PrecheckLogin(ctx context.Context, email, sourceUrl string) (*model.PrecheckResponse, basemodel.BaseApiError) {
func (m *modelDao) PrecheckLogin(ctx context.Context, email, sourceUrl string) (*basemodel.PrecheckResponse, basemodel.BaseApiError) {

// assume user is valid unless proven otherwise
resp := &model.PrecheckResponse{IsUser: true, CanSelfRegister: false}
resp := &basemodel.PrecheckResponse{IsUser: true, CanSelfRegister: false}

// check if email is a valid user
userPayload, baseApiErr := m.GetUserByEmail(ctx, email)
Expand Down
11 changes: 1 addition & 10 deletions ee/query-service/model/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ import (
basemodel "go.signoz.io/signoz/pkg/query-service/model"
)

// PrecheckResponse contains login precheck response
type PrecheckResponse struct {
SSO bool `json:"sso"`
SsoUrl string `json:"ssoUrl"`
CanSelfRegister bool `json:"canSelfRegister"`
IsUser bool `json:"isUser"`
SsoError string `json:"ssoError"`
}

// GettableInvitation overrides base object and adds precheck into
// response
type GettableInvitation struct {
*basemodel.InvitationResponseObject
Precheck *PrecheckResponse `json:"precheck"`
Precheck *basemodel.PrecheckResponse `json:"precheck"`
}
16 changes: 16 additions & 0 deletions ee/query-service/model/plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const Basic = "BASIC_PLAN"
const Pro = "PRO_PLAN"
const Enterprise = "ENTERPRISE_PLAN"
const DisableUpsell = "DISABLE_UPSELL"
const Onboarding = "ONBOARDING"
const ChatSupport = "CHAT_SUPPORT"

var BasicPlan = basemodel.FeatureSet{
basemodel.Feature{
Expand Down Expand Up @@ -276,4 +278,18 @@ var EnterprisePlan = basemodel.FeatureSet{
UsageLimit: -1,
Route: "",
},
basemodel.Feature{
Name: Onboarding,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
basemodel.Feature{
Name: ChatSupport,
Active: true,
Usage: 0,
UsageLimit: -1,
Route: "",
},
}
1 change: 0 additions & 1 deletion frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
.vscode
build
.env
.git
7 changes: 7 additions & 0 deletions frontend/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NODE_ENV="development"
BUNDLE_ANALYSER="true"
FRONTEND_API_ENDPOINT="http://localhost:3301/"
INTERCOM_APP_ID="intercom-app-id"

PLAYWRIGHT_TEST_BASE_URL="http://localhost:3301"
CI="1"
Loading

0 comments on commit 9c8125f

Please sign in to comment.