action #158236
closedBacklog Limits Checker github workflow fails on pull requests from forks size:S
Added by tinita 9 months ago. Updated 8 months ago.
0%
Description
Observation¶
https://github.com/openSUSE/backlogger/actions/runs/8468254805/job/23200822772
The workflow is creating a preview of the HTML page in the origin gh-pages branch.
For that, it needs the right permissions. A PR with a branch from origin works, but it fails for forks.
Maybe there are other options to make it work.
Suggestions¶
- Research how previews could be done
- Give permissions to upstream to forks
- Store the preview elsewhere
- Lookup other ways to do this in the preview action, or other actions doing this
Files
clipboard-202405020913-pdv0z.png (88.2 KB) clipboard-202405020913-pdv0z.png | livdywan, 2024-05-02 07:13 |
Updated by ybonatakis 9 months ago
- Status changed from Workable to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis 9 months ago
for now i am waiting to get permissions to the https://github.com/openSUSE/backlogger as i cant access the settings
Updated by ybonatakis 8 months ago
- Status changed from Workable to In Progress
access granted. I can open settings on https://github.com/openSUSE/backlogger now.
Updated by ybonatakis 8 months ago
I added the REDMINE_API_KEY in the forked repo but this didnt work.
I found an open issue which lists some limitation for forked jobs and i commented there, and hope to get some answer/solution https://github.com/rossjrw/pr-preview-action/issues/54
Updated by openqa_review 8 months ago
- Due date set to 2024-04-24
Setting due date based on mean cycle time of SUSE QE Tools
Updated by ybonatakis 8 months ago
- Due date deleted (
2024-04-24)
From the documentation is clear that the workflow doesnt work from forked repos in the current version. There is a PR[0] to fix the issue in the v2 but it is not ready yet.
Updated by ybonatakis 8 months ago
- Status changed from In Progress to Feedback
ybonatakis wrote in #note-8:
I added the REDMINE_API_KEY in the forked repo but this didnt work.
I found an open issue which lists some limitation for forked jobs and i commented there, and hope to get some answer/solution https://github.com/rossjrw/pr-preview-action/issues/54
I got an answer too https://github.com/rossjrw/pr-preview-action/issues/54#issuecomment-2046165272 confirming the state of the project. there is a workaround tho which comes with some security caveats.
Change it to feedback for further discussion
Updated by livdywan 8 months ago
Discussed in the unblock:
- In the context of https://github.com/openSUSE/backlogger/blob/main/.github/workflows/preview.yaml#L24C11-L24C58
- Change from pull_request to pull_request_target
- Drop the API key in the preview use case (and adapt as necessary)
- Consider checking if it makes sense to limit the allowed output to HTML
Updated by ybonatakis 8 months ago
Updated by openqa_review 8 months ago
- Due date set to 2024-04-25
Setting due date based on mean cycle time of SUSE QE Tools
Updated by ybonatakis 8 months ago
- Status changed from Feedback to In Progress
reopen due to the comment in the PR[0].
the testing commit is checked out but then Run the action implemented in this repo
runs another checkout.
[0] https://github.com/openSUSE/backlogger/pull/38#issuecomment-2064171707
Updated by ybonatakis 8 months ago
- Status changed from In Progress to Feedback
https://github.com/openSUSE/backlogger/pull/42 seems to work properly
Updated by ybonatakis 8 months ago · Edited
addressing the comment[0] from @tinita i encountered an unrelated issue with the container. the previews actions looks good tho with the correct commit hash
[0] https://github.com/openSUSE/backlogger/pull/42#discussion_r1575344367
Updated by ybonatakis 8 months ago
i think it works https://github.com/openSUSE/backlogger/actions/runs/8815937064/job/24220533045
but i cant tell for sure how it will affect https://github.com/os-autoinst/qa-tools-backlog-assistant/blob/master/.github/workflows/backlog_checker.yml#L21
Updated by livdywan 8 months ago
- Due date changed from 2024-04-25 to 2024-05-03
ybonatakis wrote in #note-20:
i think it works https://github.com/openSUSE/backlogger/actions/runs/8815937064/job/24220533045
but i cant tell for sure how it will affect https://github.com/os-autoinst/qa-tools-backlog-assistant/blob/master/.github/workflows/backlog_checker.yml#L21
Is this the correct link? That's a PR on the upstream repo. We need the preview to work on forks.
Updated by livdywan 8 months ago
- Status changed from In Progress to Workable
Let's discuss this on Monday. Pulling a ticket in progress without confirming someone can work on it is not enough to get it done. If someone did work on, or further discuss this, please do add your comments here of course.
Updated by livdywan 8 months ago
Yannis and I were discussing this this morning (hence in progress). Hopefully we were able to bisect the relevant changes successfully.
I also prepared a PR to verify that this works correctly now https://github.com/openSUSE/backlogger/pull/45
Updated by livdywan 8 months ago · Edited
livdywan wrote in #note-25:
Yannis and I were discussing this this morning (hence in progress). Hopefully we were able to bisect the relevant changes successfully.
I also prepared a PR to verify that this works correctly now https://github.com/openSUSE/backlogger/pull/45
Seems like my changes to query.yaml
were ignored. The limits in the generated preview are still the old ones.
Updated by livdywan 8 months ago
Seems like my changes to
query.yaml
were ignored. The limits in the generated preview are still the old ones.
Reviewing the code we hypothesize that the queries.yaml
is being taken from the wrong folder. Since it uses a relative "config" filename.
It seems the fix we came up with doesn't make a difference, though?
Updated by livdywan 8 months ago
As discussed there's 3 more action items to wrap this up:
- Propose a PR to remove
branches: ["**"]
frompreview.yaml
, provided it's not needed - Add a brief note to the https://github.com/openSUSE/backlogger README.md, maybe simply under Previews for pull requests, changes to queries.yaml don't currently work in previews.
- File a follow-up ticket to make previews with changes to queries.yaml work
The implicit AC "make it not fail" is fulfilled.
Updated by livdywan 8 months ago
- Copied to action #159783: Changes to queries.yaml in backlog status PRs are not reflected in the preview added
Updated by livdywan 8 months ago
- Propose a PR to remove
branches: ["**"]
frompreview.yaml
, provided it's not needed
It seems the setting is needed, at least that's what I conclude from the proof of concept.
- Add a brief note to the https://github.com/openSUSE/backlogger README.md, maybe simply under Previews for pull requests, changes to queries.yaml don't currently work in previews.
Updated by ybonatakis 8 months ago
i going to close this after https://github.com/openSUSE/backlogger/pull/47
we can tackle the rest in another ticket.
For now, at least, pipeline is green from forked, but gh-pages is not absolute correctly
Updated by ybonatakis 8 months ago
Side note: this PR seems intends to fix the upstream issue https://github.com/rossjrw/pr-preview-action/pull/6
Updated by ybonatakis 8 months ago
ybonatakis wrote in #note-33:
Side note: this PR seems to intent to fix the upstream issue https://github.com/rossjrw/pr-preview-action/pull/6
Updated by livdywan 8 months ago
- File clipboard-202405020913-pdv0z.png clipboard-202405020913-pdv0z.png added
- Assignee changed from ybonatakis to livdywan
I re-created my branch to update the README.md, and something's wrong with the gh-pages branch.
error: unable to write file pr-preview/pr-47/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-45/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-43/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-41/pr-preview/pr-41/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-41/index.html
fatal: cannot create directory at 'pr-preview/pr-47/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-45/pr-preview/pr-46/pr-preview/pr-46/pr-preview/pr-43/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-41/pr-preview/pr-41/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-42/pr-preview/pr-41/pr-preview': No space left on device
@tinita tried to clean up the gh-pages branch, so right now my PR re-ran successfully. After the second re-run I am once again seeing redundant folders:
I'll see if I can find out if this is a known issue, and come up with a work-around.
Updated by livdywan 8 months ago
- Copied to action #159888: Open pull requests on Backlog Limits Checker use up too much space added
Updated by livdywan 8 months ago
- Status changed from In Progress to Resolved
- Assignee changed from livdywan to ybonatakis
- Priority changed from Urgent to High
I'm giving back the ticket and resolving it. #159888 deals with the specific issue with redundant files being created. The preview has been improved, and they work in general and I don't believe the disk space issue is specific to forks either.