validate: Refactor linearization handling and visualization in operations.go
Closes #19089
Changes made: Refactored operations.go
- Refactored the
validateLinearizableOperationsAndVisualizefunction - Eliminated the anonymous function for visualization.
- Introduced a Results struct to store
LinearizationInfo,Model, and the logger. - The Results struct simplifies the code by removing the need to pass these components separately.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: VidhuSarwal Once this PR has been reviewed and has the lgtm label, please assign spzala for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Hi @VidhuSarwal. Thanks for your PR.
I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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.
/ok-to-test
High level looks good, just couple of nits.
Tests failed with stderr: robustness/validate/operations.go:36:18: undefined: porcupine.LinearizationInfo
Think you need to upgrade the porcupine version.
updated porcupine to v1.0.0, Made the change in go.mod (bumped the version number) ran go mod tidy and now getting these errors.
test like pull-etcd-e2e-arm64 suggests go.sum entry is missing, but go.sum did make it (evident in changes) so not able to understand what exact issue is. Even manually ran go get github.com/anishathalye/[email protected]
Also one test (robustness) suggests I update the test file to the new return type of ValidateAndReturnVisualize (result struct)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 68.81%. Comparing base (9fa35e5) to head (e451f4f).
:warning: Report is 1382 commits behind head on main.
Additional details and impacted files
see 25 files with indirect coverage changes
@@ Coverage Diff @@
## main #19094 +/- ##
==========================================
- Coverage 68.85% 68.81% -0.04%
==========================================
Files 420 420
Lines 35642 35642
==========================================
- Hits 24541 24527 -14
- Misses 9676 9689 +13
- Partials 1425 1426 +1
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 9fa35e5...e451f4f. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
updated porcupine to v1.0.0, Made the change in go.mod (bumped the version number) ran go mod tidy and now getting these errors.
test like pull-etcd-e2e-arm64 suggests go.sum entry is missing, but go.sum did make it (evident in changes) so not able to understand what exact issue is. Even manually ran
go get github.com/anishathalye/[email protected]Also one test (robustness) suggests I update the test file to the new return type of
ValidateAndReturnVisualize(result struct)
I think main_test.go needs a small update as follows since the return type of ValidateAndReturnVisualize is changed. After applying the following change make test-robustness passed in my local.
git diff
diff --git a/tests/robustness/main_test.go b/tests/robustness/main_test.go
index 32e032838..345fe7957 100644
--- a/tests/robustness/main_test.go
+++ b/tests/robustness/main_test.go
@@ -103,7 +103,7 @@ func testRobustness(ctx context.Context, t *testing.T, lg *zap.Logger, s scenari
client.ValidateGotAtLeastOneProgressNotify(t, r.Client, s.Watch.RequestProgress || watchProgressNotifyEnabled)
}
validateConfig := validate.Config{ExpectRevisionUnique: s.Traffic.ExpectUniqueRevision()}
- r.Visualize = validate.ValidateAndReturnVisualize(t, lg, validateConfig, r.Client, persistedRequests, 5*time.Minute)
+ r.Visualize = validate.ValidateAndReturnVisualize(t, lg, validateConfig, r.Client, persistedRequests, 5*time.Minute).Visualize
panicked = false
}
@VidhuSarwal Can you fix the PR so the test pass?
@VidhuSarwal Can you fix the PR so the test pass?
Sure, Working on it.
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.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
@VidhuSarwal: 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 |
|---|---|---|---|---|
| pull-etcd-verify | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-verify |
| pull-etcd-robustness-arm64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-robustness-arm64 |
| pull-etcd-unit-test-386 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-unit-test-386 |
| pull-etcd-unit-test-arm64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-unit-test-arm64 |
| pull-etcd-unit-test-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-unit-test-amd64 |
| pull-etcd-robustness-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-robustness-amd64 |
| pull-etcd-integration-1-cpu-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-integration-1-cpu-amd64 |
| ci-etcd-robustness-release36-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test ci-etcd-robustness-release36-amd64 |
| ci-etcd-robustness-release35-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test ci-etcd-robustness-release35-amd64 |
| ci-etcd-robustness-release34-amd64 | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test ci-etcd-robustness-release34-amd64 |
| pull-etcd-govulncheck-main | e451f4feb48395cac1a6d2b168e0dff0e659d77e | link | true | /test pull-etcd-govulncheck-main |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.