-
Notifications
You must be signed in to change notification settings - Fork 257
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
[Improvement]: Head and tail args for the log command #1600
Comments
is anyone is working in the issue |
@biplab5464 All yours. Thanks for showing interest. |
can you give me little hint where to start |
You can either start by adding the arguments in cargo-shuttle/src/args, and passing them into the functions that eventually call the log endpoints, or you can start by adding query parameters to deployer's two log endpoints, and pass them on to the gRPC call to logger (requires updating the logger's proto file and regenerating the proto code). |
--head --tail --all are all optional value right |
Yes |
currently -h use for help so we have to give some other short name to the head
|
Hmm, yeah then we can probably skip the short args for now. |
hey, can you help me, i have added the argument in the function but i am unable to understand how the log is getting fetch and how can get log of specific head and tail and can you please review the above code tell me if it need any change |
The argument definitions are looking good. The parsing to make the arguments mutually exclusive can instead be accomplished with the clap macros. You can ask in the contributors channel in our discord if you want more help. |
i will use clap macros for mutual exclusion |
…d tail args for the log command shuttle-hq#1600
It's merged, we can close it ? #1629 |
Describe the improvement
A deployment can produce many thousands of log lines, and
cargo shuttle log
fetches them all. This can produce very big responses when only a fraction of the log lines are needed.Add
--head N
and--tail N
args to the log command for getting the first or last N lines. The default behaviour should be to get the last 1000 rows.An additional flag
--all
can also be added, which keeps the current behaviour by disabling the default tail value and not setting any query parameter.Short flags
-h
,-t
and-a
can also be added.The steps required include:
This issue is open to contribution. Comment if you want to work on it. Feel free to ask for help and guidance here or in our Discord.
The text was updated successfully, but these errors were encountered: