Repository navigation
[3408 by Claude Opus 5.5] Automate the hosted UI (app.propr.dev) deployment for releases. Check current upstream main first. - #3409
Conversation
…e GitHub release is published. Nothing was deployed, tagged or published; the job has only been checked offline, never run against Cloudflare. The branch was already at current upstream main (`043d9e122`), so nothing needed rebasing. The new job is `deploy-hosted-ui` in `.github/workflows/docker-images.yml`: - When it runs: after `publish-github-release` succeeds, with the same condition, so it covers tag pushes and the manual release path. If an earlier release job fails or is skipped, the deploy is skipped too. - Where the secrets live: the job runs in the `hosted-ui-production` environment with read-only repo access. The two Cloudflare secrets are passed only to the credential-check step and the deploy step. - Missing secrets: the job prints a "Hosted UI deploy skipped" notice, writes a summary and finishes green, so the already-published release isn't marked failed. A failed deploy or failed check does fail the job, and the summary explains how to re-run or deploy by hand. - Build and deploy: it checks out the exact release ref (same expression as the other release jobs). It confirms `package.json` has the released version, then runs `npm ci`, `npm run build -w propr-ui` and `wrangler deploy --config wrangler.hosted-ui.toml`. Wrangler isn't in any lockfile, so CI pins it to `[email protected]`. - Check after deploy: `scripts/verify-hosted-ui-release.mjs` reads the entry script that `index.html` actually loads and checks it contains the version string, e.g. `"0.9.0"`. It tries up to 6 times, 20 seconds apart. A real build produces two `index-*.js` files and only the one `index.html` loads has the version, so guessing by filename wouldn't work. `npm run deploy:hosted-ui` is unchanged. Tests and lint - `test/hostedUiReleaseDeploy.test.mjs` has 11 tests and all pass. They cover the conditions you listed, the skip behaviour (by running the credential-check shell) and the retry logic. I confirmed the test fails if the token is added to another job. - The two existing suites that read this workflow still pass (48 tests), and ESLint is clean. - actionlint is clean. The repo doesn't run zizmor, but I ran it anyway: it reports the same 25 findings before and after, all in existing jobs, so the new job adds none. - The docs site builds with no broken links. Docs and changelog: the new page is `docs/docs/operations/hosted-ui-release.md`, added to the sidebar and linked from `deployment.md`. It covers creating the token and setting up the environment. The token needs only two permissions, per [Cloudflare's Workers authorization docs](https://developers.cloudflare.com/workers/authorization/workers/) and [custom domains docs](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/): - Account > Workers Scripts: Edit, granted for all Workers in the account, because custom domains can't be granted per Worker. - Zone > Workers Routes: Edit, limited to `propr.dev`. It needs no DNS edit permission. I added an `[Unreleased]` entry to `CHANGELOG.md`. Before the first automated release: - First deploy: this token can update the existing `propr-hosted-ui` Worker but can't create one. If the Worker is ever deleted, someone has to deploy it once by hand. - Environment ref rules: if `hosted-ui-production` only allows `v*.*.*` tags, a manual release started from `main` will fail on the environment rule instead of skipping. The docs say to add `main` if you start manual releases from there. There are no previews because nothing in this change shows up in the UI.
…ion environment Creates the environment limited to v* tags and main, and stores the Cloudflare API token and account ID as environment secrets from hidden prompts. Already used to provision integry/propr. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Added /review |
|
✅ Applied the requested follow-up changes in commit 9dfccf0 Summary of ChangesI added references to Docs changes
The 11 tests in Review of the script
No previews, because nothing here is visible in the UI. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…sh` in the docs this PR adds, and in its changelog entry. I added references to `scripts/setup-hosted-ui-environment.sh` in the docs this PR adds, and in its changelog entry. **Docs changes** - **`docs/docs/operations/hosted-ui-release.md`, "Add the token to the GitHub environment":** - The section now starts with the script. It says this is what provisioned `hosted-ui-production` on integry/propr and that it needs `gh` with admin rights. - It gives example commands: the default run, `--reviewer`, and `--repo`/`--env`. - It describes what the script does: it limits the environment to `v*` tags and `main`, stores `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` from hidden prompts or from already-exported variables, and is safe to re-run. - The manual steps are kept as a fallback. - **Corrected a mismatch with the real setup:** the manual steps said to allow only `v*.*.*` tags and to add `main` only if needed. They now say `v*` and `main`, which is what the environment actually has. Without the `main` rule, a manual release started from `main` would fail on the environment rule instead of deploying. That was the open risk in the original summary, and it no longer applies. - **"Re-run after a skipped deploy":** this paragraph now points to the script for adding the secrets. - **`CHANGELOG.md`:** the `[Unreleased]` entry now mentions the script. The 11 tests in `test/hostedUiReleaseDeploy.test.mjs` still pass. I didn't rebuild the docs site. I only added code spans and a code block, no new links. **Review of the script** The syntax check (`bash -n`) passes. I couldn't run the script itself because that would need admin access to the repository. Three things worth knowing: 1. **Re-running without `--reviewer` might remove an existing reviewer.** When the flag isn't passed, the script updates the environment without a reviewer list. I haven't checked whether GitHub keeps the existing required reviewers in that case or clears them. If you ever ran it with `--reviewer`, check the environment page after any later run without it. The docs only say that existing allowed-ref rules are kept, which the script does handle. 2. **`v*` is broader than the workflow's `v*.*.*` trigger.** This is harmless: only the release job uses this environment, and that job still only runs for `v*.*.*` tags or a manual release. 3. **Small cosmetic issues:** `--repo` or `--env` with no value fails with bash's "unbound variable" message instead of a usage error. `--help` prints the header with the leading `#` on each line. No previews, because nothing here is visible in the UI. PR: #3409 Comment by: @integry (ID: 6551054378) Model: Claude Opus 5.5
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationReady to merge within the visible scope, conditional on the pending Validate Changes check passing. The supplied status shows no failed checks. ✅ Correct release gating — Deployment depends on successful release publication and uses the release tag for both automatic and manual runs. ✅ Scoped credentials and recovery — Cloudflare credentials are confined to the deployment steps, missing credentials produce a clear notice, and failures include recovery guidance. ✅ Requested documentation included — The operations guide references the provisioning script and explains environment setup, verification, and manual deployment. This was a static review; no commands were run. The original issue text is explicitly truncated, so compliance with omitted requirements could not be assessed. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Bound individual verification requestsIn S2: 🟢 Clarify retained deployment policiesThe operations guide says the setup script “limits” access to ScoreThe implementation covers the visible objective with focused workflow and verifier tests, and the requested documentation follow-up is complete. No merge-blocking defect was established; deployment behavior was reviewed statically rather than exercised against Cloudflare. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
…sted-ui-release-20261101-1053-g99 [3417 by Claude Opus 5.5] Fix the hosted UI release deploy (app.propr.dev) added in #3409. Check current upstream main first.
AI Implementation Summary
Closes #3408
Branch:
3408/claude-opus-5-5-automate-the-hosted-ui-ap-20261031-2319-309Commits: ✅ Changes committed (de990f6)
AI Processing Completed
Execution Details:
Summary:
The release workflow now deploys app.propr.dev automatically after the GitHub release is published. Nothing was deployed, tagged or published; the job has only been checked offline, never run against Cloudflare. The branch was already at current upstream main (
043d9e122), so nothing needed rebasing.The new job is
deploy-hosted-uiin.github/workflows/docker-images.yml:publish-github-releasesucceeds, with the same condition, so it covers tag pushes and the manual release path. If an earlier release job fails or is skipped, the deploy is skipped too.hosted-ui-productionenvironment with read-only repo access. The two Cloudflare secrets are passed only to the credential-check step and the deploy step.package.jsonhas the released version, then runsnpm ci,npm run build -w propr-uiandwrangler deploy --config wrangler.hosted-ui.toml. Wrangler isn't in any lockfile, so CI pins it to[email protected].scripts/verify-hosted-ui-release.mjsreads the entry script thatindex.htmlactually loads and checks it contains the version string, e.g."0.9.0". It tries up to 6 times, 20 seconds apart. A real build produces twoindex-*.jsfiles and only the oneindex.htmlloads has the version, so guessing by filename wouldn't work.npm run deploy:hosted-uiis unchanged.Tests and lint
test/hostedUiReleaseDeploy.test.mjshas 11 tests and all pass. They cover the conditions you listed, the skip behaviour (by running the credential-check shell) and the retry logic. I confirmed the test fails if the token is added to another job.Docs and changelog: the new page is
docs/docs/operations/hosted-ui-release.md, added to the sidebar and linked fromdeployment.md. It covers creating the token and setting up the environment. The token needs only two permissions, per Cloudflare's Workers authorization docs and custom domains docs:propr.dev.It needs no DNS edit permission. I added an
[Unreleased]entry toCHANGELOG.md.Before the first automated release:
propr-hosted-uiWorker but can't create one. If the Worker is ever deleted, someone has to deploy it once by hand.hosted-ui-productiononly allowsv*.*.*tags, a manual release started frommainwill fail on the environment rule instead of skipping. The docs say to addmainif you start manual releases from there.There are no previews because nothing in this change shows up in the UI.
Detailed Logs:
bddd3443-c04d-40fc-ac36-51b625feb2c9Log files stored at:
/usr/src/app/logs/executions/issue-3408-2026-10-31T23-27-32-884Z-conversation.json/usr/src/app/logs/executions/issue-3408-2026-10-31T23-27-32-884Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3408.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!