* Update mode to be a default parameter in `FileStore.read`
* Move query history exporting process to be a background job instead
* Move hardcoded report-file-naming to a common utility function
* Add type annotations
* Update download component
* Implement button to re-ping and download CSV file; fix up some backend file-checking logic
* De-indent logic (w/ early return)
* Return different error codes dependings on the type of task status
* Add more resistant failure retrying mechanisms
* Remove default parameter in helper function
* Use popup for error messaging
* Update return code
* Update web/src/app/ee/admin/performance/query-history/DownloadAsCSV.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Add type to useState call
* Update backend/ee/onyx/server/query_history/api.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/onyx/file_store/file_store.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update backend/ee/onyx/background/celery/apps/primary.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Move rerender call to after check
* Run formatter
* Add type conversions back (smh greptile)
* Remove duplicated call to save_file
* Move non-fallible logic out of try-except block
* Pass date-ranges into API call
* Convert to ISO strings before passing it into the API call
* Add API to list all tasks
* Create new pydantic model to represent tasks to return instead
* Change helper to only fetch query-history tasks
* Use `shared_tasks` instead of old method
* Address more comments from PR; consolidate how task name is generated
* Mark task as failed if any exception is raised
* Change the task object which is returned back to the FE
* Add a table to display previously generated query-history-csv's
* Add timestamps to task; delete tasks as soon as file finishes processing
* Raise exception if start_time is not present
* Convert hard-coded string to constant
* Add "Generated At" field to table
* Return task list in sorted order (based off of start-time)
* Implement pagination
* Remove unused props and cleanup tailwind classes
* Change the name of kickoff button
* Redesign how previous query exports are viewed
* Make button a constant width even when contents change
* Remove timezone information before comparing
* Decrease interval time for re-pinging API
* Add timezone to start-time creation
* Add a refreshInterval for getting updated task status
* Add new background queue
* Edit small verbiage and remove error popup when max-retries is hit
* Change up heavy worker to recognize new task in new module
* Ensure `celery_app` is imported
* Change how `celery_app` is imported and defined
* Update comment on why `celery_app` must be imported
* Add basic skeleton for new beat task to cleanup any dead / failed query-history-export tasks
* Move cleanup task to different worker / queue
* Implement cleanup task
* Add return type
* Address comment on PR
* Remove delimiter from prefix
* Change name of function to be more descriptive
* Remove delimiter from prefix constant
* Move function invocation closer to usage location
* Move imports to top of file
* Move variable up a scope due to undefined error
* Remove dangling if-statement
* Make function more pure-functional
* Remove redefinition
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* it will never happen again.
* fix perm sync issue
* fix perm sync issue2
* ensure member emails map is populated
* other fix for perm sync
* address CW comments
* nit
* don't log all channels
* print number of channels
* sanitize indexing exception messages
* harden vespa index swap
* use constants and fix list generation
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* memory optimize task generation for connector deletion
* test
* fix up integration test docker file
* more no-cache
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
- created env variable AGENT_ALLOW_REFINEMENT with default "". Must be set to true to enable Refinement.
- added an environment variable for the upper limit of docs that can be sent to verification
* don't hardcode -1
* extra spaces
* fix binary data in blurb
* add note to binary handling
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
* tolerance of confluence api weirdness
* remove checkpointing
* remove skipping logic from checkpointing
* add back checkpointing
* switch confluence checkpointing to be based on page starts
* address CW comments and fix unit tests
* some mitigations of bad confluence api
* new checkpointing approach and testing fixes
* fix test
* CW comments
* Fix migration
* Fix migration to take care of various nullability cases
* Address comments on PR
* Rename variables to be more descriptive
* Make helpers private
* Fix select statement
* Add comments to explain the involved logic
* Saving changes
* Finish script to revalidate `display_model_names`
* Address comments on PR by greptile
* Add missing columns
* Pull difference operator out into binding
* Add deletion prior to re-insertion
* Use map from shared llm-provider file instead
* Use helper function instead of copying code
* Remove delete and convert into an update statement
* Use pydantic for ModelConfigurations
* Update to do nothing on-conflict rather than update
* Address nits on PR
* Add default visible model(s) for bedrock
* Perform an update on conflict instead of doing nothing
* Fix migration
* Fix migration to take care of various nullability cases
* Address comments on PR
* Rename variables to be more descriptive
* Make helpers private
* Fix select statement
* Add comments to explain the involved logic
* Add helpers for viewing visible model names
* Fix logic for missing model + display-model names in migration
* 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>
* debug script + slight refactor of db class
* better comments
* move setup logger
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
Co-authored-by: Richard Kuo <rkuo@rkuo.com>
* friendlier handling of slack channel retrieval
* retry on downgrade_postgres deadlock
* fix comment
* text
---------
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>