-
Notifications
You must be signed in to change notification settings - Fork 316
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
feat: [UTP-242] Make subnet replica version available to canisters via management API #2202
base: master
Are you sure you want to change the base?
Conversation
53cfdff
to
7c5d14a
Compare
FYI, you can create a PR on top of a branch other than Then the change can be reviewed before said branch is merged to |
This I did not know, nice. |
…lable to execution environment (#2248) This is an alternative to #2248 and #2082 This PR passes the running replica version to the execution environment, from where it can be used [in a future management canister call.](dfinity/interface-spec#351): #2202 --------- Co-authored-by: Michael Weigelt <[email protected]>
…lable to execution environment (#2248) This is an alternative to #2248 and #2082 This PR passes the running replica version to the execution environment, from where it can be used [in a future management canister call.](dfinity/interface-spec#351): #2202 --------- Co-authored-by: Michael Weigelt <[email protected]>
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 left a comment on the spec PR about the name of this endpoint.
I'd also recommend we add some tests calling this endpoint and confirming it returns the right thing. Also, some test that ensures this is not callable via ingress (you should find examples from other similar endpoints).
Added also Martin as a reviewer explicitly for spec compliance check. |
This reverts commit 8911282.
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 - we may still want to rename from subnet_metrics
to subnet_info
(to be discussed in the upcoming Interface Specification meeting)
assert!(!replica_version.is_empty()); | ||
} | ||
|
||
#[test] |
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.
Maybe one more test where you try sending a request with the wrong subnet_id
?
WasmResult::Reject(err_msg) => panic!("Unexpected reject, expected reply: {}", err_msg), | ||
}; | ||
let SubnetInfoResponse { replica_version } = Decode!(&bytes, SubnetInfoResponse).unwrap(); | ||
assert!(!replica_version.is_empty()); |
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.
Isn't the replica version a constant that we could compare against?
Co-authored-by: Dimitris Sarlis <[email protected]>
This PR is a follow-up to #2248
It makes replica_version available via a management canister call as specified here.