-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Feature/salesforce correctness 2 #4506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ure/salesforce-correctness-2 # Conflicts: # backend/onyx/connectors/salesforce/connector.py # backend/onyx/connectors/salesforce/salesforce_calls.py # backend/onyx/connectors/salesforce/sqlite_functions.py
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances the Salesforce connector by improving time filtering logic and object type handling for better data synchronization.
- Changed
fetch_all_csvs_in_parallel
insalesforce_calls.py
to use a dictionary parameter that explicitly maps object types to filtering preferences - Added new
_get_all_types
static method inconnector.py
to better separate concerns when collecting Salesforce object types - Implemented smarter time filtering that only applies filters to object types already present in the database
- Removed commented-out code in
sqlite_functions.py
for better code cleanliness - Improved CSV information logging with detailed statistics about downloaded files
3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
…ure/salesforce-correctness-2
because this occurs after we check for existing csvs which covers this case""" | ||
all_types_to_filter: dict[str, bool] = {} | ||
for sf_type in all_types: | ||
if sf_db.has_at_least_one_object_of_type(sf_type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slight preference for
all_types_to_filter[sf_type] = sf_db.has_at_least_one_object_of_type(sf_type)
* refactor salesforce sqlite db access * more refactoring * refactor again * refactor again * rename object * add finalizer to ensure db connection is always closed * avoid unnecessarily nesting connections and commit regularly when possible * remove db usage from csv download * dead code * hide deprecation warning in ddtrace * remove unused param --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* refactor salesforce sqlite db access * more refactoring * refactor again * refactor again * rename object * add finalizer to ensure db connection is always closed * avoid unnecessarily nesting connections and commit regularly when possible * remove db usage from csv download * dead code * hide deprecation warning in ddtrace * remove unused param --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Description
Refs https://linear.app/danswer/issue/DAN-1791/salesforce-correctness
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.