-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adds some extra commands to the cln-plugin #83
Adds some extra commands to the cln-plugin #83
Conversation
176cb95
to
a8e2857
Compare
The CI issues showing up here should have been fixed in #84. This actually revealed a race condition that was affecting the plugin. |
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.
A tiny nit and missing docs about the new commands.
I also feel that the new state abandoned
is too short lived to be mentioned in the docs, but on the other hand, will be so confusing if some user seen it while get
ingtowerinfo
, because It won't be clear whether the plugin deletes that data or keeps it and only flags the tower.
I think we can remove the tower right when the user asks (in abandontower
callback) and manage it in the retrier not to retry towers which are not found in wt_client.towers
.
What do you think about that?
watchtower-plugin/src/retrier.rs
Outdated
.is_abandoned() | ||
{ | ||
log::info!("Abandoning {}", tower_id); | ||
println!("Abandoning {}", tower_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.
This isn't needed.
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.
Do you mean the print?
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.
yup
@meryacine I guess we could get rid of |
a8e2857
to
4919302
Compare
@meryacine fbce39f should have fixed both issues you mentioned. You mentioned another issue with the docs, but I couldn't see the comment. lmk if there is anything missing. |
4919302
to
be0c671
Compare
I meant that the new commands weren't documented in the watchtower's readme. |
Oh, gotcha |
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.
Some comments regarding the recent change.
Kinda putting myself in the user's chair here and see what would make more sense to them. This might be a lil opinionated though.
be0c671
to
cca0dcf
Compare
Comments have been addressed (except for the docs, which need #86 to be merged or they'll conflict). |
cca0dcf
to
b6a123e
Compare
- `abandontower <tower_id>` will remove all data associated to a given tower - `getappointmentreceipt <tower_id> <locator>` will pull a given appointment receipt from the local database. - `getregistrationreceipt <tower_id>` will pull a given registration receipt from the local database.
b6a123e
to
f12a0ac
Compare
Notice this may still fail for test_unreachable_watchtower due to #84 |
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.
A small nit. Otherwise, should be good to go.
watchtower-plugin/src/retrier.rs
Outdated
.unwrap() | ||
.set_tower_status(tower_id, crate::TowerStatus::TemporaryUnreachable); | ||
{ | ||
// Not start a retry if the tower is flagged to be abandoned |
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.
nit: Change is flagged to be abandoned
to is abandoned
Some of the tmp paths in the `watchtower-plugin` tests were not using `TempDir` and still manually removing the directories.
f12a0ac
to
a42a5ee
Compare
Changes:
abandontower <tower_id>
will remove all data associated with a given tower. If the tower is being retried, the retry strategy will be aborted on the next iteration.getappointmentreceipt <tower_id> <locator>
will pull a given appointment receipt from the local database.getregistrationreceipt <tower_id>
will pull the latest registration receipt from the local database.Followups:
getregistrationreceipt
so a period can be specified. If present, the receipt matching that period will be pulled (if any).