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

ci: Improve TestValidateState calls from load package #2484

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

jpayne3506
Copy link
Contributor

Reason for Change:

TestValidateState() would allow the test to proceed even if there were no pods scheduled on the cluster causing unnecessary failures within make test-load calls.

Issue Fixed:

Requirements:

Notes:

@jpayne3506 jpayne3506 added the ci Infra or tooling. label Jan 8, 2024
@jpayne3506 jpayne3506 self-assigned this Jan 8, 2024
@jpayne3506 jpayne3506 requested a review from a team as a code owner January 8, 2024 20:39
@jpayne3506 jpayne3506 requested a review from jc2543 January 8, 2024 20:39
@jpayne3506 jpayne3506 enabled auto-merge January 10, 2024 23:43
@@ -218,8 +260,9 @@ func TestValidCNSStateDuringScaleAndCNSRestartToTriggerDropgzInstall(t *testing.
require.NoError(t, err)

// Validate the CNS state
err = validator.Validate(ctx)
require.NoError(t, err)
if testConfig.ValidateStateFile {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be validating the state even if ValidateStateFile is not provided ? Iine 219 mentioned that ValidateStateFile provides an option to validate state before other operations. How will we differentiate if we just want to test state after the scale/restart option.

Copy link
Contributor Author

@jpayne3506 jpayne3506 Jan 11, 2024

Choose a reason for hiding this comment

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

Thanks for catching this. We should be validating here no matter what. Otherwise the test is not complete.

Comment on lines +157 to +161
if replicas < int32(nodeCount) {
t.Logf("Warning - current replica count %v is below current %s node count of %d. Raising replicas to minimum required to ensure there is a pod on every node.", replicas, testConfig.OSType, nodeCount)
replicas = int32(nodeCount * 2)
kubernetes.MustScaleDeployment(ctx, deploymentsClient, deployment, clientset, namespace, podLabelSelector, int(replicas), false)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is possible only when deployment already exists right ? Should it be inside the else statement ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The if/else block between 139-155 ensures that there will be a load-test deployment

@jpayne3506 jpayne3506 added this pull request to the merge queue Jan 12, 2024
Merged via the queue into master with commit f0a0a20 Jan 12, 2024
@jpayne3506 jpayne3506 deleted the jpayne3506/testvalidate branch January 12, 2024 22:25
paulyufan2 pushed a commit that referenced this pull request Jan 15, 2024
* ci: improve TestValidateState

* chore: address comments
MikeZappa87 added a commit that referenced this pull request Jan 16, 2024
deps: bump github.com/spf13/viper from 1.16.0 to 1.18.2 (#2495)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.16.0 to 1.18.2.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.16.0...v1.18.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

change config to be uniform

ci: increase dependabot PR limit to 10 (#2497)

ci: constrain cilium to linux on Release Test Pipeline (#2489)

ci: constrain cilium to linux

ci: Improve CNI|NPM integration test (#2498)

* ci: increase timeout for CNI|NPM intergration test

* add: retry to generate NPM logs

deps: bump golang.org/x/sys from 0.15.0 to 0.16.0 (#2500)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.16.0.
- [Commits](golang/sys@v0.15.0...v0.16.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump github.com/prometheus/client_golang from 1.16.0 to 1.18.0 (#2501)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.16.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump google.golang.org/protobuf from 1.31.0 to 1.32.0 (#2502)

Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump golang.org/x/crypto from 0.17.0 to 0.18.0 (#2492)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0.
- [Commits](golang/crypto@v0.17.0...v0.18.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump k8s.io/klog/v2 from 2.110.1 to 2.120.0 (#2503)

Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.110.1 to 2.120.0.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](kubernetes/klog@v2.110.1...v2.120.0)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

ci: verbose output for make test-load  (#2481)

ci: make test-load verbose output

fix review comments

deps: bump google.golang.org/grpc from 1.59.0 to 1.60.1 (#2494)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.59.0 to 1.60.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.59.0...v1.60.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

ci: add OS scale timeout (#2490)

ci: add kubeproxy restart before windows k8s conformance testing (#2496)

* ci: ensure kubeproxy is running on windows

* ci: add set -e

Signed-off-by: John Payne <[email protected]>

---------

Signed-off-by: John Payne <[email protected]>

ci: Improve TestValidateState calls from load package (#2484)

* ci: improve TestValidateState

* chore: address comments

fix: joining multiple dns server lists (#2506)

* fix: joining multiple dns server lists

* address comments

* add 0 check

fix: downgrade k8s components to 1.28 (#2505)

Signed-off-by: GitHub <[email protected]>
MikeZappa87 added a commit that referenced this pull request Jan 16, 2024
deps: bump github.com/spf13/viper from 1.16.0 to 1.18.2 (#2495)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.16.0 to 1.18.2.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.16.0...v1.18.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

change config to be uniform

ci: increase dependabot PR limit to 10 (#2497)

ci: constrain cilium to linux on Release Test Pipeline (#2489)

ci: constrain cilium to linux

ci: Improve CNI|NPM integration test (#2498)

* ci: increase timeout for CNI|NPM intergration test

* add: retry to generate NPM logs

deps: bump golang.org/x/sys from 0.15.0 to 0.16.0 (#2500)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.16.0.
- [Commits](golang/sys@v0.15.0...v0.16.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump github.com/prometheus/client_golang from 1.16.0 to 1.18.0 (#2501)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.16.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump google.golang.org/protobuf from 1.31.0 to 1.32.0 (#2502)

Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump golang.org/x/crypto from 0.17.0 to 0.18.0 (#2492)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0.
- [Commits](golang/crypto@v0.17.0...v0.18.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

deps: bump k8s.io/klog/v2 from 2.110.1 to 2.120.0 (#2503)

Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.110.1 to 2.120.0.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](kubernetes/klog@v2.110.1...v2.120.0)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

ci: verbose output for make test-load  (#2481)

ci: make test-load verbose output

fix review comments

deps: bump google.golang.org/grpc from 1.59.0 to 1.60.1 (#2494)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.59.0 to 1.60.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.59.0...v1.60.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

ci: add OS scale timeout (#2490)

ci: add kubeproxy restart before windows k8s conformance testing (#2496)

* ci: ensure kubeproxy is running on windows

* ci: add set -e

Signed-off-by: John Payne <[email protected]>

---------

Signed-off-by: John Payne <[email protected]>

ci: Improve TestValidateState calls from load package (#2484)

* ci: improve TestValidateState

* chore: address comments

fix: joining multiple dns server lists (#2506)

* fix: joining multiple dns server lists

* address comments

* add 0 check

fix: downgrade k8s components to 1.28 (#2505)

Signed-off-by: GitHub <[email protected]>
matmerr pushed a commit that referenced this pull request Jan 17, 2024
* ci: improve TestValidateState

* chore: address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Infra or tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants