Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kubernetes/klog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.80.0
Choose a base ref
...
head repository: kubernetes/klog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.80.1
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Sep 7, 2022

  1. add test for the command line usage

    The flags and their defaults are part of the klog API and must not change.
    pohly committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    a952486 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2022

  1. make InitFlags read-only

    The way it was implemented before, the current value of several flags was
    written to the global config struct each time InitFlags was called. Not all
    flags may get written concurrently, so this led to a data race when some other
    goroutine was actively using klog. InitFlags also created new flag.Flag
    instances for each call.
    
    By creating flags once during init, InitFlags becomes entirely read-only and
    thus safe to use concurrently.
    
    What remains ambiguous is which flags may get changed at runtime. That was
    underspecified before and doesn't get fixed here either, it just gets called
    out as a potential problem.
    pohly committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    28f7906 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #349 from pohly/init-flags-concurrency

    InitFlags concurrency fix
    k8s-ci-robot authored Sep 8, 2022
    Configuration menu
    Copy the full SHA
    cb9292a View commit details
    Browse the repository at this point in the history
Loading