Skip to content

Commit 0477bbf

Browse files
TylerHelmuthchengchuanpeng
authored andcommitted
[chore] fix CI (open-telemetry#37177)
Fix lint issue caused by open-telemetry#36912 This reverts commit open-telemetry@778d8f7. @adrielp @niwoerner I can't explain why, but it seems that after open-telemetry#36838 the extension integration tests never complete. You can see in https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/workflows/build-and-test.yml?query=branch%3Amain that we haven't got an integration test suite to pass since merging the new receiver. Reverting to unblock CI.
1 parent 5e9f517 commit 0477bbf

11 files changed

+29
-13
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ jobs:
351351
- exporter-1
352352
- exporter-2
353353
- exporter-3
354-
- extension
354+
- extension-0
355+
- extension-1
356+
- extension-2
355357
- connector
356358
- internal
357359
- pkg
@@ -380,7 +382,7 @@ jobs:
380382

381383
integration-tests:
382384
if: ${{ github.actor != 'dependabot[bot]' && always() }}
383-
runs-on: ubuntu-24.04
385+
runs-on: ubuntu-latest
384386
needs: [setup-environment, integration-tests-matrix]
385387
steps:
386388
- name: Print result

Makefile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ EXPORTER_MODS_1 := $(shell find ./exporter/[d-i]* $(FIND_MOD_ARGS) -exec $(TO_MO
4242
EXPORTER_MODS_2 := $(shell find ./exporter/[k-o]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
4343
EXPORTER_MODS_3 := $(shell find ./exporter/[p-z]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
4444
EXPORTER_MODS := $(EXPORTER_MODS_0) $(EXPORTER_MODS_1) $(EXPORTER_MODS_2) $(EXPORTER_MODS_3)
45-
EXTENSION_MODS := $(shell find ./extension/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
45+
EXTENSION_MODS_0 := $(shell find ./extension/[a-d]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
46+
EXTENSION_MODS_1 := $(shell find ./extension/[e]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
47+
EXTENSION_MODS_2 := $(shell find ./extension/[f-z]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
48+
EXTENSION_MODS := $(EXTENSION_MODS_0) $(EXTENSION_MODS_1) $(EXTENSION_MODS_2)
4649
CONNECTOR_MODS := $(shell find ./connector/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
4750
INTERNAL_MODS := $(shell find ./internal/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
4851
PKG_MODS := $(shell find ./pkg/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )
@@ -78,7 +81,9 @@ all-groups:
7881
@echo "\nexporter-1: $(EXPORTER_MODS_1)"
7982
@echo "\nexporter-2: $(EXPORTER_MODS_2)"
8083
@echo "\nexporter-3: $(EXPORTER_MODS_3)"
81-
@echo "\nextension: $(EXTENSION_MODS)"
84+
@echo "\nextension-0: $(EXTENSION_MODS_0)"
85+
@echo "\nextension-1: $(EXTENSION_MODS_1)"
86+
@echo "\nextension-2: $(EXTENSION_MODS_2)"
8287
@echo "\nconnector: $(CONNECTOR_MODS)"
8388
@echo "\ninternal: $(INTERNAL_MODS)"
8489
@echo "\npkg: $(PKG_MODS)"
@@ -245,6 +250,15 @@ for-exporter-3-target: $(EXPORTER_MODS_3)
245250
.PHONY: for-extension-target
246251
for-extension-target: $(EXTENSION_MODS)
247252

253+
.PHONY: for-extension-0-target
254+
for-extension-0-target: $(EXTENSION_MODS_0)
255+
256+
.PHONY: for-extension-1-target
257+
for-extension-1-target: $(EXTENSION_MODS_1)
258+
259+
.PHONY: for-extension-2-target
260+
for-extension-2-target: $(EXTENSION_MODS_2)
261+
248262
.PHONY: for-connector-target
249263
for-connector-target: $(CONNECTOR_MODS)
250264

exporter/dorisexporter/exporter_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ type metric interface {
124124
dMetricGauge | dMetricSum | dMetricHistogram | dMetricExponentialHistogram | dMetricSummary
125125
}
126126

127-
func toJsonLines[T dLog | dTrace | metric](data []*T) ([]byte, error) {
127+
func toJSONLines[T dLog | dTrace | metric](data []*T) ([]byte, error) {
128128
buf := &bytes.Buffer{}
129129
enc := json.NewEncoder(buf)
130130
for _, d := range data {

exporter/dorisexporter/exporter_common_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func findRandomPort() (int, error) {
6363
}
6464

6565
func TestToJsonLines(t *testing.T) {
66-
logs, err := toJsonLines([]*dLog{
66+
logs, err := toJSONLines([]*dLog{
6767
{}, {},
6868
})
6969
require.NoError(t, err)

exporter/dorisexporter/exporter_logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (e *logsExporter) pushLogData(ctx context.Context, ld plog.Logs) error {
122122
}
123123

124124
func (e *logsExporter) pushLogDataInternal(ctx context.Context, logs []*dLog) error {
125-
marshal, err := toJsonLines(logs)
125+
marshal, err := toJSONLines(logs)
126126
if err != nil {
127127
return err
128128
}

exporter/dorisexporter/exporter_traces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (e *tracesExporter) pushTraceData(ctx context.Context, td ptrace.Traces) er
180180
}
181181

182182
func (e *tracesExporter) pushTraceDataInternal(ctx context.Context, traces []*dTrace) error {
183-
marshal, err := toJsonLines(traces)
183+
marshal, err := toJSONLines(traces)
184184
if err != nil {
185185
return err
186186
}

exporter/dorisexporter/metrics_exponential_histogram.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,5 @@ func (m *metricModelExponentialHistogram) size() int {
117117
}
118118

119119
func (m *metricModelExponentialHistogram) bytes() ([]byte, error) {
120-
return toJsonLines(m.data)
120+
return toJSONLines(m.data)
121121
}

exporter/dorisexporter/metrics_gauge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ func (m *metricModelGauge) size() int {
8383
}
8484

8585
func (m *metricModelGauge) bytes() ([]byte, error) {
86-
return toJsonLines(m.data)
86+
return toJSONLines(m.data)
8787
}

exporter/dorisexporter/metrics_histogram.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ func (m *metricModelHistogram) size() int {
107107
}
108108

109109
func (m *metricModelHistogram) bytes() ([]byte, error) {
110-
return toJsonLines(m.data)
110+
return toJSONLines(m.data)
111111
}

exporter/dorisexporter/metrics_sum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ func (m *metricModelSum) size() int {
8787
}
8888

8989
func (m *metricModelSum) bytes() ([]byte, error) {
90-
return toJsonLines(m.data)
90+
return toJSONLines(m.data)
9191
}

0 commit comments

Comments
 (0)