-
Notifications
You must be signed in to change notification settings - Fork 19
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
NAS-127426 / 24.10 / Installer rewrite #73
Conversation
593d363
to
877ab5a
Compare
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 know that you haven't asked for anyone to review this yet but I got excited seeing the PR show up 😄 .
cd983c8
to
9106278
Compare
9106278
to
0615bca
Compare
0615bca
to
39aeb8c
Compare
} | ||
) | ||
|
||
if destination_disks is None: |
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.
When will destination_disks be None
as opposed to an empty list? Maybe add a comment about why this would happen.
Perhaps use a pidfile or some other mechanism to prevent two instances of installer from running simultaneously. |
It looks like it might be easy to add i18n support for the installer menus. Would be a nice value-add for international community. |
ping @truenas/middleware please put some eyes on this. @william-gr and @anodos325 any other comments from you all? |
I glanced it over once again, looks good, apart from the "root" which I commented on. Looking forward for the follow up PR with APIs ;). |
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.
Looks fine from my point of view. As discussed, we're going to have to change the expect scripts so our CI continues to function.
This PR has been merged and conversations have been locked. |
We chose to use asynchronous I/O for the installer for two reasons:
asyncio
will allow us to useprompt-toolkit
for more complex UI elements that we have today or even whole screens from https://github.com/truenas/midcliThe current code base does some blocking I/O in the main loop. However, we never do the I/O that can really pause the program execution (e.g. interacting with block devices or network connections). For sake of simplicity of the implementation we allow ourselves to:
/proc
,/sys
) in the main loop. These are really CPU-bound tasks since the contents of those "files" is generated by kernel./tmp
(usingtempfile
module) which is a RAM-based file system and will never block.