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

Require prometheus storage to init history and add option to explicitly not use history storage #6054

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

Conversation

Evedel
Copy link

@Evedel Evedel commented Aug 22, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

It will allow to run VPA explicitly without history initialisation, but also will make it compulsory to initialise history if prometheus is a provider.

Which issue(s) this PR fixes:

Fixes #6050

Special notes for your reviewer:

Please see the bug/issue description detailed in #6050

Does this PR introduce a user-facing change?

No

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

No

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 22, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 22, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 22, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @Evedel!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 22, 2023
@Evedel Evedel force-pushed the add-strict-mode-to-force-retries-during-prometheus-history-loading branch from 783802c to e90294c Compare August 22, 2023 09:00
@Evedel Evedel changed the title Add strict mode to force retries during prometheus history loading Require prometheus to init history and add option to explicitly not use history storage Aug 22, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 22, 2023
@Evedel Evedel changed the title Require prometheus to init history and add option to explicitly not use history storage Require prometheus storage to init history and add option to explicitly not use history storage Aug 22, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 23, 2023
@Evedel Evedel force-pushed the add-strict-mode-to-force-retries-during-prometheus-history-loading branch from 1b14567 to dc3ee8c Compare August 23, 2023 11:33
@Evedel Evedel requested a review from mwielgus August 31, 2023 13:47
Copy link

@sophieliu15 sophieliu15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

vertical-pod-autoscaler/pkg/recommender/main.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 28, 2023
if len(clusterHistory) == 0 {
klog.Warningf("history provider returned no pods")
Copy link
Author

@Evedel Evedel Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This potentially could also be an error/restart, but some (valid?) cases are possible, so leaving with a warning for now.

As for the error cases, at the moment --metric-for-pod-labels=up{job=\"kubernetes-pods\"}, if prom is not configured to have a given pair of job/metric, the query will not return any results, so history will not be used (and users won't be notified about the misconfiguration either)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case does not seem to be treated differently (e.g., issue warning logs) before this PR. Is anything changed in this PR that make this case special? Or you just hope to add a log for this case?

Copy link
Author

@Evedel Evedel Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this behaviour is preexisting to PR. (also it can be a valid behaviour, say when a user specified the metric filter to target a subset of pods, but no such pods existed in the required history window).

Adding warning here just in case when this behaviour is not intentional, so it is easier to uncover a misconfiguration, for example when it could have been handy please see #6221 and #5031 (comment).

@Evedel Evedel force-pushed the add-strict-mode-to-force-retries-during-prometheus-history-loading branch 2 times, most recently from a4fd9dd to 6d0f2d6 Compare October 28, 2023 12:26
@Evedel Evedel force-pushed the add-strict-mode-to-force-retries-during-prometheus-history-loading branch from 6d0f2d6 to 8d1573a Compare October 28, 2023 12:27
@Evedel Evedel requested a review from jbartosik October 28, 2023 12:47
@sophieliu15
Copy link

@kwiesmueller Could you do a final round of review and approve if it looks good to you?
cc: @laoj2

Copy link
Member

@kwiesmueller kwiesmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2023
@ben-bertrands-hs
Copy link

Hi, Can this be merged in?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 28, 2024
@Evedel
Copy link
Author

Evedel commented Apr 30, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 30, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Evedel
Once this PR has been reviewed and has the lgtm label, please assign voelzmo for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@Evedel Evedel force-pushed the add-strict-mode-to-force-retries-during-prometheus-history-loading branch from 39e42f5 to a301cc7 Compare August 7, 2024 00:55
@Evedel
Copy link
Author

Evedel commented Aug 7, 2024

Any chance someone can have a look please?

@jbartosik
@kgolab
@mwielgus
@kwiesmueller
@sophieliu15

@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timing issue when loading history from AWS AMP
8 participants