Skip to content

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented May 28, 2025

This PR removes usage of the turbo column to get a space turbo status, and will rely entirely on the turbo_expiration column as the unique source of truth for a space's turbo status

@wa0x6e wa0x6e requested a review from Copilot May 28, 2025 07:45
@wa0x6e wa0x6e marked this pull request as ready for review May 28, 2025 07:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the legacy turbo column and flag, relying entirely on turbo_expiration as the source of truth for a space’s turbo status.

  • Deletes turbo from fixtures, schema, queries, and mappings
  • Simplifies isTurbo helper, updates metrics collection logic, and refactors GraphQL operations
  • Adjusts tests to drop turbo, fix async assertions, and add a turbo-expiration scenario

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/fixtures/spaces.ts Removed deprecated turbo property from fixtures
test/e2e/space.test.ts Dropped turbo in tests, corrected missing matcher on status, added turbo scenario
src/helpers/spaces.ts Simplified isTurbo signature and removed turbo from SQL/query mapping
src/helpers/schema.sql Dropped turbo column and its index
src/helpers/metrics.ts Replaced turbo count with turbo_expiration, refactored async loop
src/graphql/operations/* Removed spaces.turbo field from all GraphQL queries
src/graphql/helpers.ts Updated formatting helpers to compute turbo from turboExpiration
Comments suppressed due to low confidence (1)

test/e2e/space.test.ts:29

  • This assertion is missing a matcher and doesn't actually validate the status code. Consider using something like expect(response.status).toBe(200) to verify the expected HTTP status.
expect(response.status);

@wa0x6e wa0x6e force-pushed the fix-remove-turbo-column branch from 25b832d to 431e256 Compare May 28, 2025 08:06
@wa0x6e wa0x6e force-pushed the fix-remove-turbo-column branch from 20bbf0e to 70020d4 Compare May 28, 2025 08:13
@wa0x6e wa0x6e requested a review from bonustrack May 28, 2025 08:15
@ChaituVR
Copy link
Member

We updated turbo_expiration for all turbo spaces already?

@wa0x6e
Copy link
Contributor Author

wa0x6e commented May 30, 2025

We updated turbo_expiration for all turbo spaces already?

Done for most of them, still a few remaining.

This PR should be merge only once @bonustrack confirmed that it's done, then if everything working, we could delete the turbo column in the database in a second time

@ChaituVR ChaituVR self-requested a review May 30, 2025 17:01
@bonustrack
Copy link
Member

Not all the space are updated, we still miss the spaces who got free turbo because of their network plan. Will update here once its done

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.

3 participants