-
Notifications
You must be signed in to change notification settings - Fork 372
feat(outcalls): add price_version parameter to the http canister request args #7447
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
Conversation
kpop-dfinity
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.
Left some comments mostly about the choices between returning errors vs returning default values
mraszyk
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.
I'm approving this PR since the code owned by the execution team is correct (as far as I can see) and my suggestion regarding using an enumeration instead of integers in the public API is a design concern that should have been caught earlier in the process (and thus it is not blocking at this stage).
kpop-dfinity
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.
LGTM with some nits
Co-authored-by: kpop-dfinity <[email protected]>
This PR adds the price version, as described in dfinity/portal#6101 to the management canister
http_requestendpoint.This PR also persists the version in the replicated state. In the future that will be used to determine which pricing strategy should be applied.
The flag is a candid opt nat32, which, if missing, defaults to "1", which corresponds to the "current" pricing. Similarly, if set to "2", the flag will default back to 1, as version 2 is not implemented yet.
In the future, we will support pricing_Version = 2, which corresponds to the "pay-as-you-go" pricing.