-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Enable experimental modules when rpm-ostree version >= 2021.9 #8202
Conversation
Hi @zhengtianbao. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
I have checked out the #8202 and can confirm that it works. /lgtm |
@hardoverflow: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Interesting idea for sure but I'm skeptical about relying on experimental features in tools (ex
stands for experimental in rpm-ostree
).
@@ -11,6 +11,21 @@ | |||
set_fact: | |||
is_ostree: "{{ ostree.stat.exists }}" | |||
|
|||
- name: get ostree version | |||
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" " |
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.
Why so complex?
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" " | |
shell: "rpm-ostree --version | awk -F\' '/Version/{print $2}'" |
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 your advice.
- name: get ostree version | ||
shell: "set -o pipefail && rpm-ostree --version |grep 'Version:' |awk '{print $2}'| sed \"s/'//g\" " | ||
args: | ||
executable: /bin/bash |
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.
No need for this.
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.
for ansible-lint.
ostree_version: "{{ ostree_version_on_server.stdout }}" | ||
when: | ||
- is_ostree | ||
- 'ostree_version_on_server.stdout is defined' |
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.
The code would be cleaner if you just checked ostree_version_on_server is succceded
(also not a fan of this extremely descriptive name) in case rpm-ostree is not installed and allowed the previous task to ignore the failure.
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.
Yeah, it's smells not good, thanks again.
become: true | ||
when: | ||
- is_ostree | ||
- ostree_version is version('2021.9', '>=') |
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.
Unless ostree_version
is in detaults/main.yml
this would fail.
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.
That's because I assume if is_ostree
is defined then ostree_version
will be defined too.
General question, do we have any way to test this in CI? |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, zhengtianbao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…etes-sigs#8202) * Enable experimental modules when rpm-ostree version >= 2021.9 * cleanup code
…etes-sigs#8202) * Enable experimental modules when rpm-ostree version >= 2021.9 * cleanup code
What type of PR is this?
/kind bug
What this PR does / why we need it:
rpm-ostree provides experimental support for modules since version 2021.9, so we should use command
rpm-ostree ex module enable
to enable the cri-o stream first and then install from that stream.refer: https://discussion.fedoraproject.org/t/cri-o-no-longer-available-through-rpm-ostree/33908
Which issue(s) this PR fixes:
Fixes #8197
Special notes for your reviewer:
Does this PR introduce a user-facing change?: