Repository navigation
cmd/wtclient: Enhance help text for session and terminate subcommands - #9765
gap-editor wants to merge 3 commits into
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 |
| 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.
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.
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.
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 |
| 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.
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
| var terminateSessionCommand = cli.Command{ | ||
| Name: "terminate", | ||
| Usage: "Terminate a watchtower client session.", | ||
| Description: "Terminate an active session with the watchtower client by ID.", |
| 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.
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 |
@mohamedawnallah done! check is everything good, please! |
|
@mohamedawnallah - those itest fails you linked are not related to this PR. This PR only changes description strings. |
| Usage: "Manage watchtower client sessions.", | ||
| Description: "Manage sessions with the watchtower client, including " + | ||
| "terminating sessions.", | ||
| 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.
I think just the Usage string is enough? doesnt seem like the descriptions add much more
| - [Fixed a few misspellings](https://github.com/lightningnetwork/lnd/pull/9290) | ||
| of "broadcast" in the code base, specifically the `lncli peers updatenodeannouncement` | ||
| command documentation. | ||
|
|
There was a problem hiding this comment.
you'll please need to move this to v0.20's notes
3d4c823 to
8aa3cb2
Compare
|
Hi @ellemouton @mohamedawnallah , I’m unable to run |
ellemouton
left a comment
There was a problem hiding this comment.
I’m unable to run make fmt due to a bug I haven’t been able to fix. Sorry for the inconvenience.
you'll need to figure it out the bug if it means getting the PR in a mergeable state please 🙏
| @@ -377,13 +377,19 @@ func policy(ctx *cli.Context) error { | |||
|
|
|||
There was a problem hiding this comment.
the commit title just mentions doc update but this is where the main change is happening in cmd/commands?
|
|
||
| ## Tooling and Documentation | ||
|
|
||
| [Add usage and desc to wtclient session cmd](https://github.com/lightningnetwork/lnd/pull/9765): Enhanced documentation for the `session` and `terminate` commands in `lncli wtclient`. 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. |
There was a problem hiding this comment.
I think you can just shorted this to "Enhance documentation for various watchtower commands"
| var sessionCommands = cli.Command{ | ||
| Name: "session", | ||
| Usage: "Manage watchtower client sessions.", | ||
| Description: "Manage sessions with the watchtower client, including " + |
There was a problem hiding this comment.
this should be squashed into the previous commit
|
@mohamedawnallah: review reminder |
|
!lightninglabs-deploy mute |
ellemouton
left a comment
There was a problem hiding this comment.
@gap-editor - please dont re-request review until my previous comments have been addressed.
cmd: add usage and desc to `wtclient session` Update wtclient.go Update release-notes-0.20.0.md Update release-notes-0.20.0.md Update release-notes-0.20.0.md
|
removed review requests as comments have still not been addressed |
|
so can u point me to what i didn't do? is it really difficult? u are
writing second time that i didn't do smth but cannot clarify what exactly i
need to do
|
|
@gap-editor - see my previous review where I left comments: None of those comments have been addressed #9765 (review) |
|
If you can't be bothered to actually open GitHub and read through the review comments, then I guess there's no use in us providing review in the first place. |
|
u are crazy guys |
|
show me what i didn't do |
|
Another frustrated PR... @lightninglabs team is woefully insufficient to fix a bug in its software...sad... If no one is going to take care of this, could you please confirm whether I should close this issue? -> #9583 |
|
@twofaktor did you notice how much effort was spent and feedback was provided on this pr, before we made the decision to close it? Or are you just happy to take sarcastic pot shots? We will not merge any pr, if code is not up to quality or according to the guideline. In this case the contributor (actually a commit farmer) was not interested in solving the issue, but only interested in getting a pr merged. You can try submitting a pr yourselves, this issue is not that difficult to work on. |
Ok, I'm not a developer. I only opened the issue in case a freelance developer could take charge of fixing it, or if not, someone from the Lightning Labs team could, since they're supposedly the owners of the software in question. Issue #9583 closed as not planned. Thank you for your attention 🫶 |
resolves #9583
Change Description
This PR enhances the
wtclientsubcommands 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.