Skip to content

Add step that generate issues based on JUnit test results#38270

Merged
mx-psi merged 1 commit into
open-telemetry:mainfrom
ArthurSens:generate-issues
Apr 23, 2025
Merged

Add step that generate issues based on JUnit test results#38270
mx-psi merged 1 commit into
open-telemetry:mainfrom
ArthurSens:generate-issues

Conversation

@ArthurSens
Copy link
Copy Markdown
Member

Description

Now that we're uploading files correctly (#38236), this PR extends the current unit test workflow to download the artifacts and calling issuegenerator to create the issues.

Link to tracking issue

Related to #36761

@ArthurSens
Copy link
Copy Markdown
Member Author

@ArthurSens
Copy link
Copy Markdown
Member Author

@mx-psi, I just wanted to let you know that I believe I'll need to patch issuegenerator to make this work.

As seen in this workflow run, issuegenerator is failing with this error:

2025-03-11T22:06:17.144Z	FATAL	issuegenerator@v0.20.0/main.go:244	Failed to search GitHub Issues	{"error": "GET https://api.github.com/repos/open-telemetry/open-telemetry/opentelemetry-collector-contrib/issues?state=open: 404 Not Found []"}

It is writing open-telemetry twice in the URL. See the difference by clicking:

The reason behind this is that the ENV variable GITHUB_REPOSITORY doesn't return only the repository but a string like <owner>/<repository>, as shown in the docs.

Issuegenerator is building this API call by concatenating the ENV variables, GITHUB_REPOSITORY_OWNER and GITHUB_REPOSITORY, and since the latter already contains the owners, we're duplicating that information. See code references [1], [2] and [3].

@ArthurSens
Copy link
Copy Markdown
Member Author

Opened open-telemetry/opentelemetry-go-build-tools#719 to address the problem

songy23 pushed a commit that referenced this pull request Mar 26, 2025
To unblock
#38270

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
@ArthurSens
Copy link
Copy Markdown
Member Author

@mx-psi @songy23 looking at the current error:

issuegenerator@v0.21.0/main.go:305	Failed to create GitHub Issue	{"error": "POST https://api.github.com/repos/open-telemetry/opentelemetry-collector-contrib/issues: 403 Resource not accessible by integration []"}

Could this be a misconfiguration in the repo settings? I'm suggesting that based on the discussion https://github.com/orgs/community/discussions/60820#discussioncomment-6445895

@mx-psi
Copy link
Copy Markdown
Member

mx-psi commented Mar 27, 2025

@ArthurSens Can you file an issue over at https://github.com/open-telemetry/community to ask for this? Only the admins group has permission to see this I think, and we are not part of it

@ArthurSens
Copy link
Copy Markdown
Member Author

@github-actions
Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Apr 11, 2025
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
@ArthurSens ArthurSens marked this pull request as ready for review April 17, 2025 20:37
@ArthurSens ArthurSens requested a review from a team as a code owner April 17, 2025 20:37
@ArthurSens
Copy link
Copy Markdown
Member Author

ArthurSens commented Apr 17, 2025

PR cleaned up and ready for merge.

Latest test failed due to lack of permissions:

issuegenerator@v0.21.0/main.go:305	Failed to create GitHub Issue	{"error": "POST https://api.github.com/repos/open-telemetry/opentelemetry-collector-contrib/issues: 403 Resource not accessible by integration []"}

Our understanding is that those permissions will only be granted once running from the main branch


A commit with a failing test is still there, so we can quickly test the automation once it's merged. We should see an open issue right away.

I can also remove the commit if folks prefer :)

@ArthurSens ArthurSens added Skip Changelog PRs that do not require a CHANGELOG.md entry and removed Stale labels Apr 17, 2025
@atoulme
Copy link
Copy Markdown
Contributor

atoulme commented Apr 19, 2025

@ArthurSens would you please open a separate PR removing the test? Then we can merge both PRs one after the other.

@ArthurSens
Copy link
Copy Markdown
Member Author

Yes, but can we do it beginning of next week? I'm on holidays until Tuesday

Copy link
Copy Markdown
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Discussed offline, since it may be that the 403 error is due to this running on a fork, we are going to merge this and check if it works on main.

@mx-psi mx-psi merged commit 52a072f into open-telemetry:main Apr 23, 2025
173 checks passed
@github-actions github-actions Bot added this to the next release milestone Apr 23, 2025
@ArthurSens ArthurSens deleted the generate-issues branch April 23, 2025 14:33
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
To unblock
open-telemetry#38270

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
songy23 pushed a commit that referenced this pull request Apr 24, 2025
#### Description
While working on
#38270,
I accidently disabled all tests for the go version 1.24.

Here I'm fixing the problem and also updating comments to make the
conditionals easier to understand.


<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #39618

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
mx-psi added a commit that referenced this pull request May 9, 2025
#### Description
In
#38270,
I've introduced a workflow to create new issues when tests fail on main.
Somehow, that change caused an unexpected behavior with test result
reports, as explained in
#39616.

To be completely transparent, I'm unsure if this PR fixes the issue.
Following what is [documented by
GitHub](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context),
the existing configuration should work... but, well, it isn't. So I'm
trying the opposite of what the documentation says.

I would really appreciate it if someone with GitHub Actions experience
could chime in and guide me because I'm taking shots in the dark at this
point 😕

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
#### Description
In
open-telemetry#38270,
I've introduced a workflow to create new issues when tests fail on main.
Somehow, that change caused an unexpected behavior with test result
reports, as explained in
open-telemetry#39616.

To be completely transparent, I'm unsure if this PR fixes the issue.
Following what is [documented by
GitHub](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context),
the existing configuration should work... but, well, it isn't. So I'm
trying the opposite of what the documentation says.

I would really appreciate it if someone with GitHub Actions experience
could chime in and guide me because I'm taking shots in the dark at this
point 😕

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
#### Description
In
open-telemetry#38270,
I've introduced a workflow to create new issues when tests fail on main.
Somehow, that change caused an unexpected behavior with test result
reports, as explained in
open-telemetry#39616.

To be completely transparent, I'm unsure if this PR fixes the issue.
Following what is [documented by
GitHub](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context),
the existing configuration should work... but, well, it isn't. So I'm
trying the opposite of what the documentation says.

I would really appreciate it if someone with GitHub Actions experience
could chime in and guide me because I'm taking shots in the dark at this
point 😕

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exporter/prometheus Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants