-
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
Fixing issues with flags parsing #57
Conversation
/test pull-e2e-framework-test |
823e71d
to
4b67895
Compare
69ad4d9
to
07b5f11
Compare
This patch rework how flags are supported and parsed in the test framework. All framework flags are merged with the go-generated test binary flags. This fix also rework how/when envconf.Config are used to create klien.Client to avoid errors when flags do not provide needed config values. Signed-off-by: Vladimir Vivien <[email protected]>
07b5f11
to
84baa29
Compare
@ShwethaKumbla - this is finally building. PTAL. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ShwethaKumbla, vladimirvivien 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 |
Currently, the config's client is managed as follow: - it can be created with `NewClient` and `Client`. However, once it is created, it is cached and will always be returned. - it can be set directly with `WithClient`. The current approach has a few drawbacks when running tests in parallel: - the client is shared between tests, leading to race conditions when it is initialized at the same time in multiple tests. - because of the caching, if one gets the client, modifies the kubeconfig or any other client related parameter in the config, and then gets the client again, they would get the original client and not a new one with the new kubeconfig. - `Client` is not a simple getter function like all the other similar methods of the config, which makes it confusing to users. This commit attempts to fix this by initializing the client earlier but currently does not work for in-cluster clients. It conflicts with changes made in kubernetes-sigs#57.
Fixes #56