Skip to content

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Aug 25, 2025

Description

^

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Summary by cubic

Use .is_(False) to filter out user files in get_connector_credential_pairs_for_user. This follows SQLAlchemy best practices and removes the linter suppression.

@Weves Weves requested a review from a team as a code owner August 25, 2025 00:50
Copy link

vercel bot commented Aug 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Aug 25, 2025 0:53am

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 Summary

This PR makes a small but meaningful improvement to SQL query consistency in the connector_credential_pair.py file. The change replaces a direct boolean comparison (!= True) with SQLAlchemy's .is_(False) method on line 148 when filtering out user files in the query.

The modification standardizes the codebase's approach to boolean comparisons in SQLAlchemy queries. While functionally equivalent, the .is_(False) method is more explicit about NULL handling - records where is_user_file is NULL will be included in the results, which is the intended behavior. This aligns with SQLAlchemy best practices and creates consistency with other parts of the codebase that already use the .is_() method (as seen on lines 657 and 659 in the same file).

The change affects the get_connector_credential_pairs_for_user function, which is a core database query function used throughout the application to retrieve connector-credential pairs while filtering out user files when include_user_files=False. This function is called by various parts of the system that need to work with connector configurations.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it's a syntactic improvement that maintains identical functionality
  • Score reflects that this is a straightforward refactoring to improve code consistency and follows SQLAlchemy best practices
  • No files require special attention as the change is isolated and well-understood

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

Copy link
Contributor

@Subash-Mohan Subash-Mohan left a comment

Choose a reason for hiding this comment

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

lgtm

@Subash-Mohan Subash-Mohan merged commit 1ed7aba into main Aug 25, 2025
12 of 18 checks passed
@Subash-Mohan Subash-Mohan deleted the hide-user-files branch August 25, 2025 02:37
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
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