You need hello-web Running with a health check on /healthz, from lab 5.1.4, on the Pro plan or above: rolling back isn't on Hobby.
Haven't done lab 5.1.4?
Deploy it:
csph deploy --image quay.io/computesphere/learn-hello-web:1.0.0 --name hello-web --port 8080
Then in the console open hello-web, go to Settings, choose Add health check, and set Endpoint path /healthz, Port 8080, Initial delay 5, Check interval 10. Choose Save, then Redeploy now.
The health check is what makes this lab work. Without it, the broken release passes and goes live.
Record a known-good version
csph deploy --image quay.io/computesphere/learn-hello-web:1.0.0 --name hello-web --port 8080A change that redeploys records a version. This step makes sure the version you'll come back to is the current one.
You should seecsph prints Running and your URL, or unchanged if this is already the current version.
Ship the broken release
csph deploy --image quay.io/computesphere/learn-hello-web-broken:1.0.0 --name hello-web --port 8080The new version gets about five minutes to pass its health check.
You should seecsph prints Running within seconds, while the new version is still starting.
Watch the old version keep serving
In a second terminal, while you wait:
curl -s -o /dev/null -w "%{http_code}\n" https://<your-hello-web-url>/Check yourself
You should see200 on every call; after about five minutes the deployment shows Failed.
Roll back
Open
hello-web. Under Recent deployments, choose Roll back next to the step 1 version, then Roll back to v….csph deployments rollback <deployment-id>Rolls back to the version before the failed one.
csph services list, thencsph deployments list --service <service-id>, shows the deployment ID.A rollback restores that version's image, build and start commands, port and health check. Variables stay as they are now. If Settings then shows no health check, your step 1 version predates it: add it again.
You should seeRunning again, with your step 1 version marked Current under Recent deployments.
Check your work
If this doesn't pass
Wait for the broken release to show Failed, about five minutes, before rolling back. If it never fails, the health check wasn't on /healthz: set it up and start again from step 1.
If this doesn't pass
Rolling back redeploys the old version, which takes about a minute. If it ends Failed, open that deployment's log.