Skip to content

[chore] fix check-codeowners; add components for otelcol and confighttp#13951

Closed
axw wants to merge 3 commits into
open-telemetry:mainfrom
axw:otelcol-component
Closed

[chore] fix check-codeowners; add components for otelcol and confighttp#13951
axw wants to merge 3 commits into
open-telemetry:mainfrom
axw:otelcol-component

Conversation

@axw
Copy link
Copy Markdown
Contributor

@axw axw commented Oct 9, 2025

Description

Add components for otelcol and confighttp. The former is for #13950, while the latter is needed to fix .chloggen/13783.yaml.

Link to tracking issue

N/A

Testing

N/A

Documentation

N/A

axw added 2 commits October 9, 2025 13:45
Add a component for otelcol, and confighttp. The former is for
open-telemetry#13950,
while the latter is needed to fix .chloggen/13783.yaml.
@axw axw closed this Oct 9, 2025
@axw axw reopened this Oct 9, 2025
@axw axw marked this pull request as ready for review October 9, 2025 05:59
@axw axw requested a review from a team as a code owner October 9, 2025 05:59
@axw axw requested a review from mx-psi October 9, 2025 05:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.64%. Comparing base (0cdc78b) to head (721983d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13951      +/-   ##
==========================================
- Coverage   91.67%   91.64%   -0.04%     
==========================================
  Files         653      653              
  Lines       42554    42554              
==========================================
- Hits        39013    38997      -16     
- Misses       2733     2745      +12     
- Partials      808      812       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dnaeon
Copy link
Copy Markdown
Contributor

dnaeon commented Oct 9, 2025

Ah, another tools leftover:

cc: @codeboten , @mx-psi : will submit a PR to get this one fixed asap.

EDIT:

Just noticed, it got fixed by @axw in 48100ee#diff-33e518bda3b8106fe0cb33b8ed49e65aa45b7c9ffd07efcb06e9bc00b575ab17R60

IMO, calling out to githubgen would be better done via a Makefile target.

@axw
Copy link
Copy Markdown
Contributor Author

axw commented Oct 9, 2025

IMO, calling out to githubgen would be better done via a Makefile target.

Agreed. The existing Makefile target is slightly different (it passes -skipgithub), so I think would need to be parameterised?

Comment thread .github/workflows/check-codeowners.yaml Outdated
run: |
cd pr
GITHUB_TOKEN=${{ steps.otelbot-token.outputs.token }} ../.tools/githubgen --default-codeowner "open-telemetry/collector-approvers" codeowners
GITHUB_TOKEN=${{ steps.otelbot-token.outputs.token }} go tool -modfile=../internal/tools/go.mod githubgen --default-codeowner "open-telemetry/collector-approvers" codeowners
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a separate Makefile target for this one would be better, IMHO.

Or perhaps the existing generate-codeowners may be adapted to expect additional args (such as -skipgithub, etc.), so it can be re-used?

  • .PHONY: generate-codeowners
    generate-codeowners:
    $(GO_TOOL) githubgen --default-codeowner "open-telemetry/collector-approvers" -skipgithub codeowners

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was being a little bit lazy. I'll add an args env var for the target and use that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to verify whether we are running in CI or not, and then set opts for codeowner generation respectively?

For example, this would not need to change the existing workflow.

WDYT?

diff --git a/Makefile b/Makefile
index 3ce7d1c98..a0bc35971 100644
--- a/Makefile
+++ b/Makefile
@@ -335,11 +335,13 @@ checkdoc:
 apidiff-build:
        @$(foreach pkg,$(ALL_PKGS),$(call exec-command,./internal/buildscripts/gen-apidiff.sh -p $(pkg)))

-# If we are running in CI, change input directory
+# If we are running in CI, change input directory. Also configure opts for generating codeowners
 ifeq ($(CI), true)
 APICOMPARE_OPTS=$(COMPARE_OPTS)
+GENCODEOWNERS_OPTS=
 else
 APICOMPARE_OPTS=-d "./internal/data/apidiff"
+GENCODEOWNERS_OPTS=-skipgithub
 endif

 # Compare API state snapshots
@@ -468,7 +470,7 @@ generate-gh-issue-templates:

 .PHONY: generate-codeowners
 generate-codeowners:
-       $(GO_TOOL) githubgen --default-codeowner "open-telemetry/collector-approvers" -skipgithub codeowners
+       $(GO_TOOL) githubgen --default-codeowner "open-telemetry/collector-approvers" $(GENCODEOWNERS_OPTS) codeowners

 .PHONY: gengithub
 gengithub: generate-codeowners generate-gh-issue-templates

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about that, for two reasons:

  • we need to pass in -folder to make it look in the PR branch checkout
  • "running in CI" isn't quite enough I think, or at least could be brittle: in this case we can check codeowners against the GitHub API because of the elevated access, so it's not just a matter of checking that we're in CI, but knowing that it's running with a GITHUB_TOKEN with additional access

@github-actions github-actions Bot added the release:risky-change This change may affect the release label Oct 9, 2025
@axw axw changed the title [chore] add components for otelcol and confighttp [chore] fix check-codeowners; add components for otelcol and confighttp Oct 9, 2025
@axw
Copy link
Copy Markdown
Contributor Author

axw commented Oct 9, 2025

The confighttp changelog entry has been fixed in another PR, and the codeowners one is unrelated to adding an otelcol component. I'll separate that out.

@axw axw closed this Oct 9, 2025
@axw
Copy link
Copy Markdown
Contributor Author

axw commented Oct 9, 2025

#13987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:risky-change This change may affect the release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants