Skip to content

Commit

Permalink
[chore] Revert the switch over githubgen to the one built with our to…
Browse files Browse the repository at this point in the history
…ols (open-telemetry#37409)

Reverts open-telemetry#37397.

PRs started to fail after open-telemetry#37397 got merged because of the codeowners
check action, because it runs `make githubgen-install` then calls the
`githubgen` tool.

I tried first fixing the CI check to run the new tool and it's giving
errors, which is already starting to affect new PRs and old ones that
get rebased:

```
/Users/douglas/code/opentelemetry-collector-contrib/.tools/githubgen
2025/01/22 11:43:55 codeowners are not members: Erog38, Frapschen, IbraheemA, JonathanWamsley, MovieStoreGuy, Mrod1598, NassimBtk, RichieSams, StefanKurek, VihasMakwana, adrielp, ag-ramachandran, akats7, alexvanboxel, ankitpa
tel96, antonblock, armstrmi, atingchen, atoulme, avadhut123pisal, bertysentry, braydonk, bryan-aguilar, carsonip, chan-tim-sumo, chrroberts-pure, codeboten, cparkins, cpheps, dashpole, dehaansa, dgoscn, edmocosta, eedorenko, 
erichsueh3, evan-bradley, fatsheep9146, fchikwekwe, gjanco, greatestusername, hughesjj, jacobmarble, jade-guiton-dd, jamesmoessis, jaronoff97, jmacd, joker-star-l, jsuereth, kasia-kujawa, khyatigandhi6, kongluoxing, liustanle
y, lquerel, mapno, mar4uk, marctc, martin-majlis-s1, mcardy, michalpristas, moh-osman3, mrsillydog, narcis96, nslaughter, pavankrish123, pcwiese, pjanotti, portertech, povilasv, psx95, pxaws, qiansheng91, rapphil, rnishtala-s
umo, rogercoll, samiura, schmikei, shabicheng, shalper2, sinkingpoint, smithclay, splunkericl, srprash, swiatekm, tamir-michaeli, tomaz-s1, wangzlei, yotamloe, zdaratom-s1
make: *** [gengithub] Error 1
```

I suggest that the new tool is introduced more gradually and is not used
in CI yet until it behaves exactly like the old one.
  • Loading branch information
douglascamata authored Jan 22, 2025
1 parent 8034e0d commit a151d16
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,17 @@ generate: install-tools
PATH="$$PWD/.tools:$$PATH" $(MAKE) for-all CMD="$(GOCMD) generate ./..."
$(MAKE) gofmt

.PHONY: githubgen-install
githubgen-install:
cd cmd/githubgen && $(GOCMD) install .

.PHONY: gengithub
gengithub: $(GITHUBGEN)
$(GITHUBGEN)
gengithub: githubgen-install
githubgen

.PHONY: gendistributions
gendistributions: $(GITHUBGEN)
$(GITHUBGEN) distributions
gendistributions: githubgen-install
githubgen distributions

.PHONY: update-codeowners
update-codeowners: gengithub generate
Expand Down Expand Up @@ -552,8 +556,9 @@ clean:
find . -type f -name 'builtunitetest.test' -delete

.PHONY: generate-gh-issue-templates
generate-gh-issue-templates: $(GITHUBGEN)
$(GITHUBGEN) issue-templates
generate-gh-issue-templates:
cd cmd/githubgen && $(GOCMD) install .
githubgen issue-templates

.PHONY: checks
checks:
Expand Down
1 change: 0 additions & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ CHECKFILE := $(TOOLS_BIN_DIR)/checkfile
CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report
BUILDER := $(TOOLS_BIN_DIR)/builder
GITHUBGEN := $(TOOLS_BIN_DIR)/githubgen
GOFUMPT := $(TOOLS_BIN_DIR)/gofumpt
GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck
GCI := $(TOOLS_BIN_DIR)/gci
Expand Down
4 changes: 1 addition & 3 deletions internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
go.opentelemetry.io/build-tools/checkfile v0.16.0
go.opentelemetry.io/build-tools/chloggen v0.16.0
go.opentelemetry.io/build-tools/crosslink v0.16.0
go.opentelemetry.io/build-tools/githubgen v0.0.0-20250120111601-b29324c2a9f5
go.opentelemetry.io/build-tools/issuegenerator v0.16.0
go.opentelemetry.io/build-tools/multimod v0.16.0
go.opentelemetry.io/collector/cmd/builder v0.118.1-0.20250121185328-fbefb22cc2b3
Expand Down Expand Up @@ -108,8 +107,7 @@ require (
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/go-github/v66 v66.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gordonklaus/ineffassign v0.1.0 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
Expand Down
8 changes: 2 additions & 6 deletions internal/tools/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
_ "go.opentelemetry.io/build-tools/checkfile"
_ "go.opentelemetry.io/build-tools/chloggen"
_ "go.opentelemetry.io/build-tools/crosslink"
_ "go.opentelemetry.io/build-tools/githubgen"
_ "go.opentelemetry.io/build-tools/issuegenerator"
_ "go.opentelemetry.io/build-tools/multimod"
_ "go.opentelemetry.io/collector/cmd/builder"
Expand Down

0 comments on commit a151d16

Please sign in to comment.