Skip to content
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

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

vladimirvivien
Copy link
Contributor

Fixes #56

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 17, 2021
@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 17, 2021
@vladimirvivien vladimirvivien changed the title Investigating issues with flags [WIP] Investigating issues with flags Sep 17, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 17, 2021
@ShwethaKumbla
Copy link
Member

/test pull-e2e-framework-test

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 7, 2021
@vladimirvivien vladimirvivien changed the title [WIP] Investigating issues with flags Fixing issues with flags parsing Oct 7, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 7, 2021
@vladimirvivien vladimirvivien force-pushed the flags-fix branch 3 times, most recently from 69ad4d9 to 07b5f11 Compare October 7, 2021 20:03
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]>
@vladimirvivien
Copy link
Contributor Author

@ShwethaKumbla - this is finally building. PTAL.

@ShwethaKumbla
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit cd133e2 into kubernetes-sigs:main Oct 8, 2021
@vladimirvivien vladimirvivien deleted the flags-fix branch June 23, 2023 15:49
Fricounet added a commit to Fricounet/e2e-framework that referenced this pull request Apr 17, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flags support seems broken when test binary generated
3 participants