Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] remove generated code #34844

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand All @@ -48,6 +49,7 @@ jobs:
needs: [setup-environment]
steps:
- uses: actions/checkout@v4
- run: make genotelcontribcol
- name: Check Collector Module Version
run: ./.github/workflows/scripts/check-collector-module-version.sh
check-codeowners:
Expand Down Expand Up @@ -102,6 +104,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -171,6 +174,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
Expand All @@ -194,13 +198,15 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- run: make genotelcontribcol
- name: CheckDoc
run: make checkdoc
- name: CheckMetadata
Expand All @@ -219,14 +225,6 @@ jobs:
run: |
make gotidy
git diff --exit-code || (echo 'go.mod/go.sum deps changes detected, please run "make gotidy" and commit the changes in this PR.' && exit 1)
- name: Gen genotelcontribcol
run: |
make genotelcontribcol
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make genotelcontribcol" and commit the changes in this PR.' && exit 1)
- name: Gen genoteltestbedcol
run: |
make genoteltestbedcol
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make genoteltestbedcol" and commit the changes in this PR.' && exit 1)
- name: Gen distributions
run: |
make gendistributions
Expand Down Expand Up @@ -289,6 +287,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -379,6 +378,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Run Integration Tests
run: make gointegration-test GROUP=${{ matrix.group }}
Expand Down Expand Up @@ -417,6 +417,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand All @@ -443,6 +444,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand All @@ -458,6 +460,7 @@ jobs:
needs: [setup-environment]
steps:
- uses: actions/checkout@v4
- run: make genotelcontribcol
- name: Build Examples
run: make build-examples

Expand Down Expand Up @@ -513,13 +516,16 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Generate collector files
run: make genotelcontribcol
- name: Build Collector ${{ matrix.binary }}
run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} otelcontribcol
- name: Upload Collector Binaries
Expand Down Expand Up @@ -617,6 +623,7 @@ jobs:
path: |
~/go/bin
~/go/pkg/mod
./.tools
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Generate otelcontribcol files
run: make genotelcontribcol
- name: Build Collector
run: make otelcontribcol
- name: Upload Collector Binary
Expand Down Expand Up @@ -101,6 +103,8 @@ jobs:
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Generate otelcontribcol files
run: make genotelcontribcol
- name: Build Docker Image
run: |
make docker-otelcontribcol
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ jobs:
~/go/bin
~/go/pkg/mod
~/.cache/go-build
./.tools
key: prometheus-${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
- run: make genotelcontribcol
working-directory: opentelemetry-collector-contrib
- run: make otelcontribcol
working-directory: opentelemetry-collector-contrib
- name: Checkout compliance repo
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ chlog-update: $(CHLOGGEN)
.PHONY: genotelcontribcol
genotelcontribcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml --output-path cmd/otelcontribcol
$(MAKE) --no-print-directory -C cmd/otelcontribcol fmt

# Build the Collector executable.
.PHONY: otelcontribcol
Expand All @@ -351,7 +350,6 @@ otelcontribcollite:
.PHONY: genoteltestbedcol
genoteltestbedcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml --output-path cmd/oteltestbedcol
$(MAKE) --no-print-directory -C cmd/oteltestbedcol fmt

# Build the Collector executable, with only components used in testbed.
.PHONY: oteltestbedcol
Expand Down
4 changes: 4 additions & 0 deletions cmd/otelcontribcol/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!builder-config.yaml
!Dockerfile
!metadata.yaml
4 changes: 1 addition & 3 deletions cmd/otelcontribcol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM alpine:latest as prep
FROM alpine:latest AS prep
RUN apk --update add ca-certificates

RUN mkdir -p /tmp

FROM scratch

ARG USER_UID=10001
Expand Down
4 changes: 0 additions & 4 deletions cmd/otelcontribcol/Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions cmd/otelcontribcol/README.md

This file was deleted.

Loading