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

VPA e2e actuation, admission-controller, and updater test suites are failing #5727

Closed
jbartosik opened this issue May 4, 2023 · 6 comments · Fixed by #5738
Closed

VPA e2e actuation, admission-controller, and updater test suites are failing #5727

jbartosik opened this issue May 4, 2023 · 6 comments · Fixed by #5738
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test.

Comments

@jbartosik
Copy link
Collaborator

It seems to me that #5680 that broke VPA e2e tests. @wu0407 can you take a look?

Two PRs labeled VPA merged on that day:

@jbartosik jbartosik added area/vertical-pod-autoscaler kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/bug Categorizes issue or PR as related to a bug. labels May 4, 2023
@jbartosik
Copy link
Collaborator Author

I think the problem is that tests are not creating VPA objects correctly now.

For example while raises request according to container min limit set in LimitRange test case was running I printed VPA it created and it has empty status[1]. But the test is supposed to set a recommendation (here).

It looks like after #5680 we can't set status like we used to. I think we should fix our e2e and mention that the change is breaking this way too but we might have to revert it.

@wu0407 can you fix those tests?

@mwielgus @kgolab what do you think?

[1]

$ kubectl get vpa --all-namespaces
NAMESPACE                       NAME          MODE   CPU   MEM   PROVIDED   AGE
vertical-pod-autoscaling-9363   hamster-vpa   Auto                          119s
jbartosik-macbookpro:~ jbartosik$ kubectl get vpa --all-namespaces -oyaml
apiVersion: v1
items:
- apiVersion: autoscaling.k8s.io/v1
  kind: VerticalPodAutoscaler
  metadata:
    creationTimestamp: "2023-05-08T12:31:57Z"
    generation: 1
    name: hamster-vpa
    namespace: vertical-pod-autoscaling-9363
    resourceVersion: "17919"
    uid: 3387c7dd-81e4-4909-9217-c367ada9b04d
  spec:
    resourcePolicy: {}
    targetRef:
      apiVersion: apps/v1
      kind: Deployment
      name: hamster-deployment
    updatePolicy:
      updateMode: Auto
kind: List
metadata:
  resourceVersion: ""

@voelzmo
Copy link
Contributor

voelzmo commented May 8, 2023

Wait, isn't raises request according to container min limit set in LimitRange only deploying an admission-controller and no recommender at all? How could the VPAs status be updated in a test like this?

@jbartosik
Copy link
Collaborator Author

jbartosik commented May 8, 2023

@voelzmo the test is setting recommendation (here). That's why we don't want recommender running in those tests. We don't want recommendations written by the recommender, we want recommendations written by the test scenario.

EDIT: it seems to me that recommender was writing recommendations successfully, tests scenarios where we expected recommender to write a recommendation were passing. Tests where we wanted test scenario, not recommender, to write a recommendation were failing.

@jbartosik
Copy link
Collaborator Author

vpa-actuation, vpa-admission-controller, and vpa-updater tests passed after the revert PR merged.

@wu0407
Copy link
Contributor

wu0407 commented May 9, 2023

I will fix that

@voelzmo
Copy link
Contributor

voelzmo commented May 9, 2023

Ah, I see, that makes sense! When reviewing the PR, I didn't run the e2e tests (which in hindsight I probably should have), but checked that VPA works for a deployed example workload  – and that succeeded.
So this is about also allowing the test setup to set the VPA's status correctly, the VPA was working correctly (mostly?).

I think there's a few places where updating the status is currently ignored, like patching recommendations in v1beta2 and in v1 and in places where we upload an entire VPA with spec and status together, like the one you linked

Thanks for taking care of it, @wu0407!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertical-pod-autoscaler kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants