-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
net_kernel:allowed/0
, specs and docs
#8207
base: master
Are you sure you want to change the base?
Conversation
CT Test Results 2 files 67 suites 1h 2m 24s ⏱️ Results for commit 2ec2466. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
As per the new documentation, this function has the specs but was not displayed as a public function, which is why it had the We will get back to you once we have determined if this function should be public or not. |
That was my intention because I think that user must have an option to retrieve the state of allowed node.
I definitely agree, but FWIW |
I think both functions make sense as public. |
8895faa
to
2ec2466
Compare
I've added the testcase that goes through 4 different cases:
|
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.
Thanks for the PR!
Could you add tests to the allow
function as well?
I see that you use it via rpc:call
but that, unfortunately, we do not have tests for it (AFAIK). Apart from this, the type of allow
seems to be wrong, since it can return ignored
.
Thanks again for the PR
Both
I used it because it is already used in other tests in this suite.
|
Few changes:
net_kernel:allowed/0
is speced and documented. Notice that it is already listed in "documented API exports", but for some reason docs were missing. I think it's a must to have it documented, because if you don't then the user can't figure out ifnet_kernel:allow/1
was called in the past, therefore blocking nodes with the same cookie to connect (which I believe can be very frustrating and and to debug!). This is just a pure getter function, I see no threat exposing it.net_kernel:allow/1
was missingignored
value it can return. You'll get it if e.g. your node is started without (s)name.