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

Fix passing compaction-batch-limit to etcd v3.4 and v3.5 #19218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

serathius
Copy link
Member

PR #19196 broke robustness test periodics.

/cc @ahrtr @siyuanfoundation @gangli113

@k8s-ci-robot
Copy link

@serathius: GitHub didn't allow me to request PR reviews from the following users: gangli113.

Note that only etcd-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

PR #19196 broke robustness test periodics.

/cc @ahrtr @siyuanfoundation @gangli113

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
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: serathius

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

The pull request process is described 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

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.84%. Comparing base (9da01a8) to head (b4a0981).
Report is 2 commits behind head on main.

Additional details and impacted files

see 23 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19218      +/-   ##
==========================================
+ Coverage   68.76%   68.84%   +0.08%     
==========================================
  Files         420      420              
  Lines       35638    35650      +12     
==========================================
+ Hits        24506    24543      +37     
+ Misses       9705     9688      -17     
+ Partials     1427     1419       -8     

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 9da01a8...b4a0981. Read the comment docs.

@serathius serathius force-pushed the fix-selecting-experimental-flag branch from 4d0a5fa to 2ac891f Compare January 17, 2025 12:43
server/embed/config.go Outdated Show resolved Hide resolved
server/embed/config.go Outdated Show resolved Hide resolved
@ahrtr
Copy link
Member

ahrtr commented Jan 17, 2025

PR #19196 broke robustness test periodics.

Can we just fix the test (although it isn't clear how it affect the test)? I do not see any issue on the production code in previous PR #19196.

@serathius serathius changed the title Remove experimental flag from embed.Config Move experimental flag from embed.Config to configJSON to normalize the config. Jan 17, 2025
@serathius serathius force-pushed the fix-selecting-experimental-flag branch from 2ac891f to 3824aed Compare January 17, 2025 13:14
@serathius serathius changed the title Move experimental flag from embed.Config to configJSON to normalize the config. Fix passing compaction-batch-limit to etcd v3.4 and v3.5 Jan 17, 2025
@serathius serathius force-pushed the fix-selecting-experimental-flag branch from 3824aed to 4db379d Compare January 17, 2025 13:22
@serathius serathius force-pushed the fix-selecting-experimental-flag branch from 4db379d to bb26c63 Compare January 17, 2025 13:25
tests/framework/e2e/cluster.go Outdated Show resolved Hide resolved
Comment on lines +642 to +641
if flag == "compaction-batch-limit" {
flag = "experimental-compaction-batch-limit"
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if flag == "compaction-batch-limit" {
flag = "experimental-compaction-batch-limit"
}
// To be compatible with 3.4 & 3.5, as they don't have flag `--compaction-batch-limit`.
if flag == "compaction-batch-limit" {
flag = "experimental-compaction-batch-limit"
}

But it's still a little tricky. Starting from 3.7, we will remove the experimental flags. So

  • 3.4 & 3.5 only have the experimental flags
  • 3.6 have both flags
  • 3.7 will only have the non-experimental flags.

So we may need to check the binary version and decide to use which flag. It's better to get them wrapped in a separate function.

Copy link
Member Author

Choose a reason for hiding this comment

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

The upgrade/downgrade robustness test can set this config, but will not update the flags before restart. We would need to rewrite the e2e framework to reload flags from config on every restart.

Copy link
Member

Choose a reason for hiding this comment

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

We would need to rewrite the e2e framework to reload flags from config on every restart.

It seems that we need to reconcile all the config items once we update the binary (i.e. from 3.6 to 3.5, or from 3.5 to 3.6)

Copy link
Contributor

Choose a reason for hiding this comment

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

use the experimentalNonBoolFlagMigrationMap to map the flags in migration for now? It should work before we rewrite the framework functions.

Comment on lines -889 to -891
for _, opt := range opts {
opt(&cfg)
}
Copy link
Member

Choose a reason for hiding this comment

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

are you sure this won't cause any issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't know, but the idea of UpdateProcOptions function is incorrect. We should not reload config like this.

@serathius serathius force-pushed the fix-selecting-experimental-flag branch from bb26c63 to f9e37d2 Compare January 17, 2025 13:45
@serathius serathius force-pushed the fix-selecting-experimental-flag branch from f9e37d2 to b4a0981 Compare January 17, 2025 14:14
@serathius
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link

@serathius: 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-robustness-arm64 b4a0981 link true /test pull-etcd-robustness-arm64

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.

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.

4 participants