Open
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="backend/chainlit/data/sql_alchemy.py">
<violation number="1" location="backend/chainlit/data/sql_alchemy.py:615">
P2: `autoPlay` is read from a non-existent attribute on `Element`, so auto-play settings are always saved as NULL. Use the `element_dict` (or `element.auto_play`) instead.</violation>
<violation number="2" location="backend/chainlit/data/sql_alchemy.py:616">
P2: `playerConfig` is read from a non-existent attribute on `Element`, so video player configuration never persists. Use the `element_dict` (or `element.player_config`) instead.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
|
Hey @hayescode, is this pull request going to fix the issue that I reported? #2758 |
Contributor
|
If we are currently using the official @data_layer
def get_data_layer():
return ChainlitDataLayer(
database_url=DATABASE_URL,
storage_client=AzureBlobStorageClient(
container_name=DATALAYER_AZURE_BLOB_CONTAINER_NAME,
storage_account=DATALAYER_AZURE_BLOB_STORAGE_ACCOUNT_NAME,
storage_key=DATALAYER_AZURE_BLOB_STORAGE_ACCOUNT_KEY
)
)should we migrate to this SQLAlchemy data layer? And if so, is there a direct way? PS: Is this datalayer still maintained https://github.com/Chainlit/chainlit-datalayer? |
Contributor
Author
|
That data layer is not maintained. The goal here is to consolidate the mess of data layers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor SQLAlchemyDataLayer to use ORM
Summary
Refactors sql_alchemy.py from raw SQL queries to SQLAlchemy ORM, improving maintainability and adding multi-dialect database support.
Benefits
create_tables=Trueparameter auto-creates tables on first useWhat's New
Migration
No breaking changes - the public API remains identical.
Optional: Users can now enable automatic table creation:
Summary by cubic
Refactors SQLAlchemyDataLayer to use SQLAlchemy ORM, adding multi-dialect support and optional automatic table creation. Improves maintainability and type safety, keeps the public API unchanged, and simplifies tests.
New Features
Refactors
Written for commit 469274c. Summary will update on new commits.