-
-
Couldn't load subscription status.
- Fork 595
Fix e2e tests used deprecated dev server command #4013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix e2e tests used deprecated dev server command #4013
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the e2e-tests GitHub Actions workflow by replacing the deprecated ‘strawberry server’ command with ‘strawberry dev’ and correcting the Poetry extras to ensure the dev server is installed before running tests. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
2bb96ac to
869ded2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Double-check that the poetry extras flag matches what’s actually defined in pyproject.toml (the description mentions
dev-serverbut the diff usescli). - Instead of a fixed
sleep, consider polling the server endpoint to wait for readiness and avoid arbitrary delays. - Include a teardown step to kill the background server process (using the saved PID) to prevent orphaned processes after the workflow runs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Double-check that the poetry extras flag matches what’s actually defined in pyproject.toml (the description mentions `dev-server` but the diff uses `cli`).
- Instead of a fixed `sleep`, consider polling the server endpoint to wait for readiness and avoid arbitrary delays.
- Include a teardown step to kill the background server process (using the saved PID) to prevent orphaned processes after the workflow runs.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR fixes a critical bug in the e2e-tests GitHub Actions workflow that was preventing the end-to-end tests from running properly. The workflow was using deprecated CLI commands that were causing failures.The changes update two key aspects of the workflow configuration:
- Poetry extra dependency: Changed from
debug-servertocliextra when installing dependencies - CLI command: Replaced the deprecated
strawberry servercommand with the currentstrawberry devcommand
These changes align the e2e workflow with the current Strawberry CLI structure. The strawberry server command was deprecated and now exits with an error message directing users to use strawberry dev instead. The cli extra in the pyproject.toml contains all necessary dependencies for running the development server, including starlette, uvicorn, typer, and other required packages. This ensures the e2e tests can successfully start the GraphQL server for testing frontend integration scenarios.
PR Description Notes:
- There's a discrepancy between the PR body summary (mentions 'dev-server' extra) and the actual change (uses 'cli' extra)
Important Files Changed
Changed Files
| Filename | Score | Overview |
|---|---|---|
.github/workflows/e2e-tests.yml |
5/5 | Updates deprecated CLI command and poetry extra to fix broken e2e workflow |
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it fixes broken CI functionality
- Score reflects straightforward bug fix with clear necessity and no complex logic changes
- No files require special attention - the change is simple and well-understood
Sequence Diagram
sequenceDiagram
participant User
participant "GitHub Actions" as GHA
participant "Bun Runtime" as Bun
participant "Python/Poetry" as Python
participant "Strawberry Server" as Server
participant "Playwright" as PW
participant "GraphQL Endpoint" as GQL
User->>GHA: "Push to main or PR with e2e changes"
GHA->>GHA: "Checkout repository code"
GHA->>Bun: "Setup Bun runtime"
GHA->>Bun: "Install JavaScript dependencies"
Bun->>Bun: "Download and install packages"
GHA->>PW: "Install Playwright browsers"
PW->>PW: "Download browser binaries with dependencies"
GHA->>Python: "Setup Python 3.12"
GHA->>Python: "Install Poetry package manager"
GHA->>Python: "Install Python dependencies with CLI extras"
Python->>Python: "Install graphql-core==3.3.0a9"
GHA->>Server: "Start Strawberry dev server on port 8000"
Server->>GQL: "Initialize GraphQL endpoint at /graphql"
GHA->>GQL: "Health check: curl GraphQL endpoint"
GQL->>GHA: "Return 200 OK response"
GHA->>PW: "Run Playwright test suite"
PW->>GQL: "Execute GraphQL queries and mutations"
GQL->>PW: "Return GraphQL responses"
PW->>GHA: "Generate test results and reports"
GHA->>GHA: "Upload Playwright report artifacts"
1 file reviewed, no comments
Description
This PR fixes that the e2e workflow still tried to use the deprecated strawberry server command.
(my bad,
rgdidn't include hidden files when I searched for "strawberry server")Types of Changes
Summary by Sourcery
Fix E2E test workflow to use the current Strawberry dev server command and correct installation extras
Bug Fixes:
strawberry serverinvocation withstrawberry devin the e2e workflowdebug-servertoclifor the E2E environment