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

Update log level to run tests on debug level #5071

Merged
merged 3 commits into from Aug 13, 2019

Conversation

taragu
Copy link
Contributor

@taragu taragu commented Aug 6, 2019

/lint

Fixes #2313

Proposed Changes

  • Update log level to run tests on debug level

Release Note

NONE

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 6, 2019
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 6, 2019
@knative-prow-robot
Copy link
Contributor

Hi @taragu. 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.

Copy link
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

This changes the default loglevel everywhere. I'm not certain that's what we want, do we?

@markusthoemmes
Copy link
Contributor

It actually changes the level nowhere, because it's in the example block.

@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 6, 2019
@taragu
Copy link
Contributor Author

taragu commented Aug 6, 2019

@markusthoemmes ahh got it. Is test/config/300-configmap.yaml what we want to change?

@markusthoemmes
Copy link
Contributor

That configmap has nothing to do with loglevels I think? I don't know how to approach this issue best tbh. We'll beed to change what we install in the tests before we install it I guess.

serving.knative.dev/release: devel

data:
zap-logger-config: |
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can leave this out entirely to pick up the default? Not entirely sure though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just tried applying this yaml without this block and the zap-logger-config was not set

Copy link
Contributor

Choose a reason for hiding this comment

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

NewConfigFromConfigMap function will not pick up logging config without zap-logger-config key. @markusthoemmes were you talking about labels or the zap-logger-config key?

cc @andrew-su

Copy link
Contributor

Choose a reason for hiding this comment

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

My thought was that we'd only need the specific loglevels below and that the broader loggingconfig would be defaulted in.

Copy link
Member

Choose a reason for hiding this comment

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

If both are kubectl applied, then applying this without it will strip it in the three way merge.

@shashwathi
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 Aug 8, 2019
apiVersion: v1
kind: ConfigMap
metadata:
name: config-logging
Copy link
Member

Choose a reason for hiding this comment

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

So for the main file, we symlink it under testdata and validate it's content in a Go test. Can we do the same here to validate changes? Otherwise this looks good to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattmoor Sounds good. Should it be a new test under test/? Which package should it belong?

Copy link
Member

Choose a reason for hiding this comment

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

I'd just put it right next to where we test the real config (same test, second symlink)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattmoor sounds good! Just added the test and symlink

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/monitoring and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 9, 2019
@taragu taragu force-pushed the tests-log-level branch 2 times, most recently from 58fd6a9 to dde6921 Compare August 9, 2019 19:02
@knative-test-reporter-robot

The following tests are currently flaky. Running them again to verify...

Test name Retries
pull-knative-serving-integration-tests 1/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-integration-tests:

test/e2e.TestGRPCStreamingPingViaActivator

@taragu
Copy link
Contributor Author

taragu commented Aug 9, 2019

/test pull-knative-serving-integration-tests

@taragu
Copy link
Contributor Author

taragu commented Aug 12, 2019

@markusthoemmes @mattmoor this PR is ready for another review. Would you please take a look?

@@ -93,6 +95,56 @@ func TestOurConfig(t *testing.T) {
}
}

func TestLogLevelTestConfig(t *testing.T) {
wantCfg := `{
Copy link
Contributor

Choose a reason for hiding this comment

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

const here and the next one.

}
}
if got := cfg.LoggingConfig; got != wantCfg {
t.Errorf("LoggingConfig = %v, want %v, diff %s", got, wantCfg, cmp.Diff(got, wantCfg))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
t.Errorf("LoggingConfig = %v, want %v, diff %s", got, wantCfg, cmp.Diff(got, wantCfg))
t.Errorf("LoggingConfig = %v, want %v, diff(-want +got) %s", got, wantCfg, cmp.Diff(wantCfg, got))

(https://godoc.org/github.com/google/go-cmp/cmp#Diff, most (but surely not all) follows this, see the Diff example)

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, taragu

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 Aug 13, 2019
@knative-prow-robot knative-prow-robot merged commit 2600036 into knative:master Aug 13, 2019
@taragu taragu deleted the tests-log-level branch November 12, 2019 16:03
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/monitoring area/test-and-release It flags unit/e2e/conformance/perf test issues for product features 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/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.

Run tests on the debug level.
9 participants