-
Notifications
You must be signed in to change notification settings - Fork 40
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
Optimize bluechictl-is-enabled test #975
Optimize bluechictl-is-enabled test #975
Conversation
To improve performance of bluechictl-is-enabled test we will skip checking existing unit file, if we already checked a unit with the same enablement status before, when we traverse over list of all existing unit files. Relates: eclipse-bluechi#972 Signed-off-by: Martin Perina <[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.
LGTM
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.
In general LGTM
By using the list-unit-files
feature, we rely on the state of the machine (container/vm/etc.) - so it might behave differently in our container vs multi-host setup. In addition, the list-unit-files
is quite expensive and takes quite a while to complete.
Therefore I'd like to raise the question if it is really necessary to aim for checking all systemd unit file states or to "just" select a few and enforce these - e.g. create a quadlet file, do a reload and check if the file is "generated".
I used units from list-unit-files, because I haven't been able to find out a way to create services with all possible enablement statuses to make sure we simulate systemctl behavior as much as possible. So using list-unit-files we are currently checking services with following enablement statuses (at least on my laptop):
And the manually we check for non-existent unit file. So for now I'd merge the code to unblock slower platforms and later we can investigate better solution as a part of #976 |
That was my previous point - it relies on the machine we run it on. In this list the states
Sounds reasonable to me. Both, merging now or changing the approach, is fine. |
To improve performance of bluechictl-is-enabled test we will skip
checking existing unit file, if we already checked a unit with the same
enablement status before, when we traverse over list of all existing
unit files.
Relates: #972
Signed-off-by: Martin Perina [email protected]