Skip to content

chore: Remove compile-time checks of sqlx queries#959

Merged
spencewenski merged 3 commits intomainfrom
disable-sqlx-comp-time
Mar 4, 2026
Merged

chore: Remove compile-time checks of sqlx queries#959
spencewenski merged 3 commits intomainfrom
disable-sqlx-comp-time

Conversation

@spencewenski
Copy link
Member

@spencewenski spencewenski commented Mar 4, 2026

Because the sqlx queries we perform rely on pgmq being installed, they will fail at compile time for a first-run of the app unless the consumer sets the SQLX_OFFLINE=true environment variable. This may not be desirable -- the consumer may want to use sqlx's compile-time checks for the rest of their application.

This PR removes the compile-time checks from roadster to resolve this. This is not super ideal as now we do not have compile-time checks of these queries. However, we only have two sqlx queries currently, so if we need to modify them we could temporarily re-add compile-time checks while writing the queries, then remove them again before merging.

See similar PR in the pgmq crate: pgmq/pgmq#463

Because the sqlx queries we perform rely on pgmq being installed, they
will fail at compile time for a first-run of the app unless the
consumer sets the `SQLX_OFFLINE=true` environment variable. This may not
be desirable -- the consumer may want to use sqlx's compile-time checks
for the rest of their application.

This PR removes the compile-time checks from roadster to resolve this.
This is not super ideal as now we do not have compile-time checks of
these queries. However, we only have two sqlx queries currently, so if
we need to modify them we could temporarily re-add compile-time
checks while writing the queries, then remove them again before merging.
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.07%. Comparing base (0b33280) to head (bdfab3e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/worker/backend/pg/processor/mod.rs 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/worker/backend/pg/processor/mod.rs 2.81% <0.00%> (-0.02%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b33280...bdfab3e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spencewenski spencewenski merged commit 801b5a4 into main Mar 4, 2026
30 of 31 checks passed
@spencewenski spencewenski deleted the disable-sqlx-comp-time branch March 4, 2026 09:04
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.

1 participant