-
Notifications
You must be signed in to change notification settings - Fork 54
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
test(robot): fix pull backup created by another longhorn system test case for v2 volumes #2198
Conversation
…case for v2 volumes by re-setting up v2 environment after reinstallation Signed-off-by: Yang Chiu <[email protected]>
WalkthroughThe pull request introduces modifications to the environment setup process in the Longhorn testing framework. A new keyword Changes
Sequence DiagramsequenceDiagram
participant Test Framework
participant Kubernetes API
participant Control Plane
participant Worker Nodes
participant Backup Store
Test Framework->>Kubernetes API: Initialize API Client
Test Framework->>Control Plane: Configure Network Latency
Test Framework->>Backup Store: Configure Backup Store
Test Framework->>Worker Nodes: Retrieve and Configure Disk Paths
Test Framework->>Test Framework: Run Test Environment
Possibly related PRs
Suggested Reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
e2e/tests/negative/pull_backup_from_another_longhorn.robot (1)
Line range hint
1-96
: Consider adding version compatibility matrix to documentationThe test case validates backup compatibility between different Longhorn versions. Consider enhancing the documentation to include a version compatibility matrix for backups.
Example addition to documentation:
Version Compatibility Matrix for Backups: - Current version can restore backups from: [list compatible versions] - Known limitations: [list any limitations]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
e2e/keywords/common.resource
(2 hunks)e2e/tests/negative/pull_backup_from_another_longhorn.robot
(3 hunks)
🔇 Additional comments (2)
e2e/keywords/common.resource (1)
Line range hint 27-35
: Verify disk paths across different host providers
The implementation handles different disk paths for Harvester (/dev/vdc) and other providers (/dev/xvdh). Please ensure these paths are consistently available across all supported environments.
✅ Verification successful
Disk paths are correctly configured across different providers
The verification shows consistent disk path usage across the codebase:
- AWS environments consistently use
/dev/xvdh
as shown in terraform configurations and provisioning scripts - Harvester environments use
/dev/vdc
as the alternative path - The conditional logic in
common.resource
andk8s.resource
correctly handles both cases
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for other disk path references to ensure consistency
rg -l '(/dev/vdc|/dev/xvdh)' | while read -r file; do
echo "=== $file ==="
rg '(/dev/vdc|/dev/xvdh)' "$file"
done
Length of output: 16185
e2e/tests/negative/pull_backup_from_another_longhorn.robot (1)
62-62
: LGTM! Consistent v2 environment setup after each installation
The "Set up v2 environment" step is correctly placed after each Longhorn installation (current and stable versions), ensuring proper v2 volume support for backup operations.
Also applies to: 76-76, 90-90
Set test environment | ||
init_k8s_api_client | ||
setup_control_plane_network_latency | ||
set_backupstore | ||
set_up_v2_environment | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in function call
There's a typo in the function call on line 40:
- set_up_v2_environment
+ Set up v2 environment
The function name should match the keyword definition above (using spaces instead of underscores).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Set test environment | |
init_k8s_api_client | |
setup_control_plane_network_latency | |
set_backupstore | |
set_up_v2_environment | |
Set test environment | |
init_k8s_api_client | |
setup_control_plane_network_latency | |
set_backupstore | |
Set up v2 environment | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Which issue(s) this PR fixes:
Issue longhorn/longhorn#10001
What this PR does / why we need it:
fix pull backup created by another longhorn system test case for v2 volumes by re-setting up v2 environment after reinstallation
Special notes for your reviewer:
Additional documentation or context
Summary by CodeRabbit
New Features
Bug Fixes
Documentation