CI: drop Playwright source-build mode, add preview URL comments - #520
Conversation
Remove the temporary source-build mode and related flags/logic now that a published kagent chart is available. Clean up docs and the kagent-kind provisioner to always install the published chart; update README text to explain past captures and recapture guidance. Also add a PR comment step (with explicit permissions) to the preview workflow so preview URLs are posted/updated on the pull request, and clarify live-cluster job comments in the screenshots workflow. Files changed: .github/workflows/playwright-screenshots.yaml, .github/workflows/preview.yaml, docs-site/playwright/README.md, docs-site/playwright/provisioners/kagent-kind.sh. Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Docs preview
Both are uploaded Worker versions and serve no production traffic. |
kristin-kronstain-brown
left a comment
There was a problem hiding this comment.
Findings
Should fix
-
The README claims a dispatch run refreshes the captures, but no dispatch run has ever happened, and the PR step would fail anyway.
docs-site/playwright/README.mdlines 243-245 say a dispatch run refreshes these captures. The workflow comment in this same PR still calls the cluster job "unverified on a hosted runner", so the two files disagree. Noworkflow_dispatchrun ofplaywright-screenshots.yamlhas ever happened.
Separately, all 7 runs of that workflow so far have failed atpeter-evans/create-pull-request@v6withDuplicate header: "Authorization". The cluster job uses the same step, so even a green capture could not open its PR. My best guess is thatcheckout@v7andcreate-pull-request@v6do not work together, and that a newercreate-pull-requestfixes it. I have not confirmed which version.
This PR did not cause that failure, but its new README text depends on the step working. Suggested wording: "The chart now publishes, so the cluster job can install what a reader installs. The job has not had a green dispatch run yet." -
The comment step finds its comment by marker only, not by who wrote it.
.github/workflows/preview.yamllines 131-132. If any person posts a comment that starts with<!-- preview-urls -->, the step tries to PATCH that person's comment.GITHUB_TOKENcannot edit it, the step fails with a 403, and the preview job goes red even though the upload worked. Because of--paginate, the jq filter also runs once per page, so a match on two pages would put two IDs in$ID.ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR}/comments" --paginate \ --jq ".[] | select(.user.login == \"github-actions[bot]\" and (.body | startswith(\"${MARKER}\"))) | .id" | head -1) -
The title covers only half the PR.
The title says "drop source-build mode", but about 43 of the 70 added lines are an unrelated feature: the preview URL comment inpreview.yaml. The description mentions it. Retitling is probably enough, though splitting would give cleaner history.
Nits (optional)
-
1.0.0-alpha2is hard-coded in theplaywright-screenshots.yamlcomment and in the README. Both will be wrong after the next pin bump. The conrefversions/kagent.mdis the source of truth, so "a published 1.x chart" would not go stale. -
This predates the PR.
.github/workflows/preview.yamlline 67 puts${{ github.head_ref }}straight into arun:script. The job now also haspull-requests: write. Fork PRs still get a read-only token underpull_request, so the risk is low, but passing the value throughenv:is the standard fix. -
This also predates the PR. The
preview.yamltrigger types are onlyopenedandsynchronize, so reopening a PR does not refresh the preview comment. Addingreopenedfixes it.
Signed-off-by: Rachael Graham <rachael.graham@solo.io>
Remove the temporary source-build mode and related flags/logic now that a published kagent chart is available
Clean up docs and the kagent-kind provisioner to always install the published chart; update README text to explain past captures and recapture guidance.
Also add a PR comment step (with explicit permissions) to the preview workflow so preview URLs are posted/updated on the pull request, and clarify live-cluster job comments in the screenshots workflow. Files changed: .github/workflows/playwright-screenshots.yaml, .github/workflows/preview.yaml, docs-site/playwright/README.md, docs-site/playwright/provisioners/kagent-kind.sh.