Skip to content

Commit

Permalink
Merge branch 'jaegertracing:main' into add-deep-dependencies-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachopra29 authored Feb 14, 2025
2 parents b7e4c9c + ce0f543 commit b9c8a50
Show file tree
Hide file tree
Showing 58 changed files with 679 additions and 476 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-build-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build binaries

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-crossdock.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CIT Crossdock

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-docker-all-in-one.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build all-in-one

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build docker images

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-docker-hotrod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CIT Hotrod

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-e2e-all.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: E2E Tests

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-e2e-spm.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test SPM

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-e2e-tailsampling-processor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test Tail Sampling Processor

on:
merge_group:
push:
branches: [main]

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci-lint-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Lint Checks

on:
merge_group:
push:
branches: [main]

Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
python-version: '3.x'

- name: Run DCO check
if: ${{ github.event.pull_request.user.login != 'dependabot' && github.event_name != 'merge_group' }}
run: python3 scripts/lint/dco_check.py -b main -v --exclude-pattern '@users\.noreply\.github\.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -120,7 +122,7 @@ jobs:
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
egress-policy: audit

- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
Expand All @@ -141,7 +143,7 @@ jobs:
TOTAL_SIZE=$(du -sb ./cmd/jaeger/jaeger-linux-amd64 | cut -f1)
echo "$TOTAL_SIZE" > ./new_jaeger_binary_size.txt
echo "Total binary size: $TOTAL_SIZE bytes"
- name: Restore previous binary size
id: cache-binary-size
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
Expand All @@ -158,7 +160,7 @@ jobs:
NEW_BINARY_SIZE=$(cat ./new_jaeger_binary_size.txt)
echo "Previous binary size: $OLD_BINARY_SIZE bytes"
echo "New binary size: $NEW_BINARY_SIZE bytes"
SIZE_CHANGE=$(( $NEW_BINARY_SIZE - $OLD_BINARY_SIZE ))
PERCENTAGE_CHANGE=$(( SIZE_CHANGE * 100 / $OLD_BINARY_SIZE ))
echo "Size change: $PERCENTAGE_CHANGE%"
Expand All @@ -168,13 +170,13 @@ jobs:
else
echo "✅ binary size change is within acceptable range ($PERCENTAGE_CHANGE%)"
fi
- name: Remove previous *_binary_*.txt
run: |
rm -rf ./jaeger_binary_size.txt
mv ./new_jaeger_binary_size.txt ./jaeger_binary_size.txt
- name: Save new jaeger binary size
if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/main') }}
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-lint-dependabot-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: dependabot validate

on:
merge_group:
pull_request:
paths:
- '.github/dependabot.yml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-unit-tests-go-tip.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Unit Tests on Go Tip

on:
merge_group:
push:
branches: [main]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Unit Tests

on:
merge_group:
push:
branches: [main]

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "CodeQL"

on:
merge_group:
push:
branches: [main]

Expand All @@ -20,6 +21,8 @@ permissions: # added using https://github.com/step-security/secure-workflows

jobs:
codeql-analyze:
# Run only on pull requests, see https://github.com/github/codeql-action/issues/1537
if: ${{ github.event_name == 'pull_request' }}
name: CodeQL Analyze
runs-on: ubuntu-latest

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/dco_merge_group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Fake "DCO check" workflow inspired by https://github.com/onnx/onnx/pull/5398/files.
# The regular DCO check is required, but it does not run from a merge queue and there is
# no way to configure it to run.
name: DCO
on:
merge_group:

permissions:
contents: read
jobs:
DCO:
runs-on: ubuntu-latest
steps:
- run: echo "Fake DCO check to avoid blocking the merge queue"
4 changes: 3 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]
on:
pull_request:
merge_group:

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: FOSSA

on:
merge_group:
push:
branches: [main]

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Verify PR Label

on:
merge_group:
pull_request:
types:
- opened
Expand All @@ -23,7 +24,7 @@ jobs:
egress-policy: audit

- name: Check PR label
if: github.event.pull_request.user.login != 'dependabot'
if: ${{ github.event.pull_request.user.login != 'dependabot' && github.event_name != 'merge_group' }}
run: |
LABEL_NAME="changelog:"
if [[ $(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" | jq -r '.labels[].name' | grep -c "^$LABEL_NAME") -eq 0 ]]; then
Expand Down
8 changes: 0 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,6 @@ linters-settings:
files:
- "!**/v1adapter/**"

# TODO: remove once we have upgraded to Go 1.23
disallow-iter:
deny:
- pkg: iter
desc: "Use github.com/jaegertracing/jaeger/pkg/iter"
files:
- "**"

goimports:
local-prefixes: github.com/jaegertracing/jaeger
gosec:
Expand Down
1 change: 0 additions & 1 deletion cmd/agent/app/servers/thriftudp/socket_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build !windows
// +build !windows

package thriftudp

Expand Down
36 changes: 12 additions & 24 deletions cmd/es-rollover/app/init/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
package init

import (
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"

"github.com/jaegertracing/jaeger/cmd/es-rollover/app"
"github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch/mappings"
Expand Down Expand Up @@ -69,30 +66,21 @@ func (c Action) Do() error {
}

func createIndexIfNotExist(c client.IndexAPI, index string) error {
err := c.CreateIndex(index)
exists, err := c.IndexExists(index)
if err != nil {
var esErr client.ResponseError
if errors.As(err, &esErr) {
if esErr.StatusCode != http.StatusBadRequest || esErr.Body == nil {
return esErr.Err
}
// check for the reason of the error
jsonError := map[string]any{}
err := json.Unmarshal(esErr.Body, &jsonError)
if err != nil {
// return unmarshal error
return err
}
errorMap := jsonError["error"].(map[string]any)
// check for reason, ignore already exist error
if strings.Contains(errorMap["type"].(string), "resource_already_exists_exception") {
return nil
}
}
// Return any other error unrelated to the response
return err
}
return nil
if exists {
return nil
}
aliasExists, err := c.AliasExists(index)
if err != nil {
return err
}
if aliasExists {
return nil
}
return c.CreateIndex(index)
}

func (c Action) init(version uint, indexopt app.IndexOption) error {
Expand Down
Loading

0 comments on commit b9c8a50

Please sign in to comment.