-
Notifications
You must be signed in to change notification settings - Fork 176
Inc_backup: minor fix to correct function name #6565
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
base: master
Are you sure you want to change the base?
Conversation
In script a wrong function name write_datas() has been used. The correct one is write_data(). Signed-off-by: meinaLi <[email protected]>
WalkthroughA single test file in incremental backup pull mode over TLS updates a function call inside pull_full_backup_to_file: it now invokes write_data() instead of write_datas() within the with_secret_uuid branch. No other logic, control flow, or public API/signature changes are introduced. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Comment |
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_tls.py (1)
160-164
: Initialize cleanup variables to prevent UnboundLocalError on exceptionsIf an error occurs before
backup_file_path
orsecret_uuid
are assigned (withwith_secret_uuid
true), thefinally
block can raiseUnboundLocalError
.Apply this diff to safely initialize:
qemu_config = LibvirtQemuConfig() disk_obj = disk_base.DiskBase(test, vm, params) tls_obj = None +backup_file_path = None +secret_uuid = None try:
🧹 Nitpick comments (2)
libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_tls.py (2)
165-167
: Unpack prepare_tls_env() return to avoid tuple in tls_obj
prepare_tls_env()
returns(tls_obj, qemu_config)
. Assigning totls_obj
alone stores a tuple and is confusing for lifecycle handling.Apply this diff:
- tls_obj = prepare_tls_env(test, params, qemu_config) + tls_obj, qemu_config = prepare_tls_env(test, params, qemu_config)
203-205
: Guard secret cleanup on presence of secret_uuidAvoid calling
secret_undefine
with a possibly unassigned/None UUID.Apply this diff:
- if with_secret_uuid: - virsh.secret_undefine(secret_uuid, ignore_status=True) - if backup_file_path: - os.remove(backup_file_path) + if with_secret_uuid: + if secret_uuid: + virsh.secret_undefine(secret_uuid, ignore_status=True) + if backup_file_path: + os.remove(backup_file_path)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_tls.py
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Python 3.12
- GitHub Check: Python 3.11
- GitHub Check: Python 3.9
- GitHub Check: Python 3.8
🔇 Additional comments (1)
libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_tls.py (1)
171-174
: write_data() fix — approvedSearch shows all remaining uses of write_datas are in libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_info.py (definition and calls); libvirt/tests/src/incremental_backup/incremental_backup_pull_mode_tls.py defines def write_data() at line 112. No stale references remain.
In script a wrong function name write_datas() has been used. The correct one is write_data().
Summary by CodeRabbit