-
Notifications
You must be signed in to change notification settings - Fork 177
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
fix(ci): add cleanup workflow to retain generated-docs-preview
for only the last 25 PRs
#2758
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2758/docs/iroh/ Last updated: 2024-10-01T09:09:34Z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehm, I'm not sure if this will work. The generated-docs-preview
branch is a "special branch" as far as github is concerned I think.
What exactly is the problem you're trying to solve? Some explanation in the PR description would help me review this! I've seen the action fail on what I think are race conditions, but I think the way to fix that may be to change the way the branch is updated. |
Thanks for jumping in, I was hoping it works for any branch you set it to (dynamically). |
|
Seems to be a common issue with the action we're using to update the branch: peaceiris/actions-gh-pages#1078 |
This was recommended as a fix to the concurrency issue: peaceiris/actions-gh-pages#998 (comment) I don't think our problem is the concurrency though. It seems the action has stopped at some point in the last month or so. |
Yeah actually I think this is a separate issue. If pushing to the generated-docs-preview branch were the problem, then the stuff that's in the branch would still be served correctly, but e.g. the 2760 PR exists on the branch, but isn't served by github for some reason. |
Yeah thats what I meant by saying it generally wasn't working any more and nothing changed. As for the initial issue (btw thanks for the research), my plan is as follows:
|
644889a
to
c6fc94d
Compare
c6fc94d
to
08a0dd1
Compare
Ok, think I've figured it out. Seems like we're hitting some file size limits judging by the action outputs. I'll manually prune some of the old PRs and see if that makes things work again. |
Yup that worked just fine now. I'll add a step to clean up the branch every now and then. |
@matheus23 This should now also trigger a weekly job to clean up the docs branch. It does risk to remove the preview for PRs that are old but still open, but I guess if you still need or want the docs preview you can easily re-run the job to generate them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for figuring it out! :)
Just a small nit.
@@ -3,6 +3,10 @@ name: Docs Preview | |||
on: | |||
pull_request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add workflow_dispatch
here, too? So we can trigger it manually?
generated-docs-preview
for only the last 25 PRs
generated-docs-preview
for only the last 25 PRsgenerated-docs-preview
for only the last 25 PRs
Think this should do it, but cant be 100% sure till we merge and test it out due to the nature of workflows and permissions on GHA. |
Why does netsim keep adding comments? 😅 (Is that intentional?) |
It's supposed to update them but something is messed up, that's what I'm going to fix next. |
…only the last 25 PRs (#2758) ## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
Description
Breaking Changes
Notes & open questions
Change checklist