Skip to content

[dtq-dev-93] Wait until the instance answers before the UI tests - #1746

Open
Kasinhou wants to merge 1 commit into
dtq-dev-93from
93/fe-wait-for-instance
Open

Kasinhou wants to merge 1 commit into
dtq-dev-93from
93/fe-wait-for-instance

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Nov 19, 2026 •

Copy link
Copy Markdown

Problem description

Related: https://github.com/dataquest-dev/dspace-customers/issues/1024

deploy-8603 ends right after docker compose up -d, which returns as soon as the containers start. playwright-after-deploy8603 starts straight away, while DSpace is still booting, so the first specs fail on a UI that isn't loaded yet. This happened on dtq-dev-93 after the CI restore (#1736): the first two specs failed and the run had to be restarted by hand.

Analysis

deploy.yml on dtq-dev already waits until REST answers 200 at the end of the deploy. The newer deploy.yml on dtq-dev-93 and dtq-dev-767-base lost that wait.

A new last step in deploy-8603 polls http://dev-6.pc:8603/repository/server/api and then http://dev-6.pc:8603/repository/ every 10 s until both return 200. It has a 15-minute step timeout, so a deploy that never comes up fails here with a clear message instead of in the UI tests. Both URLs return 200 on the running instance today (checked with the same curl command).

Same change in both branches:

Problems

import-8603 already ends with fixed sleeps and is unchanged.

🤖 Generated with Claude Code

docker compose up -d returns as soon as the containers start, so the
Playwright run that follows the deploy hit an instance that was still
starting and its first specs failed. deploy-8603 now waits until the REST
API and the UI both return 200 (up to 15 minutes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical command-injection vulnerability remains in the deployment workflow because untrusted DEV_MACHINE input is embedded directly in a shell assignment executed on the self-hosted runner.

1 open issue
What changed in this PR

Adds a deployment readiness gate so dependent Playwright tests start only after the DSpace instance is ready.

Changes:

  • Polls the REST API and repository frontend until both return HTTP 200.
  • Limits the readiness check to 15 minutes before failing the deployment.
File Description
.github/​workflows/​deploy.yml Adds post-deployment HTTP readiness polling for the DSpace REST API and frontend before UI tests run.

Review effort: Lite

Comment on lines +200 to +203
- name: wait until the instance answers
timeout-minutes: 15
run: |
BASE_URL="http://${{ inputs.DEV_MACHINE }}.pc:$INSTANCE/repository"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants