Skip to content

Conversation

@DoctorJohn
Copy link
Member

@DoctorJohn DoctorJohn commented Oct 7, 2025

Description

This PR fixes that the e2e workflow still tried to use the deprecated strawberry server command.

(my bad, rg didn't include hidden files when I searched for "strawberry server")

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Summary by Sourcery

Fix E2E test workflow to use the current Strawberry dev server command and correct installation extras

Bug Fixes:

  • Replace deprecated strawberry server invocation with strawberry dev in the e2e workflow
  • Update Poetry install extras from debug-server to cli for the E2E environment

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 7, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This 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

Change Details Files
Switch from deprecated start command to new dev command
  • Replace ‘strawberry server’ invocation with ‘strawberry dev’
  • Ensure the server is started in the background with the updated command
.github/workflows/e2e-tests.yml
Update Poetry extras for dev server installation
  • Change installed extra from ‘debug-server’ to ‘cli’ to match new dev workflow
.github/workflows/e2e-tests.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@DoctorJohn DoctorJohn force-pushed the fix-e2e-tests-workflow branch from 2bb96ac to 869ded2 Compare October 7, 2025 00:07
@DoctorJohn DoctorJohn marked this pull request as ready for review October 7, 2025 00:11
@DoctorJohn DoctorJohn requested a review from patrick91 October 7, 2025 00:11
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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-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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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:

  1. Poetry extra dependency: Changed from debug-server to cli extra when installing dependencies
  2. CLI command: Replaced the deprecated strawberry server command with the current strawberry dev command

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"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@patrick91 patrick91 merged commit add26a6 into strawberry-graphql:main Oct 7, 2025
6 checks passed
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