Skip to content
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

solving issue #1355 - Mixed dependencies in the Storage Clients module for the Data Layer #1363

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ndricca
Copy link

@ndricca ndricca commented Sep 21, 2024

PR to handle issue #1355

I have added also a pytest for S3StorageClient and moto to mock aws connection. I am not so experienced with Azure so I did not add a test on it.

@hadarsharon
Copy link

Thanks for implementing this @ndricca 🥇

jl1andricca added 2 commits September 21, 2024 13:43
…nto 1355--mixed-data-storage-deps

# Conflicts:
#	backend/chainlit/data/sql_alchemy.py
#	backend/tests/data/test_sql_alchemy.py
@ndricca
Copy link
Author

ndricca commented Sep 21, 2024

i noticed that @dokterbob said

I imagine storage_clients module in the data module with a base.py and files for each implementation

while I was still using the base.py from parent folder, so i splitted also this script moving the base method into storage_clients submodule

@dokterbob
Copy link
Collaborator

Can't wait to review this (prolly around Wednesday in the coming week), unless @willydouhard beats me to it!

@ndricca
Copy link
Author

ndricca commented Sep 21, 2024

@dokterbob am i suppose to push also the poetry.lock file? I see fails refer to this. I ran all poetry tests in local and they worked

@gsornsen
Copy link

Oh, nice! Looking forward to trying this out and dropping the need for a supervisor to start up moto-server and create a local s3 bucket in my current implementation.

@dokterbob
Copy link
Collaborator

@dokterbob am i suppose to push also the poetry.lock file? I see fails refer to this. I ran all poetry tests in local and they worked

We use the lockfile to make sure we're all dev'ing in exactly the same environment, creating more reproducible results.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 23, 2024
@ndricca
Copy link
Author

ndricca commented Sep 23, 2024

@dokterbob am i suppose to push also the poetry.lock file? I see fails refer to this. I ran all poetry tests in local and they worked

We use the lockfile to make sure we're all dev'ing in exactly the same environment, creating more reproducible results.

I have merged incoming commits from main and pushed poetry.lock, now it should work

@dokterbob dokterbob added the evaluate-with-priority What's needed to address this one? label Sep 24, 2024
Copy link
Collaborator

@dokterbob dokterbob left a comment

Choose a reason for hiding this comment

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

Good stuff! Looking forward to have this in, just some minor changes about file layout.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please rename from azure_storage_client to simply azure - the import path already is sufficiently clear. If in code more clarity is needed one can always use aliased imports.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same, please rename to merely s3.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, follow the same import path pattern in test layout. So /data/storage_clients/test_s3.py.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It doesn't seem changes to this file are relevant to this PR. Things like these can easily create merge conflicts!

Please git checkout main -- backend/tests/data/test_sql_alchemy.py this one. :)

Copy link
Author

Choose a reason for hiding this comment

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

i did this, than changed other things and pushed but i see that this file is still here 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you do git mv?

Copy link
Author

Choose a reason for hiding this comment

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

no, can you please tell me what do you want me to do? a git revert to exclude it? please tell me the proper commands, i don't want to make noise in the repo.

moreover, i have also updated cypress/e2e/custom_data_layer/sql_alchemy.py since it uses the AzureStorageClient, is that ok or not?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you do git mv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluate-with-priority What's needed to address this one? size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants