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

Align etcd-snapshot-dir default path description #11571

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

majabojarska
Copy link
Contributor

@majabojarska majabojarska commented Jan 11, 2025

Proposed Changes

The CLI documentation (i.e. --help output) should be a reliable source of truth for the end user. This PR ensures that the default etcd snapshot location matches the expectations that are being set by the CLI. It updates the --etcd-snapshot-dir option's description to match the effective default snapshot path (one that will be used by the server).

Types of Changes

Bugfix, a simple update to the --etcd-snapshot-dir option descriptions for the server and etcd-snapshot commands.

Verification

This section is mostly based on the reproduction steps from #11570

  1. Run k3s server --help | grep '\-dir'.
  2. Ensure the reported default value for --etcd-snapshot-dir matches ${data-dir}/server/db/snapshots. That's been confirmed to be the actual path in the issue's analysis.
  3. Run k3s etcd-snapshot --help | grep '\-dir'.
  4. Repeat step 2.

Testing

Test coverage updates are not applicable to this PR, since it introduces no changes to the logic.

Linked Issues

#11570

User-Facing Change

Align the CLI-reported default `--etcd-snapshot-dir` value with the actual one (`server`, `etcd-snapshot` commands).

Further Comments

No further comments.

The effective snapshot dir is "${data-dir}/server/db/snapshots". The
server segment is missing in the CLI-reported default path, potentially
misleading the user about the actual default snapshot destination.

Signed-off-by: Maja Bojarska <[email protected]>
@majabojarska majabojarska requested a review from a team as a code owner January 11, 2025 17:20
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.80%. Comparing base (6b0247f) to head (8f2db0f).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11571      +/-   ##
==========================================
- Coverage   50.01%   47.80%   -2.22%     
==========================================
  Files         185      185              
  Lines       19265    19265              
==========================================
- Hits         9635     9209     -426     
- Misses       8236     8727     +491     
+ Partials     1394     1329      -65     
Flag Coverage Δ
e2etests 40.59% <ø> (-3.70%) ⬇️
inttests 35.11% <ø> (-0.03%) ⬇️
unittests 17.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond merged commit 646e313 into k3s-io:master Jan 13, 2025
39 checks passed
@majabojarska majabojarska deleted the docs/default-snapshot-dir branch January 13, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants