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

[Draft] Icechunk CLI Design Document #714

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

DahnJ
Copy link
Contributor

@DahnJ DahnJ commented Feb 10, 2025

Icechunk CLI Design Document

Design document for #461

Written as a design document, but this is just a proposal – feel free to disagree and offer alternatives.

TODOs

The configuration section is underdeveloped and the next part I will work on.


Here is a list of tasks a user might want to do with Icechunk:

- List my repositories
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What should this list? Probably all repositories in the repositories config?

It would also be great to be able to point at a location and auto-discover repos.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto discover would be cool... seems like an advanced feature we may not need for a while.

- Create a new repository
- Check configuration
- Diff between two commits
- Invoke administrative tasks (garbage collection, compaction, etc)
Copy link
Contributor Author

@DahnJ DahnJ Feb 10, 2025

Choose a reason for hiding this comment

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

This is not yet reflected in the current Interface section. Detailed API is out of scope, but it might be useful to think about this to see if the proposed command structure works.

Copy link
Collaborator

@paraseba paraseba left a comment

Choose a reason for hiding this comment

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

This looks great Daniel!

I suppose we should start with the skeleton, to test the binary parts and the interaction rust-python. I'd peek whatever is the simplest action and implement that one. Maybe initially without the config file parts?


Here is a list of tasks a user might want to do with Icechunk:

- List my repositories
Copy link
Collaborator

Choose a reason for hiding this comment

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

Listing repositories is something Icechunk cannot do today. It can only verify if a repository exists at a given location.

We don't expect to add this functionality, we tend to see anything that is outside the repo prefix as "unknown" to Icechunk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about listing the repositories defined in the proposed repo config?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

- Create a new repository
- Check configuration
- Diff between two commits
- Invoke administrative tasks (garbage collection, compaction, etc)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd add:

  • Print the zarr hierarchy
  • Get repo statistics, example: getsize
  • Fetch metadata for a node
  • Update node user attributes?
  • One day search metadata (IC cannot do this today)
  • In the future we could include "export" functionality, like "export array foo to a zarr store"


Here is a list of tasks a user might want to do with Icechunk:

- List my repositories
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto discover would be cool... seems like an advanced feature we may not need for a while.

icechunk snapshot diff <repo> <snapshot_id_1> <snapshot_id_2>
icechunk ref list <repo>

icechunk config init # init: interactive setup
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice! interactive could be very usefu

@DahnJ
Copy link
Contributor Author

DahnJ commented Feb 11, 2025

I suppose we should start with the skeleton, to test the binary parts and the interaction rust-python. I'd peek whatever is the simplest action and implement that one. Maybe initially without the config file parts?

Thanks for the feedback! Here's the skeleton I used when I was exploring the Python integration: #716

@DahnJ
Copy link
Contributor Author

DahnJ commented Feb 14, 2025

The ultimate goal is K9s-like interface in ratatui. Not writing that into the design doc though 😀

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.

2 participants