-
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
fix flake8 errors in Kubespray CI - tox-inventory-builder #6910
fix flake8 errors in Kubespray CI - tox-inventory-builder #6910
Conversation
Hi @hafe. 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. |
For example, https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/849333077 shows the following error:
Nice fixing. /lgtm |
/ok-to-test |
/retest |
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.
Few suggestions
for group in groups: | ||
self.assertTrue(group in self.inv.yaml_config['all']['children']) | ||
self.assertIn(group, self.inv.yaml_config['all']['children']) |
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.
What about something that doesn't iterate over the groups like:
self.assertTrue(set(groups).issuperset(set(self.inv.yaml_config['all']['children'])))
self.assertTrue( | ||
bad_host not in self.inv.yaml_config['all']['hosts'].keys()) | ||
self.assertNotIn( | ||
bad_host, self.inv.yaml_config['all']['hosts'].keys()) |
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 think that this works without having to specify the keys() method
bad_host, self.inv.yaml_config['all']['hosts'].keys()) | |
bad_host, self.inv.yaml_config['all']['hosts']) |
@@ -246,25 +246,25 @@ def test_set_k8s_cluster(self): | |||
|
|||
self.inv.set_k8s_cluster() | |||
for host in expected_hosts: | |||
self.assertTrue( | |||
host in | |||
self.assertIn( |
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.
Same suggestion as the first comment
self.assertTrue(set(expected_hosts).issuperset(self.inv.yaml_config['all']['children'][group]['children']))
I just changed what was suggested in ci. I don't even have a clue what this piece of code is there for... |
/retest |
Yeah I agree with @hafe here. |
/retest |
dfbea02
to
ec9dba8
Compare
ec9dba8
to
8b50326
Compare
8b50326
to
5d0b568
Compare
5d0b568
to
c548706
Compare
/retest |
@bmelbourne: The
Use 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. |
@bmelbourne: The specified target(s) for
Use 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. |
/retest |
/lgtm |
/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.
At last 👍
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bmelbourne, floryut, hafe 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 |
…-sigs#6910) * fix flake8 errors in Kubespray CI - tox-inventory-builder * Invalidate CRI-O kubic repo's cache Signed-off-by: Victor Morales <[email protected]> * add support to configure pkg install retries and use in CI job tf-ovh_ubuntu18-calico (due to it failing often) * Switch Calico, Cilium and MetalLB image repos to Quay.io Co-authored-by: Victor Morales <[email protected]> Co-authored-by: Barry Melbourne <[email protected]>
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Kubespray CI - tox-inventory-builder no longer works
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: