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

release-2.2.1 #3577

Closed
wants to merge 9 commits into from
Closed

release-2.2.1 #3577

wants to merge 9 commits into from

Commits on Mar 11, 2021

  1. Configuration menu
    Copy the full SHA
    404d544 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a27c799 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Support labelallow stage in Promtail (#3468)

    * add labelallow stage
    
    * added docs
    
    * add docs
    
    * fix lint
    
    * update stage name in _index.md
    
    (cherry picked from commit 0f5fcee)
    adityacs authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    3b30483 View commit details
    Browse the repository at this point in the history
  2. Fixes a bug where unpack would mutate log line. (#3502)

    * Fixes a bug where unpack would mutate log line.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    
    * add reset.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    (cherry picked from commit 6148794)
    cyriltovena authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    606755b View commit details
    Browse the repository at this point in the history
  3. Support for single step metric query. (#3540)

    When splitting correctly steps in the frontend, some queries might be of a single step, e.g start == end.
    
    This PR add supports for those queries, which are already supported by Cortex and Prometheus, but for some reason not Loki.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    (cherry picked from commit 29a3240)
    cyriltovena authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    2c5d79b View commit details
    Browse the repository at this point in the history
  4. Fixes a bug in MatrixStepper when sharding queries. (#3550)

    * Fixes a bug in MatrixStepper when sharding queries.
    
    Since we split correctly metric queries, this bug has show itself.
    Basically we were not correctly stepping through time. We should always start from start, add the step until the start is after the end.
    
    For more read: https://www.robustperception.io/step-and-query_range
    
    Fixes #3541
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    
    * Fixes tests.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    
    * Fixes tests. for real.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    
    * Not easy to get those test working.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    (cherry picked from commit b11d2ef)
    cyriltovena authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    b2aec4a View commit details
    Browse the repository at this point in the history
  5. Properly release the ticker in Loki client. (#3566)

    I think this was only impacting the docker driver who would start/stop for each new followed containers.
    My assumption is that this would slowly build up and eat CPU over time.
    
    Fixes #3319
    
    I arrived to this conclusion since strace was showing a crazy amount of futex syscall and nothing else seems to be the cause.
    
    :pray:
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    (cherry picked from commit ecca5d3)
    cyriltovena authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    e6bddfc View commit details
    Browse the repository at this point in the history
  6. Fixes a race when using specific tenant and multi-client. (#3573)

    * Fixes a race when using specific tenant and multi-client.
    
    This was because each client would try to mutate the original set of labels.
    Instead of cloning the map which can be expensive, I created a little helper that generate the string
    from the labelset without a set of label name.
    
    Fixes #3571
    
    I also added a test to see if this was reproducible and it was indeed:
    
    ```
    ~/go/src/github.com/grafana/loki master*
    ❯ go test -timeout 30s -tags dev,gofuzz -race -run ^TestMultiClient_Handle_Race$ github.com/grafana/loki/pkg/promtail/client -v -count=1 -timeout=0s
    === RUN   TestMultiClient_Handle_Race
    ==================
    WARNING: DATA RACE
    Read at 0x00c0000b77d0 by goroutine 22:
      runtime.mapaccess2_faststr()
          /usr/local/Cellar/go/1.16.2/libexec/src/runtime/map_faststr.go:107 +0x0
      github.com/grafana/loki/pkg/promtail/client.(*client).getTenantID()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:376 +0xcb
      github.com/grafana/loki/pkg/promtail/client.(*client).processEntry()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:407 +0x9a
      github.com/grafana/loki/pkg/promtail/client.(*client).run()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:235 +0x36a
    
    Previous write at 0x00c0000b77d0 by goroutine 21:
      runtime.mapdelete_faststr()
          /usr/local/Cellar/go/1.16.2/libexec/src/runtime/map_faststr.go:297 +0x0
      github.com/grafana/loki/pkg/promtail/client.(*client).processEntry()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:408 +0x144
      github.com/grafana/loki/pkg/promtail/client.(*client).run()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:235 +0x36a
    
    Goroutine 22 (running) created at:
      github.com/grafana/loki/pkg/promtail/client.New()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:198 +0x7dc
      github.com/grafana/loki/pkg/promtail/client.TestMultiClient_Handle_Race()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/multi_test.go:126 +0x2c7
      testing.tRunner()
          /usr/local/Cellar/go/1.16.2/libexec/src/testing/testing.go:1194 +0x202
    
    Goroutine 21 (running) created at:
      github.com/grafana/loki/pkg/promtail/client.New()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/client.go:198 +0x7dc
      github.com/grafana/loki/pkg/promtail/client.TestMultiClient_Handle_Race()
          /Users/ctovena/go/src/github.com/grafana/loki/pkg/promtail/client/multi_test.go:124 +0x187
      testing.tRunner()
          /usr/local/Cellar/go/1.16.2/libexec/src/testing/testing.go:1194 +0x202
    ==================
        testing.go:1093: race detected during execution of test
    --- FAIL: TestMultiClient_Handle_Race (0.00s)
    === CONT
        testing.go:1093: race detected during execution of test
    FAIL
    FAIL	github.com/grafana/loki/pkg/promtail/client	0.022s
    FAIL
    ```
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    
    * don't overload variable name
    
    Co-authored-by: Edward Welch <edward.welch@grafana.com>
    (cherry picked from commit 0107a11)
    cyriltovena authored and slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    a1a9e6b View commit details
    Browse the repository at this point in the history
  7. prep release 2.2.1

    slim-bean committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    babea82 View commit details
    Browse the repository at this point in the history