Skip to content

[chore][ping code owners] Only get code owners for components #38862

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

crobert-1
Copy link
Member

Description

After checking the component labels file, COMPONENT may be empty if the label added is not for a component. This is a valid and acceptable state. If the label does not correspond to a component, code owners don't need to be pinged.

This is to fix the following example failure.

Link to tracking issue

Related to #38622

Before the related PR the passed in component was checked to make sure it wasn't empty and passed directly to the get-codeowners.sh script, which fails if COMPONENT is empty, and returns an empty string successfully if the given label is not a component. After the change, COMPONENT is modified to potentially be empty, then passed to get-codeowners.sh. This is what caused the 1 return code.

Testing

Tested locally with the label os:windows. The script passes with the change, failed before.

@crobert-1 crobert-1 requested a review from a team as a code owner March 21, 2025 16:40
@crobert-1 crobert-1 requested a review from fatsheep9146 March 21, 2025 16:40
@songy23 songy23 added ci-cd CI, CD, testing, build issues Run Windows Enable running windows test on a PR labels Mar 21, 2025
@atoulme atoulme closed this Mar 21, 2025
@atoulme atoulme reopened this Mar 21, 2025
@atoulme atoulme merged commit bc3c682 into open-telemetry:main Mar 21, 2025
414 of 421 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 21, 2025
@crobert-1 crobert-1 deleted the fix_codeowner_ping branch March 21, 2025 19:52
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…elemetry#38862)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
After checking the component labels file, `COMPONENT` may be empty if
the label added is not for a component. This is a valid and acceptable
state. If the label does not correspond to a component, code owners
don't need to be pinged.

This is to fix the following [example
failure](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13994662160/job/39186701459).

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Related to
open-telemetry#38622

Before the related PR the passed in component was checked to make sure
it wasn't empty and passed directly to the `get-codeowners.sh` script,
which fails if `COMPONENT` is empty, and returns an empty string
successfully if the given label is not a component. After the change,
`COMPONENT` is modified to potentially be empty, then passed to
`get-codeowners.sh`. This is what caused the `1` return code.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Tested locally with the label `os:windows`. The script passes with the
change, failed before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI, CD, testing, build issues Run Windows Enable running windows test on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants