Skip to content

test(sqla): add the jinja orderby calculated column to the session#42274

Merged
sadpandajoe merged 1 commit into
masterfrom
fix-jinja-orderby-test-session
Jul 21, 2026
Merged

test(sqla): add the jinja orderby calculated column to the session#42274
sadpandajoe merged 1 commit into
masterfrom
fix-jinja-orderby-test-session

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

Master CI is red on every Python-Integration DB variant since today: test_jinja_calculated_column_in_order_by fails with assert "'male'" in ' max(gender_cc_jinja) ASC;'.

Two PRs that were each green collided:

The fix is the same one-liner #42222 applied to the sibling test_calculated_column_in_order_by_base_engine_spec: register the column with the session explicitly via db.session.add(column).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A (test-only change)

TESTING INSTRUCTIONS

pytest tests/integration_tests/db_engine_specs/base_engine_spec_tests.py -k order_by — both order-by calculated-column tests pass; on current master the jinja one fails.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

#41870 added test_jinja_calculated_column_in_order_by, which builds a
TableColumn(table=table) and relies on backref cascading to keep it in
table.columns. #42222 (merged the same day, after #41870's CI ran) set
cascade_backrefs=False on that relationship, so the unadded column is
lost on expiry and the orderby falls back to the bare column name,
failing the test on every DB variant on master. Register the column
with the session explicitly, matching the sibling
test_calculated_column_in_order_by_base_engine_spec that #42222 itself
updated the same way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added the global:jinja Related to Jinja templating label Jul 21, 2026
@bito-code-review

bito-code-review Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #b12679

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: cc6a5e6..cc6a5e6
    • tests/integration_tests/db_engine_specs/base_engine_spec_tests.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.19%. Comparing base (00cb303) to head (cc6a5e6).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42274      +/-   ##
==========================================
+ Coverage   56.62%   65.19%   +8.56%     
==========================================
  Files        2775     2775              
  Lines      156816   156816              
  Branches    35852    35852              
==========================================
+ Hits        88798   102235   +13437     
+ Misses      67186    52613   -14573     
- Partials      832     1968    +1136     
Flag Coverage Δ
hive 38.69% <ø> (ø)
mysql 57.80% <ø> (?)
postgres 57.85% <ø> (?)
presto 40.62% <ø> (ø)
python 59.25% <ø> (+17.37%) ⬆️
sqlite 57.46% <ø> (?)
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sadpandajoe
sadpandajoe merged commit f9378ba into master Jul 21, 2026
66 checks passed
@sadpandajoe
sadpandajoe deleted the fix-jinja-orderby-test-session branch July 21, 2026 17:16
rusackas pushed a commit that referenced this pull request Jul 21, 2026
…42274)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rusackas pushed a commit that referenced this pull request Jul 21, 2026
…spec

Also retriggers CI so the merge ref picks up the master fix from #42274
(an empty commit does not trigger the path-gated workflows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rusackas pushed a commit that referenced this pull request Jul 21, 2026
…spec

Also retriggers CI so the merge ref picks up the master fix from #42274
(an empty commit does not trigger the path-gated workflows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rusackas pushed a commit that referenced this pull request Jul 23, 2026
…spec

Also retriggers CI so the merge ref picks up the master fix from #42274
(an empty commit does not trigger the path-gated workflows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

global:jinja Related to Jinja templating size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants