Skip to content

Remove unnecessary uses_transaction from order clause and resource specs#8962

Merged
tagliala merged 2 commits intobugfix/8881-permanent-connection-cherrypickfrom
copilot/sub-pr-8883
Mar 6, 2026
Merged

Remove unnecessary uses_transaction from order clause and resource specs#8962
tagliala merged 2 commits intobugfix/8881-permanent-connection-cherrypickfrom
copilot/sub-pr-8883

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

uses_transaction was added alongside the with_connection migration but is not actually needed. with_connection works correctly within transactional tests — it safely reuses the thread's existing checked-out connection. quote_column_name is a pure string operation with no DB I/O, so there's no reason to opt out of the transaction wrapper.

Changes

  • spec/unit/order_clause_spec.rb: Remove uses_transaction "#to_sql prepends table name" and its comment
  • spec/unit/resource_spec.rb: Remove uses_transaction "should return quote argument" and its comment

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

The uses_transaction calls were added alongside with_connection in
resource_quoted_column_name, but are not needed because:

- with_connection is designed to work correctly within transactional tests
- quote_column_name is a pure string operation with no DB writes
- No special transaction handling is required for these tests

Co-authored-by: tagliala <[email protected]>
Copilot AI changed the title [WIP] Update legacy connection drop PR to address review feedback Remove unnecessary uses_transaction from order clause and resource specs Mar 6, 2026
@tagliala tagliala marked this pull request as ready for review March 6, 2026 23:04
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (ef44a98) to head (db32532).
⚠️ Report is 4 commits behind head on bugfix/8881-permanent-connection-cherrypick.

Additional details and impacted files
@@                             Coverage Diff                              @@
##           bugfix/8881-permanent-connection-cherrypick    #8962   +/-   ##
============================================================================
  Coverage                                        99.08%   99.08%           
============================================================================
  Files                                              139      139           
  Lines                                             4046     4046           
============================================================================
  Hits                                              4009     4009           
  Misses                                              37       37           

☔ View full report in Codecov by Sentry.
📢 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.

@tagliala tagliala merged commit b009716 into bugfix/8881-permanent-connection-cherrypick Mar 6, 2026
26 checks passed
@tagliala tagliala deleted the copilot/sub-pr-8883 branch March 6, 2026 23:12
tagliala added a commit that referenced this pull request Mar 6, 2026
…specs (#8962)

* Initial plan

* Remove unnecessary uses_transaction annotations from specs

The uses_transaction calls were added alongside with_connection in
resource_quoted_column_name, but are not needed because:

- with_connection is designed to work correctly within transactional tests
- quote_column_name is a pure string operation with no DB writes
- No special transaction handling is required for these tests

Co-authored-by: tagliala <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: tagliala <[email protected]>
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