Skip to content

robustness: save etcd data before validation#21807

Open
henrybear327 wants to merge 1 commit into
etcd-io:mainfrom
henrybear327:robustness/save_before_validation_v2
Open

robustness: save etcd data before validation#21807
henrybear327 wants to merge 1 commit into
etcd-io:mainfrom
henrybear327:robustness/save_before_validation_v2

Conversation

@henrybear327
Copy link
Copy Markdown
Contributor

No description provided.

@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.24%. Comparing base (8ad92a0) to head (826d732).

Additional details and impacted files

see 24 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21807      +/-   ##
==========================================
+ Coverage   70.21%   70.24%   +0.03%     
==========================================
  Files         427      427              
  Lines       35304    35304              
==========================================
+ Hits        24788    24801      +13     
+ Misses       9125     9113      -12     
+ Partials     1391     1390       -1     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ad92a0...826d732. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

if err := r.Report(); err != nil {
t.Error(err)
}
if err := r.Finalize(t.Failed(), panicked); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For future, maybe we could pass t into report and have it register a Cleanup and check t.Failed there. Not sure how to handle panic then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's leave this for discussion in a follow-up PR to keep this one concentrated :)

Comment thread tests/robustness/report/report.go Outdated
Comment thread tests/robustness/report/report.go Outdated
Comment thread tests/robustness/report/report.go Outdated
// the visualization history if the test failed/panicked or if PERSIST_RESULTS is set.
func (r *TestReport) Finalize(tFailed bool, panicked bool) error {
if !r.dataSaved {
return fmt.Errorf("cannot finalize test report: data was not saved")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why? Doesn't just mean that finelize should also save data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As we shift to preserving etcd data before the validation, the Finalize function is meant to first determine if the test report is needed to be saved (either the test failed or we set PERSIST_RESULTS), then save the porcupine visualization (because it doesn't exist before the validation).

Now looking at dataSaved, my original intention was to attempt to preserve as much as we can. So in Finalize, if we deem preserving report is necessary but we don't have one, let's make one final attempt to save the report.

Does this make sense to you?

@henrybear327 henrybear327 force-pushed the robustness/save_before_validation_v2 branch from b5dbdb0 to 8681fc4 Compare May 24, 2026 23:49
@henrybear327 henrybear327 force-pushed the robustness/save_before_validation_v2 branch from 8681fc4 to fa00983 Compare May 25, 2026 00:27
@henrybear327 henrybear327 requested a review from serathius May 25, 2026 00:27
@henrybear327 henrybear327 force-pushed the robustness/save_before_validation_v2 branch from fa00983 to af56f51 Compare May 25, 2026 14:10
Comment thread tests/robustness/report/report.go
Comment thread tests/robustness/report/report.go
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
@henrybear327 henrybear327 force-pushed the robustness/save_before_validation_v2 branch from af56f51 to 826d732 Compare May 25, 2026 15:50
@k8s-ci-robot
Copy link
Copy Markdown

@henrybear327: The following test 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-integration-2-cpu-amd64 826d732 link true /test pull-etcd-integration-2-cpu-amd64

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.

Details

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.

if err = r.Report(); err != nil {
if err = r.SaveEtcdData(); err != nil {
lg.Error("Failed to save traffic generation report", zap.Error(err))
}
Copy link
Copy Markdown
Member

@serathius serathius May 26, 2026

Choose a reason for hiding this comment

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

What about saving visualization in antithesis?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants