Skip to content

Commit ebaca64

Browse files
authored
Merge branch 'main' into 15010
2 parents ba55151 + 9ee240d commit ebaca64

94 files changed

Lines changed: 216 additions & 162 deletions

File tree

Some content is hidden

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

.github/workflows/api-compatibility.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,15 @@ jobs:
5656
# Compare apidiff states of Main with PR
5757
- name: Compare-States
5858
env:
59-
CI: true
60-
COMPARE_OPTS: -d "../${{ github.base_ref }}/internal/data/apidiff"
59+
APIDIFF_DATA_DIR: "../${{ github.base_ref }}/internal/data/apidiff"
6160
run: |
6261
cd $HEAD_REF
6362
make apidiff-compare
6463
6564
# Fail GitHub Action if there are incompatible changes
6665
- name: Check-States
6766
env:
68-
CI: true
69-
COMPARE_OPTS: -d "../${{ github.base_ref }}/internal/data/apidiff" -c
67+
APIDIFF_DATA_DIR: "../${{ github.base_ref }}/internal/data/apidiff"
7068
run: |
7169
cd $HEAD_REF
72-
make apidiff-compare
70+
make apidiff-check

.github/workflows/utils/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@
288288
"incorrectclass",
289289
"incorrectcomponent",
290290
"incorrectstability",
291+
"inotify",
291292
"instrgen",
292293
"internaldata",
293294
"ints",

Makefile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,22 +270,26 @@ checkapi:
270270
checkdoc:
271271
$(GO_TOOL) checkfile --project-path $(CURDIR) --component-rel-path $(COMP_REL_PATH) --module-name $(MOD_NAME) --file-name "README.md"
272272

273+
# Extract the relative path of every module listed between "stable:" and "beta:" in versions.yaml
274+
STABLE_MODULES := $(shell sed -n -e '/stable:/,/beta:/ s/.*- go.opentelemetry.io\/collector/./p' versions.yaml)
275+
276+
.PHONY: for-all-stable-target
277+
for-all-stable-target: $(STABLE_MODULES)
278+
273279
# Construct new API state snapshots
274280
.PHONY: apidiff-build
275281
apidiff-build:
276-
@$(foreach pkg,$(ALL_PKGS),$(call exec-command,./internal/buildscripts/gen-apidiff.sh -p $(pkg)))
277-
278-
# If we are running in CI, change input directory
279-
ifeq ($(CI), true)
280-
APICOMPARE_OPTS=$(COMPARE_OPTS)
281-
else
282-
APICOMPARE_OPTS=-d "./internal/data/apidiff"
283-
endif
282+
@$(MAKE) --silent for-all-stable-target TARGET="apidiff-build-mod"
284283

285-
# Compare API state snapshots
284+
# Compare API state snapshots and log differences
286285
.PHONY: apidiff-compare
287286
apidiff-compare:
288-
@$(foreach pkg,$(ALL_PKGS),$(call exec-command,./internal/buildscripts/compare-apidiff.sh -p $(pkg)))
287+
@$(MAKE) --silent for-all-stable-target TARGET="apidiff-compare-mod"
288+
289+
# Compare API state snapshots and fail if there are differences
290+
.PHONY: apidiff-check
291+
apidiff-check:
292+
@$(MAKE) --silent for-all-stable-target TARGET="apidiff-check-mod"
289293

290294
.PHONY: multimod-verify
291295
multimod-verify:

Makefile.Common

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,24 @@ FLAGS ?= '-o=$(CURDIR)/'
110110
schemagen:
111111
@echo "Running schemagen with filepath='$(SRC)' and flags='$(FLAGS)'"
112112
cd $(SRC_ROOT)/cmd/schemagen && go run . $(FLAGS) $(SRC)
113+
114+
EXTERNAL_PKGS := $(shell go list ./... | grep -v -E '/internal($|/)')
115+
APIDIFF_DATA_DIR ?= internal/data/apidiff
116+
117+
.PHONY: apidiff-build-mod
118+
apidiff-build-mod:
119+
@for pkg in $(EXTERNAL_PKGS); do \
120+
$(SRC_ROOT)/internal/buildscripts/gen-apidiff.sh -p $$pkg -o $(SRC_ROOT)/$(APIDIFF_DATA_DIR) || exit 1; \
121+
done
122+
123+
.PHONY: apidiff-compare-mod
124+
apidiff-compare-mod:
125+
@for pkg in $(EXTERNAL_PKGS); do \
126+
$(SRC_ROOT)/internal/buildscripts/compare-apidiff.sh -p $$pkg -d $(SRC_ROOT)/$(APIDIFF_DATA_DIR) || exit 1; \
127+
done
128+
129+
.PHONY: apidiff-check-mod
130+
apidiff-check-mod:
131+
@for pkg in $(EXTERNAL_PKGS); do \
132+
$(SRC_ROOT)/internal/buildscripts/compare-apidiff.sh -p $$pkg -d $(SRC_ROOT)/$(APIDIFF_DATA_DIR) -c || exit 1; \
133+
done

cmd/mdatagen/go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
go.opentelemetry.io/collector/config/configoptional v1.63.0
1313
go.opentelemetry.io/collector/confmap v1.63.0
1414
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.63.0
15-
go.opentelemetry.io/collector/confmap/xconfmap v0.157.0
1615
go.opentelemetry.io/collector/connector v0.157.0
1716
go.opentelemetry.io/collector/connector/connectortest v0.157.0
1817
go.opentelemetry.io/collector/connector/xconnector v0.157.0
@@ -84,7 +83,7 @@ require (
8483
golang.org/x/sys v0.47.0 // indirect
8584
golang.org/x/tools v0.48.0 // indirect
8685
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
87-
google.golang.org/grpc v1.82.0 // indirect
86+
google.golang.org/grpc v1.82.1 // indirect
8887
google.golang.org/protobuf v1.36.11 // indirect
8988
gopkg.in/yaml.v3 v3.0.1 // indirect
9089
)

cmd/mdatagen/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/sampleconnector/internal/metadata/generated_resource_test.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/sampleentityreceiver/internal/metadata/generated_resource_test.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource_test.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/samplereceiver/internal/metadata/generated_resource_test.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)