-
Notifications
You must be signed in to change notification settings - Fork 6
Installer features prerequisites #319
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
Conversation
This will detect any lack of parameter value more rapidly. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
- adding it behind the scene makes it more difficult to write tests for IPv6 - only needed for install, not upgrade or restore Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
This is useful for a lambda passed to @pytest.mark.answerfile, where in some variants of a test we want to add an element, but nothing in other variants (eg. a <raid> block) Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
This is a preparation for type hint addition, where we cannot mutate in-place a variable to another type: we have to build an object of the correct return type incrementally. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Issue raised by type checkers. Signed-off-by: Yann Dirson <[email protected]>
Type checkers today are unable to determine that `defn` does not contain an `attrib` member, this prevents them from checking our dict would provide compatible data (which is does not). Signed-off-by: Yann Dirson <[email protected]>
marker = request.node.get_closest_marker("default_vm") | ||
default_vm = marker.args[0] if marker is not None else None | ||
if default_vm is not None: | ||
logging.info(">> No VM specified on CLI. Using default: %s." % default_vm) | ||
ref = default_vm | ||
if marker is not 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.
it could be a good place to use the famous walrus operator:
if (marker := request.node.get_closest_marker("default_vm")) is not 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.
oh, it's already in 3.8 :)
hm, I have mixed feelings in this case :)
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. Before merging we likely need to run at least some testsuites to avoid surprise unwanted failures in CI.
PEP585 implemented in python 3.9 allows to subscript `list` and `dict`, and doing so even with 3.8 is not flagged by checkers, so devs end up using it and get flagged by the CI. Since 3.7 `from __future__ import annotations` allows to defer evaluation of annotations, so any use of collection subscripting in an annotation gets not checked by the interpreter any more, and we can use the more comfortable syntax. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
The helper_vm_with_plugged_disk fixture for tune_firstboot was only able to attach a single disk. For RAID support we need several disks, and that fixture would fail. Signed-off-by: Yann Dirson <[email protected]>
Using a temporary variable is unnecessary and hurts readability. Also use logger formatting as designed. Signed-off-by: Yann Dirson <[email protected]>
Code will be more readable when we start manipulating other info about system disks. Signed-off-by: Yann Dirson <[email protected]>
Well, it was indeed working "by chance", as calling readlink on a non-link returns empty, which instead of getting [ to return non-zero because empty string is not "busybox" got it to return non-zero because the comparison operator had no first operand. Signed-off-by: Yann Dirson <[email protected]>
d015bf5
to
feebb8a
Compare
Ran |
This PR collects all the small improvements that ended up in #311 and #316, and are independent enough to be useful to merge before those get settled.