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

Flash Test in CI is failing due to Github API #24408

Open
mrpollo opened this issue Feb 24, 2025 · 2 comments
Open

Flash Test in CI is failing due to Github API #24408

mrpollo opened this issue Feb 24, 2025 · 2 comments

Comments

@mrpollo
Copy link
Contributor

mrpollo commented Feb 24, 2025

Describe the bug

The test for Flash space in the firmware is currently failing when posting a comment. The way the workflow was intended to work, CI would post a comment to the Pull Request with a summary of the flash space unavailable/available. I have been trying to find the root cause but haven't been able to trace it down.

IMO we should disable the commenting part of the workflow until we can find out a way to have this succeed to post.

Relevant PRs

@alexcekay
Copy link
Member

alexcekay commented Feb 25, 2025

Hi @mrpollo:
I described the cause here: #24395 (comment)
Based on that the way to get it running on fork PRs is changing the target to pull_request_target, but that also changes the behavior as described in my comment. I don't have a solution ready yet.

By the way: Even if we don't directly find a fix for creating comments in case of forks we don't need to disable it completely as it still does work when it is not a fork and those are the majority of the PRs. If it bothers us that the job fails in cases of forks it is possible to add a condition to the comment part (rough idea from here: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#restrictions-on-repository-forks)

on: pull_request
jobs:
  example:
    runs-on: ubuntu-latest
    # Check if the event is not triggered by a fork
    if: github.event.pull_request.head.repo.full_name == github.repository

cc: @haumarco, @dakejahl

@mrpollo
Copy link
Contributor Author

mrpollo commented Feb 25, 2025

Hey, @alexcekay, thanks for your help; we have been trying to get this fixed for a few weeks now and seem to be getting closer, but we haven't totally found the issue.

Regarding failing tests, I think they should either pass or fail. We currently have a big issue with devs ignoring CI tests, mostly because they are known to constantly fail, and we want to avoid this situation by having tests we know always work.

IMO, we should find the problem with the workflow permissions so we can post comments from Forks. We seem to be missing a very specific permission. I'll continue testing on another repo where we can debug faster. Once we have the fix, we can pull it into this workflow.

My plan is to get this workflow back to posting comments before we push the v1.16 release.

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

No branches or pull requests

2 participants