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

Removing default for KUBECONFIG to enable incluster e2e tests #2191

Merged
merged 1 commit into from Jul 15, 2021
Merged

Removing default for KUBECONFIG to enable incluster e2e tests #2191

merged 1 commit into from Jul 15, 2021

Conversation

salaboy
Copy link
Member

@salaboy salaboy commented Jul 15, 2021

Changes

Removing default setting to KUBECONFIG in e2e flags. This allows e2e testing to be done from inside a Kubernetes Cluster.

/kind bug
/kind cleanup

Fixes #2190

closes #2190

@knative-prow-robot
Copy link
Contributor

@salaboy: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

Changes

closes #2190

Removing default setting to KUBECONFIG in e2e flags.

/kind

Fixes #

Release Note


Docs


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.

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 15, 2021
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 15, 2021
@knative-prow-robot
Copy link
Contributor

Welcome @salaboy! It looks like this is your first PR to knative/pkg 🎉

@knative-prow-robot
Copy link
Contributor

Hi @salaboy. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@knative-prow-robot knative-prow-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/test-and-release labels Jul 15, 2021
@salaboy
Copy link
Member Author

salaboy commented Jul 15, 2021

@markusthoemmes I will appreciate feedback on this one, as I am not entirely sure to understand the comments above the if statement. Is there a reason why tests cannot be run incluster? Because this check here is definitely blocking that possibility, unless there is a way to bypass that check.

@salaboy
Copy link
Member Author

salaboy commented Jul 15, 2021

/assign @coryrc

// and production code and we want to make sure that production code defaults to
// the in-cluster config correctly.
if f.Kubeconfig == "" {
f.Kubeconfig = clientcmd.RecommendedHomeFile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this mean that this will no longer properly default the flag when running locally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, checking the code, I think this should work, as the fallback is precisely this path as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, looks like the fallback was added after this code, which explains why it was added, and why it's now redundant 🤞

@markusthoemmes
Copy link
Contributor

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 15, 2021
@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #2191 (50b368d) into main (00fa154) will decrease coverage by 1.49%.
The diff coverage is 70.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2191      +/-   ##
==========================================
- Coverage   67.58%   66.09%   -1.50%     
==========================================
  Files         215      221       +6     
  Lines        9098     9257     +159     
==========================================
- Hits         6149     6118      -31     
- Misses       2675     2863     +188     
- Partials      274      276       +2     
Impacted Files Coverage Δ
.../injection-gen/generators/reconciler_controller.go 0.00% <ø> (ø)
leaderelection/config.go 77.27% <ø> (ø)
logging/warning_handler.go 0.00% <0.00%> (ø)
metrics/config_observability.go 92.00% <ø> (ø)
source/source_stats_reporter.go 84.90% <ø> (ø)
test/cleanup.go 0.00% <0.00%> (ø)
test/clients.go 0.00% <ø> (ø)
test/e2e_flags.go 20.00% <ø> (ø)
test/request.go 0.00% <0.00%> (ø)
test/spoof/error_checks.go 76.92% <0.00%> (-6.42%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7764284...50b368d. Read the comment docs.

@salaboy
Copy link
Member Author

salaboy commented Jul 15, 2021

@julz @markusthoemmes tests seems to be failing but unrelated with the change.. I will figure out how to reproduce that.. or should we just retrigger the tests

@dprotaso
Copy link
Member

re-ran and the unit tests ran fine

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 15, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, salaboy

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2021
@knative-prow-robot knative-prow-robot merged commit dbcf4cf into knative:main Jul 15, 2021
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. area/test-and-release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e tests cannot be run inCluster (for no clear reason)
6 participants