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: prometheus/prometheus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.300.0
Choose a base ref
...
head repository: prometheus/prometheus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.300.1
Choose a head ref
  • 9 commits
  • 19 files changed
  • 8 contributors

Commits on Nov 21, 2024

  1. promql: Fix subqueries to be really left-open

    Previously, we managed to get rid of the sample on the left bound
    later, so the problem didn't show up in the framework tests. But the
    subqueries were still evaluation with the sample on the left bound,
    taking space and showing up if returning the subquery result directly
    (without further processing through PromQL like in all the framework
    tests).
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    4b573e0 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #15431 from prometheus/beorn7/promql2

    promql: Fix subqueries to be really left-open
    beorn7 authored Nov 21, 2024
    Configuration menu
    Copy the full SHA
    bafb4d6 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2024

  1. fix!: stop unbounded memory usage from query log

    Resolves: #15433
    
    When I converted prometheus to use slog in #14906, I update both the
    `QueryLogger` interface, as well as how the log calls to the
    `QueryLogger` were built up in `promql.Engine.exec()`. The backing
    logger for the `QueryLogger` in the engine is a
    `util/logging.JSONFileLogger`, and it's implementation of the `With()`
    method updates the logger the logger in place with the new keyvals added
    onto the underlying slog.Logger, which means they get inherited onto
    everything after. All subsequent calls to `With()`, even in later
    queries, would continue to then append on more and more keyvals for the
    various params and fields built up in the logger. In turn, this causes
    unbounded growth of the logger, leading to increased memory usage, and
    in at least one report was the likely cause of an OOM kill. More
    information can be found in the issue and the linked slack thread.
    
    This commit does a few things:
    
    - It was referenced in feedback in #14906 that it would've been better
      to not change the `QueryLogger` interface if possible, this PR
    proposes changes that bring it closer to alignment with the pre-3.0
    `QueryLogger` interface contract
    - reverts `promql.Engine.exec()`'s usage of the query logger to the
      pattern of building up an array of args to pass at once to the end log
    call. Avoiding the repetitious calls to `.With()` are what resolve the
    issue with the logger growth/memory usage.
    - updates the scrape failure logger to use the update `QueryLogger`
      methods in the contract.
    - updates tests accordingly
    - cleans up unused methods
    
    Builds and passes tests successfully. Tested locally and confirmed I
    could no longer reproduce the issue/it resolved the issue.
    
    Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
    tjhop committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    3e24e84 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2024

  1. Merge pull request #15434 from tjhop/fix/query-logger-compounding-keys

    fix!: stop unbounded memory usage from query log
    bboreham authored Nov 24, 2024
    Configuration menu
    Copy the full SHA
    fee61fb View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2024

  1. Add support for utf8 names on /v1/label/:name/values endpoint

    Previously, the api was evaluating this regex to determine if the label
    name was valid or not:
    
    https://github.com/prometheus/common/blob/14bac55a992f7b83ab9d147a041e274606bdb607/model/labels.go#L94
    
    However, I believe that the `IsValid()` function is what ought to be
    used in the brave new utf8 era.
    
    **Before**
    
    ```
    $ curl localhost:9090/api/v1/label/host.name/values
    {"status":"error","errorType":"bad_data","error":"invalid label name: \"host.name\""}
    ```
    
    **After**
    
    ```
    $ curl localhost:9090/api/v1/label/host.name/values
    {"status":"success","data":["localhost"]}
    ```
    
    It's very likely that I'm missing something here or you were already
    planning to do this at some point but I just encountered this issue and
    figured I'd give it a go.
    
    Signed-off-by: Owen Williams <owen.williams@grafana.com>
    newtonne authored and ywwg committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    8867571 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2024

  1. Add support for values unescaping on /v1/label/:name/values endpoint

    Signed-off-by: Owen Williams <owen.williams@grafana.com>
    ywwg committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    12577e3 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #15399 from prometheus/labels-utf8-fix

    Add support for utf8 names on /v1/label/:name/values endpoint
    jan--f authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    c5c222e View commit details
    Browse the repository at this point in the history
  3. prepare release 3.0.1

    Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
    jan--f committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    67d4be7 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2024

  1. Merge pull request #15478 from jan--f/prep-release-3.0.1

    prepare release 3.0.1
    ArthurSens authored Nov 28, 2024
    Configuration menu
    Copy the full SHA
    1f56e84 View commit details
    Browse the repository at this point in the history
Loading