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

Client command list #202

Open
11 of 46 tasks
ketiltrout opened this issue Oct 31, 2024 · 2 comments
Open
11 of 46 tasks

Client command list #202

ketiltrout opened this issue Oct 31, 2024 · 2 comments
Assignees
Labels
cli Issues relating to the alpenhorn CLI investigate This issue needs further investigation question ux User experience improvements.

Comments

@ketiltrout
Copy link
Member

ketiltrout commented Oct 31, 2024

A proposal for the client command list, to see what we need. Per #122, we will stick to <noun> <verb>:

@ketiltrout ketiltrout added question investigate This issue needs further investigation cli Issues relating to the alpenhorn CLI labels Oct 31, 2024
@ketiltrout ketiltrout self-assigned this Oct 31, 2024
@ketiltrout ketiltrout added the ux User experience improvements. label Oct 31, 2024
@tjrennie
Copy link

tjrennie commented Nov 1, 2024

This looks like a complete list of commands, but I'd like to see a way of seeing the last n transfers that were cancelled or ignored as well as the last n transfers that were run (which i assume is action list) . - You mentioned this was more server metrics but it would be useful regardless

@ketiltrout
Copy link
Member Author

I've added a transfer list command which I think might do what you want, with the right set of filtering options

ketiltrout added a commit that referenced this issue Nov 4, 2024
Here's a start on getting the client working, which I've done to try to
gauge how much work it will entail. This PR updates and re-implements
command in the `group` command group, which manipulates StorageGroups.
(I think this is the easiest command group to do.)

## Test suite
This PR also re-engineers how the client is run in the test-suite.
There's now a `client` fixture that runs the client via
`click.testing.CliRunner` and performs rudimentary checks on the result.
This abstracts a lot of the routine rigamarole of running the CLI via
pytest, meaning the tests themselves can be relatively simple.

This system uses the same kind of persistent in-memory Sqlite database
that I used for the server end-to-end test to make it possible for the
client process and the test suite itself to access the same ephemeral
database.

## Client
Common command options (of which there are many) are being collected in
`client.options` along with common code to process them.

### Commands
(per the list in #202):

* `create` lets you set I/O class and I/O config. There is no vetting of
the I/O config data based on what the I/O class needs (see discussion in
#165). I think it's best to punt that downfield and worry about it in
the future.
* `list` is pretty simple. Shows I/O class but not I/O config, because I
don't think it fits very well in the tabular format, but I could be
convinced otherwise.
* `modify` has the same comments about I/O config vetting as `create`.
It can also fix broken JSON in the database.
* `rename` trivial
* `show` definitely willing to take suggestions on formatting here, as
well as what StorageNode columns should be presented with
`--node-details`. `--node-stats` is for showing counts/sizes of files
(see the `node stats` command in #202) and will be implemented when
`node stats` is implemented.

## Also
Fixed `common.logger.echo` which was broken from the start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues relating to the alpenhorn CLI investigate This issue needs further investigation question ux User experience improvements.
Projects
None yet
Development

No branches or pull requests

2 participants