Skip to content

Conversation

nwnt
Copy link
Member

@nwnt nwnt commented Sep 15, 2025

I'm keeping this simple for now by assuming a fixed number of replicas and assuming the etcd data volumes are known beforehand. I have a somewhat working code that can deal with dynamic etcd replicas, but I'll add that once we make this work on antithesis.

@serathius

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@nwnt
Copy link
Member Author

nwnt commented Sep 15, 2025

Also, what I didn't include in this PR was also my refactoring of how the current docker-compose setup handles the node count. Instead of making that configuration takes place at build time (with -X main.NodeCount), it should be configurable at runtime via an environment variable. I may send a PR later to take care of that, but it's not in scope for this one.

@nwnt nwnt force-pushed the k8s-antithesis-client branch 4 times, most recently from 1fbe07e to 6a2985d Compare September 15, 2025 02:52
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.14%. Comparing base (2ea4aef) to head (641f796).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

see 14 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #20668      +/-   ##
==========================================
- Coverage   69.16%   69.14%   -0.03%     
==========================================
  Files         420      420              
  Lines       34794    34794              
==========================================
- Hits        24065    24058       -7     
- Misses       9334     9337       +3     
- Partials     1395     1399       +4     

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 2ea4aef...641f796. Read the comment docs.

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

- '${GROUP_ID:-root}'
volumes:
- ${ETCD_ROBUSTNESS_DATA_PATH:-/tmp/etcddata}0:/var/etcddata0
- ${ETCD_ROBUSTNESS_LOCAL_DATA_PATH:-/tmp/etcddata}0:/var/etcddata0
Copy link
Member

Choose a reason for hiding this comment

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

What's the value of this rename? This only complicates the review. Please move it to separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

See below. It's for distinguishing the existing local data path and all paths.

mountPath: /var/etcddata-1
- name: etcd-2
mountPath: /var/etcddata-2
- name: report
Copy link
Member

Choose a reason for hiding this comment

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

Why not use hostvolume for report? What's the benefit of PVC here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking it might be better to keep things consistent than mixing between hostPath and PVC. Let me know if you want it to be hostPath instead.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer clear and understandable. While we need to use PVCs for etcd as there are 3 replicas, I don't see a reason why we cannot have a static path for client report.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to hostPath for report now.

It should show something like:

```
```bash
Copy link
Member

Choose a reason for hiding this comment

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

Please avoid random changes unrelated to the task. They can be done in separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Normally I would. I got a linting error from the checks and it said I needed to address this, that's why it's here.

Copy link
Member

Choose a reason for hiding this comment

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

Still please send a separate PR as it can get merged in seconds.

Copy link
Member Author

@nwnt nwnt Sep 15, 2025

Choose a reason for hiding this comment

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

Yep, here you go.

#20671

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed these changes from the current PR.

localReportPath = "report"

serverEndpointEnv = "ETCD_ROBUSTNESS_SERVER_ENDPOINTS"
dataPathEnv = "ETCD_ROBUSTNESS_DATA_PATHS"
Copy link
Member

Choose a reason for hiding this comment

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

What's the benefit of separating ETCD_ROBUSTNESS_DATA_PATH and ETCD_ROBUSTNESS_LOCAL_DATA_PATH? From binary point of view both are local.

Copy link
Member Author

Choose a reason for hiding this comment

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

How the existing local data path is used is different from the new one. The existing one takes a path (more like a prefix) and then add counts to it. The new one no longer assumes such patterns and requires that all paths are provided as a comma separated value.

Also, I do not want to rework how the existing data path works in this PR to keep things simple. I can send a follow up PR to refactor and consolidate them.

Copy link
Member

@serathius serathius Sep 15, 2025

Choose a reason for hiding this comment

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

We should avoid over-complicating the existing code, especially avoid introducing two mechanism for the same thing. If the PR is too complicated it means it should be split.

Copy link
Member Author

@nwnt nwnt Sep 16, 2025

Choose a reason for hiding this comment

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

Will be reworking how the existing code currently handles the paths it uses as I mentioned here then. Right now all the paths are baked into the code. I will be sending a PR for that change before continuing this one.

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