Add PR preview pruning and retention management - #378
Conversation
|
🚀 Preview deployment: https://layer5io.github.io/getnighthawk/pr-preview/pr-378/
|
|
Hi maintainers 👋 |
831bd43 to
2732b56
Compare
|
Hi maintainers 👋 I noticed the failing This PR only modifies Please let me know if you'd like any changes from my side or if there is anything else I can help investigate. Thanks! 🙌 |
| <center><h1>301 Moved Permanently</h1></center> | ||
| <hr><center>cloudflare</center> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
What is use of changing this file.
There was a problem hiding this comment.
@Bhumikagarggg Thanks for pointing this out. This file wasn't intentionally modified as part of the preview pruning feature. It changed while I updated my branch and resolved the merge conflict with the latest master. The functional changes for this PR are only in build-and-preview-site.yml.
|
I approved this PR by mistake. |
|
|
||
| jobs: | ||
| build-and-deploy-preview: | ||
| outputs: |
There was a problem hiding this comment.
Please move output section after runs-on
There was a problem hiding this comment.
@Bhumikagarggg Done, thank you for the suggestion. I've moved the outputs section below runs-on as requested. Could you please take another look when you have a chance?
|
|
||
| git add pr-preview | ||
| git commit -m "Prune old PR previews" || true | ||
| git push || true |
There was a problem hiding this comment.
Replace git push || true with git push instead of ignoring push failures.
|
@Sbragul26 Thanks for the review! I've updated the workflow by replacing |
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git add pr-preview | ||
| git commit -m "Prune old PR previews" || true |
There was a problem hiding this comment.
For this too replace git commit -m "Prune old PR previews" with this.
There was a problem hiding this comment.
Thanks for the review! I've removed || true from the git commit command since the workflow already checks for staged changes before attempting the commit.
fabd3f8 to
db614c0
Compare
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git add pr-preview |
There was a problem hiding this comment.
Could we remove this? git add pr-preview was already called above (line 123).
Signed-off-by: l5io <ci@layer5.io> Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: l5io <ci@layer5.io> Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
cc111e9 to
43e2601
Compare
There was a problem hiding this comment.
I tested this PR, and it looks good to me. You can see the test PRs here: https://github.com/Bhumikagarggg/getnighthawk/pulls
However, I think we should remove the paths filter. In the future, if someone opens a PR with an empty or minimal change, the build-preview workflow may not run, which could cause preview pruning to miss that PR.
There was a problem hiding this comment.
if a user pushes an empty commit (or a commit that doesn't modify any of the monitored paths) to re-trigger the preview after pruning, the build-preview workflow won't run.
Signed-off-by: Yashi Singhal285 <yashi.singhal410@gmail.com>
5b5597a to
d0c1754
Compare
|
Hi @Sbragul26, @Bhumikagarggg, Just following up on this PR. I've addressed all the requested review comments, and the PR now has no merge conflicts and an approval. The remaining failing lint check appears to be unrelated to the changes in this PR. Could you please let me know if anything else is required from my side? If everything looks good, I'd really appreciate it if this PR could be merged when you have time. Thank you! |
|
Hi @Sbragul26, @Bhumikagarggg, @banana-three-join, @hortison 👋 Just a friendly follow-up on this PR. I've addressed all the requested review comments, the PR has an approval, and there are no merge conflicts. The remaining lint check appears to be unrelated to the changes in this PR. If everything looks good, I'd really appreciate it if you could take a final look and merge it when you have time. Please let me know if there's anything else you'd like me to update. Thank you! |
Description
This PR adds preview pruning and retention management for PR preview deployments.
What changed
pr-preview/pr-*directoriesIssue
Fixes #377
Notes for Reviewers
pr-previewdirectory is modifiedChecklist
Signed commits