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

Fix CLI to work with DataChain new listing #517

Merged
merged 22 commits into from
Oct 28, 2024

Conversation

ilongin
Copy link
Contributor

@ilongin ilongin commented Oct 17, 2024

This PR fixes all CLI methods to work with new listing of DataChain by using .from_storage() method.
Before, CLI was completely detached which means if you would do datachain index, listing created by that command would be invisible by DataChain lib, and vice versa.
Now, those are again "one" system.

Note: that this PR removes custom TTL set for listings to expire as we from now on don't utilize Storage table any more where we had ability to save this. Instead, we will always use constant TTL time. If this doesn't seem enough, we can think about where to put this and maybe take into account some alternatives (maybe having some global config etc.)

Followups:

@ilongin ilongin marked this pull request as draft October 17, 2024 23:04
Copy link

cloudflare-workers-and-pages bot commented Oct 17, 2024

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 620107d
Status: ✅  Deploy successful!
Preview URL: https://bd29bab3.datachain-documentation.pages.dev
Branch Preview URL: https://ilongin-318-use-datachain-li.datachain-documentation.pages.dev

View logs

@ilongin ilongin linked an issue Oct 17, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 91.47287% with 11 lines in your changes missing coverage. Please review.

Project coverage is 86.92%. Comparing base (34e7c2b) to head (620107d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/datachain/data_storage/warehouse.py 85.71% 6 Missing ⚠️
src/datachain/lib/dc.py 88.00% 3 Missing ⚠️
src/datachain/data_storage/sqlite.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #517      +/-   ##
==========================================
- Coverage   87.39%   86.92%   -0.48%     
==========================================
  Files          97       97              
  Lines       10197    10130      -67     
  Branches     1396     1383      -13     
==========================================
- Hits         8912     8805     -107     
- Misses        923      961      +38     
- Partials      362      364       +2     
Flag Coverage Δ
datachain 86.86% <91.47%> (-0.48%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ilongin ilongin force-pushed the ilongin/318-use-datachain-listing-in-cli branch from 2339227 to 8138cd5 Compare October 23, 2024 14:25
@ilongin ilongin marked this pull request as ready for review October 23, 2024 23:06
@ilongin ilongin requested a review from a team October 23, 2024 23:06
@amritghimire
Copy link
Contributor

LGTM as long as it is tested

@ilongin ilongin merged commit 0eabe20 into main Oct 28, 2024
38 checks passed
@ilongin ilongin deleted the ilongin/318-use-datachain-listing-in-cli branch October 28, 2024 08:43
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.

Replace deprecated listing / indexing with new DataChain.from_storage()
2 participants