Skip to content

Conversation

@liangxin1300
Copy link
Collaborator

@liangxin1300 liangxin1300 commented Sep 9, 2025

Partly backport from #1824:

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.74%. Comparing base (3e074ee) to head (40fb852).

Files with missing lines Patch % Lines
crmsh/corosync.py 0.00% 1 Missing ⚠️
crmsh/utils.py 96.00% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 54.34% <89.65%> (+0.04%) ⬆️
unit 49.23% <13.79%> (-0.04%) ⬇️

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

Files with missing lines Coverage Δ
crmsh/bootstrap.py 84.80% <100.00%> (ø)
crmsh/ui_cluster.py 72.64% <100.00%> (+0.17%) ⬆️
crmsh/corosync.py 79.78% <0.00%> (ø)
crmsh/utils.py 67.92% <96.00%> (+0.28%) ⬆️

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

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

@liangxin1300 liangxin1300 force-pushed the 20250905_copy_directory branch from 393715b to edf6dc7 Compare September 10, 2025 14:04
@liangxin1300 liangxin1300 changed the title [crmsh-4.6] 20250905 copy directory [crmsh-4.6] support crm cluster copy to copy directory Sep 10, 2025
…mkdir on remote

- Resolve local_path to absolute if necessary.
- Check existence of local_path before operation.
- Determine whether to copy recursively based on path type.
- Use Pathlib for safe path operations.
- Pre-create target directory on remote nodes using 'test -d ... || mkdir -p ...'.
@liangxin1300 liangxin1300 force-pushed the 20250905_copy_directory branch from edf6dc7 to 40fb852 Compare September 10, 2025 14:10
@liangxin1300 liangxin1300 marked this pull request as ready for review September 10, 2025 14:35
source_path = local_path
parent_path = p.parent
else:
absolute_path = p.resolve()
Copy link
Collaborator

Choose a reason for hiding this comment

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

When p is a symlink /foo/link -> /bar, should we copy the symlink /foo/link or the link target /bar?

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.

2 participants