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

distage-testkit: Add TestConfig#debugOutput, rename TestConfig#testRunnerLogLevel->logLevel, choose lowest logLevel among all tests envs for test runner logs (allow silencing config load log). #1074

Merged
merged 1 commit into from
May 23, 2020

Conversation

neko-kai
Copy link
Member

  • system property izumi.distage.testkit.debug sets testkit debug logs to info, instead of setting logger to Debug level
  • log how many envs were merged if any
  • exclude all components of runtimeLocator from subsequent plans
  • fixed memoizedConfig for multiple test effect types
  • update TestConfig doc

…tRunnerLogLevel`->`logLevel`, choose lowest `logLevel` among all tests envs for test runner logs (allow silencing config load log).

* system property `izumi.distage.testkit.debug` sets testkit debug logs to info, instead of setting logger to Debug level
* log how many envs were merged if any
* exclude _all_ components of runtimeLocator from subsequent plans
* fixed memoizedConfig for multiple test effect types
* update TestConfig doc
@neko-kai neko-kai requested review from pshirshov and Caparow May 23, 2020 00:46
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2020

Codecov Report

Merging #1074 into develop will increase coverage by 0.09%.
The diff coverage is 90.78%.

@@             Coverage Diff             @@
##           develop    #1074      +/-   ##
===========================================
+ Coverage    55.93%   56.03%   +0.09%     
===========================================
  Files          381      381              
  Lines         6940     6951      +11     
  Branches       362      364       +2     
===========================================
+ Hits          3882     3895      +13     
+ Misses        3058     3056       -2     

val runtimeLogger = EarlyLoggers.makeLateLogger(RawAppArgs.empty, memoizedEnvLogger, config, env.logLevel, defaultLogFormatJson = false)(
"memoEnv" -> memoEnv.hashCode()
)
val configLoadLogger = IzLogger(memoEnv.logLevel).withCustomContext("phase" -> "testRunner")
Copy link
Contributor

@Caparow Caparow May 23, 2020

Choose a reason for hiding this comment

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

Hm, but with such behavior you cannot control config logger log level via debug property.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Caparow Yeah, because it's on by default - you should bump logLevel to filter it out. I could add a debug property to disable config logs, but i think it wouldn't be that useful - it's kinda hard to add persistent system properties everywhere, if you're the kind of person who wants zero-log testing

Copy link
Member Author

Choose a reason for hiding this comment

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

Or we can use an enum instead of bool after all - then you could disable config log by setting Silent

Copy link
Contributor

@Caparow Caparow May 23, 2020

Choose a reason for hiding this comment

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

@neko-kai ah, I just thought that we want to make config loader with test runner logger instead of environment one (because making a config is a part of env preparation rather than test run). Anyway, it's not necessary since we already reduced the number of logs for config loader, and in the vast majority of cases we will have only one config loader message.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok in that case let's merge as-is

@neko-kai neko-kai merged commit c4ae7b9 into develop May 23, 2020
@neko-kai neko-kai deleted the feature/cleanup-test-logs branch May 23, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants