-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Xpan auto retry limit #10178
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?
Xpan auto retry limit #10178
Conversation
Introduce `T::MaxAutoRenewalRetries` constant in `Config` trait track retry count in `AutoRenewalRetries` storage map, increment on each failed renewal attempt. When retries >= max, emit `AutoRenewalFailed`, remove auto-renew record, and reset counter to 0. Add integration tests: - persistent retry when count < max - record removal when count >= max BREAKING CHANGE: runtime must define `MaxAutoRenewalRetries`
|
User @xpanvictor, please sign the CLA here. |
|
/cmd prdoc |
franciscoaguirre
left a comment
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.
The logic looks good. @seadanda ?
prdoc/pr_10178.prdoc
Outdated
| @@ -0,0 +1,35 @@ | |||
| title: Xpan auto retry limit | |||
| doc: | |||
| - audience: Todo | |||
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.
| - audience: Todo | |
| - audience: Runtime Dev |
| title: Xpan auto retry limit | ||
| doc: | ||
| - audience: Todo | ||
| description: |- |
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.
You can probably just leave the description
Co-authored-by: Francisco Aguirre <[email protected]>
franciscoaguirre
left a comment
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.
You should add this new config item to both coretime-westend and coretime-rococo
Ok. I'll do that. |
Can you share a pointer to the crates? A bit large navigating the sdk. |
I've added them @franciscoaguirre, is that fine? Also used default |
|
I will make changes to the docs to reflect the new structure. Also what should we make the |
|
2 looks like a good value |
seadanda
left a comment
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.
Had a quick look, will take more time over the core approach and logic
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
Co-authored-by: Dónal Murray <[email protected]>
|
@seadanda can you review, I've applied the changes. |
BREAKING CHANGE: runtime must define
MaxAutoRenewalRetriesFixes #9548
Problem: After auto-renewal fails due to some error, the system disables autorenewal entirely contrary to the documentation.
Solution: A more robust retry which is configurable in the pallet config. This is compile time setting currently.
Introduce
T::MaxAutoRenewalRetriesconstant inConfigtrait track retry count inAutoRenewalRetriesstorage map, increment on each failed renewal attempt. When retries >= max, emitAutoRenewalFailed, remove auto-renew record, and reset counter to 0. Add integration tests:Integration
Downstream projects using pallet-broker must define
MaxAutoRenewalRetriesconfig. They just need to pass a retries limit. Can be set to0for no retry. This is similar to current logic.Review Notes
Changes:
MaxAutoRenewalRetriesto config trait. Default type isu8.Checklist
Trequired)/cmd label <label-name>to add labels