Skip to content

Commit b9c8a50

Browse files
Merge branch 'jaegertracing:main' into add-deep-dependencies-endpoint
2 parents b7e4c9c + ce0f543 commit b9c8a50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+679
-476
lines changed

.github/workflows/ci-build-binaries.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build binaries
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-crossdock.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CIT Crossdock
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-docker-all-in-one.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build all-in-one
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-docker-build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build docker images
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-docker-hotrod.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CIT Hotrod
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-e2e-all.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: E2E Tests
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-e2e-spm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Test SPM
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-e2e-tailsampling-processor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Test Tail Sampling Processor
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-lint-checks.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Lint Checks
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

@@ -66,6 +67,7 @@ jobs:
6667
python-version: '3.x'
6768

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

125127
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
126128
with:
@@ -141,7 +143,7 @@ jobs:
141143
TOTAL_SIZE=$(du -sb ./cmd/jaeger/jaeger-linux-amd64 | cut -f1)
142144
echo "$TOTAL_SIZE" > ./new_jaeger_binary_size.txt
143145
echo "Total binary size: $TOTAL_SIZE bytes"
144-
146+
145147
- name: Restore previous binary size
146148
id: cache-binary-size
147149
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
@@ -158,7 +160,7 @@ jobs:
158160
NEW_BINARY_SIZE=$(cat ./new_jaeger_binary_size.txt)
159161
echo "Previous binary size: $OLD_BINARY_SIZE bytes"
160162
echo "New binary size: $NEW_BINARY_SIZE bytes"
161-
163+
162164
SIZE_CHANGE=$(( $NEW_BINARY_SIZE - $OLD_BINARY_SIZE ))
163165
PERCENTAGE_CHANGE=$(( SIZE_CHANGE * 100 / $OLD_BINARY_SIZE ))
164166
echo "Size change: $PERCENTAGE_CHANGE%"
@@ -168,13 +170,13 @@ jobs:
168170
else
169171
echo "✅ binary size change is within acceptable range ($PERCENTAGE_CHANGE%)"
170172
fi
171-
173+
172174
173175
- name: Remove previous *_binary_*.txt
174176
run: |
175177
rm -rf ./jaeger_binary_size.txt
176178
mv ./new_jaeger_binary_size.txt ./jaeger_binary_size.txt
177-
179+
178180
- name: Save new jaeger binary size
179181
if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/main') }}
180182
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0

.github/workflows/ci-lint-dependabot-config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: dependabot validate
22

33
on:
4+
merge_group:
45
pull_request:
56
paths:
67
- '.github/dependabot.yml'

.github/workflows/ci-unit-tests-go-tip.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Unit Tests on Go Tip
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/ci-unit-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Unit Tests
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/codeql.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "CodeQL"
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

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

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

.github/workflows/dco_merge_group.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Fake "DCO check" workflow inspired by https://github.com/onnx/onnx/pull/5398/files.
2+
# The regular DCO check is required, but it does not run from a merge queue and there is
3+
# no way to configure it to run.
4+
name: DCO
5+
on:
6+
merge_group:
7+
8+
permissions:
9+
contents: read
10+
jobs:
11+
DCO:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: echo "Fake DCO check to avoid blocking the merge queue"

.github/workflows/dependency-review.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#
88
# Source repository: https://github.com/actions/dependency-review-action
99
name: 'Dependency Review'
10-
on: [pull_request]
10+
on:
11+
pull_request:
12+
merge_group:
1113

1214
permissions:
1315
contents: read

.github/workflows/fossa.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: FOSSA
22

33
on:
4+
merge_group:
45
push:
56
branches: [main]
67

.github/workflows/label-check.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Verify PR Label
22

33
on:
4+
merge_group:
45
pull_request:
56
types:
67
- opened
@@ -23,7 +24,7 @@ jobs:
2324
egress-policy: audit
2425

2526
- name: Check PR label
26-
if: github.event.pull_request.user.login != 'dependabot'
27+
if: ${{ github.event.pull_request.user.login != 'dependabot' && github.event_name != 'merge_group' }}
2728
run: |
2829
LABEL_NAME="changelog:"
2930
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

.golangci.yml

-8
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,6 @@ linters-settings:
150150
files:
151151
- "!**/v1adapter/**"
152152

153-
# TODO: remove once we have upgraded to Go 1.23
154-
disallow-iter:
155-
deny:
156-
- pkg: iter
157-
desc: "Use github.com/jaegertracing/jaeger/pkg/iter"
158-
files:
159-
- "**"
160-
161153
goimports:
162154
local-prefixes: github.com/jaegertracing/jaeger
163155
gosec:

cmd/agent/app/servers/thriftudp/socket_buffer.go

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
//go:build !windows
5-
// +build !windows
65

76
package thriftudp
87

cmd/es-rollover/app/init/action.go

+12-24
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
package init
55

66
import (
7-
"encoding/json"
87
"errors"
98
"fmt"
10-
"net/http"
11-
"strings"
129

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

7168
func createIndexIfNotExist(c client.IndexAPI, index string) error {
72-
err := c.CreateIndex(index)
69+
exists, err := c.IndexExists(index)
7370
if err != nil {
74-
var esErr client.ResponseError
75-
if errors.As(err, &esErr) {
76-
if esErr.StatusCode != http.StatusBadRequest || esErr.Body == nil {
77-
return esErr.Err
78-
}
79-
// check for the reason of the error
80-
jsonError := map[string]any{}
81-
err := json.Unmarshal(esErr.Body, &jsonError)
82-
if err != nil {
83-
// return unmarshal error
84-
return err
85-
}
86-
errorMap := jsonError["error"].(map[string]any)
87-
// check for reason, ignore already exist error
88-
if strings.Contains(errorMap["type"].(string), "resource_already_exists_exception") {
89-
return nil
90-
}
91-
}
92-
// Return any other error unrelated to the response
9371
return err
9472
}
95-
return nil
73+
if exists {
74+
return nil
75+
}
76+
aliasExists, err := c.AliasExists(index)
77+
if err != nil {
78+
return err
79+
}
80+
if aliasExists {
81+
return nil
82+
}
83+
return c.CreateIndex(index)
9684
}
9785

9886
func (c Action) init(version uint, indexopt app.IndexOption) error {

0 commit comments

Comments
 (0)