-
Notifications
You must be signed in to change notification settings - Fork 2.2k
cmd/wtclient: Enhance help text for session and terminate subcommands #9765
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
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Hi!, guys! I saw in the contribution guidelines that commits should be squashed before merging. If the PR is good to go, would you mind squashing the commits on your end during the merge? I’d really appreciate it. |
@gap-editor - is this perhaps a duplicate of #9588?
The PR author is expected to get the commits in the correct structure before merge. Commented the same on the duplicate pr: commit naming conventions must please be followed as per our guidelines |
98f2791
to
3404f6a
Compare
@ellemouton do i need to squash commits? |
Fixup commits or commits that don't make logical sense on their own should be squashed. But generally changes should be committed in small logical units (commits). What @ellemouton was hinting at was the commit messages themselves. |
I have changed commit messages already so based on what you wrote, I don't see the point in doing squash commits because, de facto, one commit is for code changes and the other is for changes in the release note. If you think differently, let me know, and I will listen and do it the right way. |
Hey @gap-editor, Thanks for your contribution! It looks like there something missed regards the git commit message. What @ellemouton was hinting specifically in the commit message is package prefixes and may be other nuances here in the contribution guidelines: Your commits could be structured like: You could observe the merged git commits here and gaining some insights about structure of git commits: Also, it appears PR #9588 addresses the same issue and submitted prior to yours. Consider collaborating with that author for example using the |
cmd/commands/wtclient.go
Outdated
ArgsUsage: "id", | ||
Usage: "Terminate a watchtower client session.", | ||
Description: "Terminate an active session with the watchtower client by ID.", | ||
ArgsUsage: "session_id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this change is necessary. Users already run lncli wtclient session terminate <id>
and can tell it's a session-related ID from context
The `session` command now includes a comprehensive explanation of its role in managing watchtower client sessions. | ||
The `terminate` command offers clear instructions for ending an active session using its unique session ID. | ||
|
||
Want it more technical or more casual? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it would be better to be under Tooling and Documentation
section instead. Please also maintain the 80-character line limit where possible as per contribution guidelines
The `session` command now includes a comprehensive explanation of its role in managing watchtower client sessions. | ||
The `terminate` command offers clear instructions for ending an active session using its unique session ID. | ||
|
||
Want it more technical or more casual? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this comment doesn't belong here?
238a2ff
to
d4f3ad0
Compare
@mohamedawnallah , done! |
I noticed that the current git commit order appears to be in reverse. Typically, release notes are added after the corresponding coding changes. In current case, It seems the release notes were added before the changes they describe. On a related note, I observed that you used the |
Apart from the proposed changes above, the PR LGTM! |
@mohamedawnallah thank you ! And just wanted to ask — would you prefer if I squash the commits, or is it important to keep your name visible as a co-author in the commit history? |
@gap-editor feel free to squash git commits and as I mentioned before make sure the git commit for release note is the last one |
90d46b3
to
f743e49
Compare
@mohamedawnallah done! please check |
cmd/commands/wtclient.go
Outdated
@@ -377,13 +377,17 @@ func policy(ctx *cli.Context) error { | |||
|
|||
var sessionCommands = cli.Command{ | |||
Name: "session", | |||
Usage: "Manage watchtower client sessions.", | |||
Description: "Manage sessions with the watchtower client, including terminating sessions.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like theDescription
line is over 80 characters limit. Look for policy command legacy
usage in the same file and see how the lines are splitted using +
before 80 characters limit
cmd/commands/wtclient.go
Outdated
Subcommands: []cli.Command{ | ||
terminateSessionCommand, | ||
}, | ||
} | ||
|
||
var terminateSessionCommand = cli.Command{ | ||
Name: "terminate", | ||
Usage: "Terminate a watchtower client session.", | ||
Description: "Terminate an active session with the watchtower client by ID.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
explanation of its role in managing watchtower client sessions. The `terminate` | ||
command offers clear instructions for ending an active session using its unique |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like unique
and terminate
based on my proposed change before is over 80 characters as well they could be moved on the next line
@gap-editor – The code commits structure looks good to me. Please look for my additional proposed changes and I think it would be good to go |
Update wtclient.go
Update release-notes-0.19.0.md
@mohamedawnallah done! check is everything good, please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉. That being said the CI needs to be approved to run. I am also not familiar with resolution strategies in case of there are multiple community PRs resolving the same issue. Till then feel free to pick up good-first-issues
and ping me and I would be happy to review when I have got time for it:
https://github.com/lightningnetwork/lnd/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22%20no%3Aassignee
cc @ellemouton, @guggero
As CI tests run. It looks like this is unrelated to the changes in this PR:
|
Hey @gap-editor, the CI has run Feel free to fix the code formatting as appear in the CI. You could use |
It looks like this CI test failed here regards |
resolves #9583
Change Description
This PR enhances the
wtclient
subcommands by adding user-friendly help text and improving argument naming:sessionCommands:
Usage: "Manage watchtower client sessions."
Description: "Manage sessions with the watchtower client, including terminating sessions."
terminateSessionCommand:
Usage: "Terminate a watchtower client session."
Description: "Terminate an active session with the watchtower client by ID."
No functional behavior was changed. This is purely documentation/CLI-UX improvement.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
is included for small changes.