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
Reference implementation for EEP 56 #4638
Conversation
Last commit adds test cases:
Checks for nonsensical combinations, like having |
Latest commit refines and augments test cases. |
I and @HansN feel positive about the way this turning out. As we are waiting for OTP-24 RC2 we can not test it in the builds just yet. However I have run the tests myself with cover and I got some uncovered lines.
|
Hi @IngelaAndin,
Great =D
Yes, the test suite is not 100% finished yet, I'm extending it and fill the gaps as time permits. |
Nice :) I'm quite pleased about how this is rolling along, too. I have been told that an upcoming OTB meeting will look into this. Other things aside, we would appreciate a decision (or preference or something) about the issue of allowing (ignoring) or forbidding option combinations that make no sense, like |
@Maria-12648430 we will take it up on the meeting (next week). |
@IngelaAndin thanks :) |
@IngelaAndin I augmented the existing and added a new test, and the lines you pointed out are now covered. Depending on the decision concerning pointless option combinations, more tests will be added later to ensure the desired behavior. Also, there should be tests for upgrading, but that also depends, to a degree, on how pointless combinations are to be treated, so these will be added later, too. |
Hi, thanks for the update. I will enable the test again. (The are automatically disabled if you push something new). I can also report that your branch was breaking the test case upgrade_supervisor in the release_handler_SUITE of the sasl application and supervisor_incorrect_return in behaviour_SUITE of the dialyzer application. So you need to look into that. |
Last commit fixes the two failing tests pointed out by @IngelaAndin, and adds tests for upgrading |
Last commit handles invalid combinations of |
There was an OTB yesterday that decided that:
Please also change relevant parts in the supervisor documentation in "Design Principles". The file path is |
Great 🥰
That should be ample time, because this...
... has already been done in @juhlig's last commit from yesterday, and this...
... is what I'm starting on right now :) |
@garazdawi my last commit addresses all the documentation changes you requested. Or rather, I did my best to address them ;) The only thing I didn't provide are examples for how an automatic shutdown takes place. That would require some illustration with images I think, I'll leave that for later. Is there some sort of guideline for images in the documentation that I should know of? |
We don't really have a guideline as such, but recently we have used Dia to draw things and then set up a makefile rule that can create the |
I can look into that next week I think. Anyway, unless there are new change requests, we're now pretty much done here, right? |
I have added 912d1fe to the nightly tests now. If there are not any errors and no one complains, I'll merge this PR tomorrow and we could open a new one with the items left:
Have I forgot anything? |
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.
Yes, we can merge this. I do however think that we can do a better job in the documentation, especially the documentation in the "OTP Design Principles".
In the "Stopping a Child Process" section I think it would be beneficial to include a small description about who can terminate a child (i.e. an external entity or the child itself) with a description of how you go about it for both scenarios. Maybe there should be two subsections here?
The "Supervisor Behaviour" chapter is not meant to be a restatement of what you can find in the supervisor reference manual, but rather a guide about how to use the features, when you should use them, and things to keep in mind.
Co-authored-by: Lukas Larsson <garazdawi@gmail.com>
Sorryyyy, I'm doing the best I can 😢😢😢 But seriously, I find it surprisingly difficult to fit new things like this into the existing document :( In the end, it probably boils down to a bigger restructuring/rewrite project for the chapter, something that requires quite some time and effort and many review cycles. |
I think that re-writing documentation parts that are more of a general kind is out of scope for a "simple" add-a-feature PR like this. But I agree that the supervisor Design Principles would benefit from a general brush-up, but that is a separate task in my opinion. |
@HansN my point exactly :) |
Just had time to catch up on this. I agree with @HansN that we should merge this and make sure to make a new PR that enhances the error messages in time for OTP-24, but I really like to see the implementation tested in RC3. I think that clear error messages are way more important than backwards compatible error messages. Error reasons are many times specified as term() for this purpose. In the ssl application we have some errors that are specified as {alert_atom(), term()} as in those case we know that the error will always result in a TLS alert that you might want to match on. But normal error reasons are for debugging and should not be matched on. While I agree with @garazdawi that it is important with good docs I also agree with @hans that we can not really expect @Maria-12648430 to solve all our legacy problems with the existing documentation as part of this PR. Hopfully @Maria-12648430 would be interested to collaborate to make further improvements, as this will also benefit the new feature added here. |
It was not my intention to say that I expected a rewrite of the entire "Supervisor Behaviour" chapter. My wording was apparently poor as all three of you seem to have interpreted it as such. My apologies. This PR adds new functionality around how supervisors terminate and how child processes can trigger such termination. As such I think that it would be reasonable to take a larger look at those specific sections in the "Supervisor Behaviour" chapter. |
As an example of what I am missing right now is a discussion under "Stopping a Child Process" of why it is a bad idea to call |
@garazdawi I then think that those smaller document enhancements could come with the improved error messages for OTP-24. But I still would like us to merge the code before RC3 so that we get as much regression test as possible ;) |
Yes, I agree. |
A big thank you for the PR! |
Congratulations to everyone involved! It's a big one! |
Good morning everyone :)
@garazdawi or maybe my wording was bad first ^^; When I brought up rewriting, it was not because I assumed that you wanted me to do it right here and now. What I really wanted to say is that I can't make my additions fit nicely into the existing chapter and a rewrite (or brush-up, as @HansN put it) might be the best way to make it nice and consistent again.
@IngelaAndin Sure, I'll do my best :) Deadline for documentation is end of april, I believe? |
Oh, yay, merged =D |
This PR reflects the current state of and will be updated with EEP 56.
As the EEP has not settled down fully, this PR contains no additional tests and documentation (yet).