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

Automated cherry pick of #124289: e2e node: fix -v support #124415

Commits on Apr 19, 2024

  1. e2e node: fix -v support

    Since 43539c8 (first released in
    v1.30.0-alpha.2), the test/e2e/framework manages -v and -vmodule and uses them
    for a logger which writes to the Ginkgo output stream.
    
    This did not work for test/e2e_node, because:
    - logs.AddFlags(pflag.CommandLine) registers its own -v and -vmodule flags
    - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) skips the corresponding
      flags in the flag.CommandLine
    - pflag.Parse() initializes the settings in the "logs" package even though
      those are not used at runtime
    
    The solution is to not use the "logs" package.
    pohly committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    6bb6b07 View commit details
    Browse the repository at this point in the history
  2. e2e framework: configure Ginkgo logger and klog consistently

    Even if the textlogger which writes to Ginkgo is installed as the logger in
    klog, klog still does some verbosity checks itself (for example,
    klog.V().Enabled).
    
    Therefore the framework has to keep the verbosity settings in the textlogger
    and in klog consistent. This is done by wrapping the Set call instead of
    replacing it.
    pohly committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    7e5e4c3 View commit details
    Browse the repository at this point in the history