-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add basic CLI for test infra #1484
Add basic CLI for test infra #1484
Conversation
@eliorerz: GitHub didn't allow me to request PR reviews from the following users: eliorerz. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
b940724
to
7a33610
Compare
/test ? |
77a16a5
to
243b09f
Compare
1c657e5
to
5a19baa
Compare
/retest |
5a19baa
to
06e56c6
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.
partial review
@@ -16,6 +16,11 @@ | |||
global_variables = DefaultVariables() | |||
|
|||
|
|||
def reset_global_variables(): |
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.
Seems like we're doing something wrong here, rather than instantiating it somewhere top-level and propagating it anywhere needed
Can we handle it some other way?
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.
We are, but we can't change global_variables
behavior.
Our assumption was that the container is executed once per set of tests with n environment variables.
In this case we are triggering the test directly from code and not from pytest-cli-command, so when the test-infra CLI is triggers the test, it will not update the global_variables
with the actual env vars values.
49aecb4
to
431cc66
Compare
src/consts/consts.py
Outdated
@classmethod | ||
def __all__(cls): | ||
return [cls.OpenShiftSDN, cls.OVNKubernetes] |
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.
__all__
looks to be related to some kind of known magic function in Python, which isn't the case I think
I'll suggest:
@classmethod | |
def __all__(cls): | |
return [cls.OpenShiftSDN, cls.OVNKubernetes] | |
@classmethod | |
def all(cls): | |
return [cls.OpenShiftSDN, cls.OVNKubernetes] |
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 for other enums
(btw, why not just use enums? then it's just list(NetworkType)
or however you want to iterate over it)
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 we should changed that.
A while back I suggested that and there was some resistance to change those classes to Enum due to the need to access the value with extra action. e.g. NetworkType.OpenShiftSDN.value
fd83afb
to
474cce1
Compare
474cce1
to
73c2216
Compare
/retest |
73c2216
to
730d557
Compare
@eliorerz: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
730d557
to
cedb12c
Compare
cedb12c
to
f83abcc
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eliorerz, osherdp 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 |
CLI tool for test-infra:
Supported commands:
help
- Print a list of all supported commandslist clusters
- List available clusters (name and id)test
- execute test function. Format:test <test_file> <test_name>
- autocomplete all fieldsclear
- clear CLI/cc @eliorerz
test-infra-cli-demo.mp4