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

Keep track of commands as they are executing, and afterwards #11

Closed
omame opened this issue Jan 30, 2018 · 4 comments
Closed

Keep track of commands as they are executing, and afterwards #11

omame opened this issue Jan 30, 2018 · 4 comments

Comments

@omame
Copy link

omame commented Jan 30, 2018

To allow checking what was executed when, and with which output, we should keep state of the executed commands, as they are started, and completed, and whenever a user wants to check the status.

This means that we need to add a set of builtin commands that enable to query commands like:

  • status: (with id) returns the commands that are in flight right now. (or something like that, I can't think of a better command, honestly)
  • status : returns the status of a command, status can be Running, Successful and Failed
  • output : returns the execution message from the command, such that it prints the stdout/err if the command succeded or failed.

Requirements

  • We will need to keep track of the commands in some form of persistence for the command metadata, the best for this is sqlite for simplicity.
  • We will need to keep track of the output of the commands, for this the best is simply the filesystem (as a first step) but they should be treated as a key/value store to allow future implementations to move these files to object storage.
  • These commands should be allowed to Any, but limiting to their own commands, meaning that if the command they want to check is not theirs it should be a not allowed violation, unless the requester is an admin.
@pcarranza
Copy link
Collaborator

I think this one is done

@omame
Copy link
Author

omame commented Jan 31, 2018

I think we're still missing the status for the commands that are currently in flight.

@pcarranza
Copy link
Collaborator

pcarranza commented Jan 31, 2018

Not really, you can check it with /last and /tail

If it's running you will get it in Running state, and you can tail the logs to get whatever was printed.

@omame
Copy link
Author

omame commented Feb 2, 2018

What I meant is in #13 and #15.
I think we can close this.

@omame omame closed this as completed Feb 2, 2018
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

No branches or pull requests

2 participants