-
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): add test strict local volume disabled revision conuter by default #2080
Conversation
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, few minor comments.
Also, do we want to add the test skeleton also for longhorn/longhorn#9279 (comment)?
@@ -9,7 +9,7 @@ class CRD(Base): | |||
def __init__(self): | |||
self.obj_api = client.CustomObjectsApi() | |||
|
|||
def get_engines(self, volume_name, node_name): | |||
def get_engines(self, volume_name, node_name=None): | |||
if volume_name == "" or node_name == "": |
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.
If condition should be based on node_name None
@@ -283,9 +283,7 @@ def create_persistentvolumeclaim_for_volume(self, volume_name, retry=True): | |||
|
|||
def record_volume_replica_names(self, volume_name): | |||
replica_list = self.replica.get(volume_name, node_name="") | |||
assert replica_list != "", f"failed to get replicas" |
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.
What's the reason of removing it?
@@ -283,9 +283,7 @@ def create_persistentvolumeclaim_for_volume(self, volume_name, retry=True): | |||
|
|||
def record_volume_replica_names(self, volume_name): | |||
replica_list = self.replica.get(volume_name, node_name="") |
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.
Do we want to replace node_name="" to node_name=None?
@@ -296,12 +294,13 @@ def check_volume_replica_names_recorded(self, volume_name): | |||
expected_replica_names = sorted(replica_names_str.split(",")) | |||
|
|||
replica_list = self.replica.get(volume_name, node_name="") |
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.
Same as above node_name
40aa942
to
c2871b2
Compare
4a96ece
to
fea63ff
Compare
@@ -495,3 +497,7 @@ def upgrade_engine_image(self, volume_name, engine_image_name): | |||
|
|||
def wait_for_engine_image_upgrade_completed(self, volume_name, engine_image_name): | |||
return Rest(self.node_exec).wait_for_engine_image_upgrade_completed(volume_name, engine_image_name) | |||
def validate_volume_setting(self, volume_name, setting_name, value): |
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.
Add an extra line of separation in the function.
@@ -33,10 +33,7 @@ def delete(self, volume_name, node_name): | |||
logging( | |||
f"Deleting volume {volume_name} on node {node_name} replicas") | |||
|
|||
resp = self.get(volume_name, node_name) | |||
assert resp != "", f"failed to get replicas" |
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.
Regarding the removal of assert resp != "", f"failed to get replicas"
, could you explain the main reasoning behind removing this step? I don't quite understand it.
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 from my side.
@roger-ryao has few questions.
…y default Signed-off-by: Yang Chiu <[email protected]>
@roger-ryao Could you take a look whenever get a chance? |
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, but I noticed that @khushboo-rancher and I have similar questions. If possible, could you also explain the reason for removing these two sections, so we can understand more?
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces multiple enhancements across various resource files and libraries related to end-to-end (e2e) testing for volume management, engine settings, and replica configurations. Key changes include the addition of new keywords for validating and managing settings, the introduction of a cleanup functionality, and modifications to existing methods to accommodate new parameters. Additionally, new test cases have been added to ensure comprehensive testing of the updated functionalities. Changes
Assessment against linked issues
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 (
|
Which issue(s) this PR fixes:
Issue longhorn/longhorn#9318
What this PR does / why we need it:
add test strict local volume disabled revision conuter by default
Special notes for your reviewer:
Additional documentation or context
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation