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

WIP: Bump to Prometheus v3.0.1 #237

Open
wants to merge 773 commits into
base: master
Choose a base branch
from

Conversation

slashpai
Copy link
Member

@slashpai slashpai commented Dec 3, 2024

syncbot update is failing due to merge conflicts hence trying the manual sync.

Same as syncbot steps followed but fixed conflicts manually

git fetch https://github.com/prometheus/prometheus --tags
if ! git merge refs/tags/v2.55.0 --no-edit; then
  git checkout --theirs CHANGELOG.md VERSION go.mod go.sum .golangci.yml (These steps didn't work I manually fixed conflict)
  git checkout --ours 
  git add CHANGELOG.md VERSION go.mod go.sum .golangci.yml 
  git merge --continue
fi
go mod tidy
go mod vendor
# Only compress assets if assets actually changed
# The git diff relies on gits remote naming. The merge-flow checks out
# $downstream as origin at the time of writing this code.
if ! git diff --exit-code origin/master web/ui; then
  make assets-compress
  find web/ui/static -type f -name '*.gz' -exec git add {} \;
  git add web/ui/embed.go
  git diff --cached --exit-code || git commit -s -m "[bot] assets: generate"
fi

if [ -f scripts/rh-manifest.sh ]; then
  bash scripts/rh-manifest.sh
  git add rh-manifest.txt
  git diff --cached --exit-code || git commit -s -m "update rh-manifest.txt"
fi

cc @machine424 @jan--f

mmorel-35 and others added 30 commits October 6, 2024 16:35
…Error()" and "Equal(t, err.Error()" (prometheus#15094)

* fix: use "ErrorContains" or "EqualError" instead of "Contains(t, err.Error()" and "Equal(t, err.Error()"

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@a5ac7e5...d632683)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ules/go.uber.org/automaxprocs-1.6.0

Bump go.uber.org/automaxprocs from 1.5.3 to 1.6.0
* textparse: Refactored benchmark.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Kill sinks, tested, nothing is inlined.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Addressed comments.

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
…rlapping-compaction-flag

Add missing flag storage.tsdb.allow-overlapping-compaction
# Conflicts:
#	scrape/scrape.go
…e name

See Parser.Type() function.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
…ules/google.golang.org/grpc-1.67.1

Bump google.golang.org/grpc from 1.66.0 to 1.67.1
…ules/golang.org/x/tools-0.25.0

Bump golang.org/x/tools from 0.24.0 to 0.25.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…ules/golang.org/x/tools-0.26.0

build(deps): bump golang.org/x/tools from 0.25.0 to 0.26.0
…ules/github.com/gophercloud/gophercloud-1.14.1

Bump github.com/gophercloud/gophercloud from 1.14.0 to 1.14.1
… Units. (prometheus#15095)

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Julien <roidelapluie@o11y.eu>
This unifies the documentation of float literals and time durations
and updates all references to the old definitions.

Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Extracted HTTP client options (e.g., authentication, proxy settings,
TLS configuration, and custom headers) into a dedicated section for
improved clarity and organization. This will centralize all HTTP-related
options from prometheus/common in one place within the documentation.

The remaining HTTP-related settings in sections (e.g. Service Discovery)
will be moved in a follow-up PR to further unify the documentation
structure.

Signed-off-by: Julien <roidelapluie@o11y.eu>
Because we are reimplementing the `IndexReader` to fetch in-order and
out-of-order chunks together, we must reproduce the behaviour of
`Head.indexRange()`, which floors the minimum time queried at `head.MinTime()`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
jan--f and others added 13 commits November 13, 2024 15:41
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
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>
promql: Fix subqueries to be really left-open
Resolves: prometheus#15433

When I converted prometheus to use slog in prometheus#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 prometheus#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>
…unding-keys

fix!: stop unbounded memory usage from query log
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>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
Add support for utf8 names on /v1/label/:name/values endpoint
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
v3.0.1

Signed-off-by: Jayapriya Pai <janantha@redhat.com>
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 3, 2024
Copy link

openshift-ci bot commented Dec 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slashpai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2024
@jan--f
Copy link

jan--f commented Dec 3, 2024

Prometheus 3 brings a new UI, so we'll have to update syncbot and the manual instructions. Looking at the Makefiles build target it runs assets npm_licenses assets-compress plugins before it finally does build-common which is part of our Dockerfile. Those targets should then create the needed ui assets for us.

Signed-off-by: Jayapriya Pai <janantha@redhat.com>
find web/ui/static -type f -name '*.gz' -exec git add {} \;
git add web/ui/embed.go

Signed-off-by: Jayapriya Pai <janantha@redhat.com>
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
@slashpai
Copy link
Member Author

/retest-required

@machine424 machine424 mentioned this pull request Dec 16, 2024
5 tasks
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
Copy link

openshift-ci bot commented Dec 16, 2024

@slashpai: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn d0ae15c link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-agnostic-cmo d0ae15c link true /test e2e-agnostic-cmo
ci/prow/images d0ae15c link true /test images
ci/prow/e2e-aws-ovn d0ae15c link true /test e2e-aws-ovn
ci/prow/common-test d0ae15c link true /test common-test
ci/prow/e2e-aws-ovn-upgrade d0ae15c link true /test e2e-aws-ovn-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.