refactor(local-libvirt): use the local operation in external_boot_authority._commit

Open Beginner friendly
#3,592 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
84/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Read src/kdive/providers/local_libvirt/external_boot_authority.py around _commit lines 603–609 and compare the neighbouring guards. Change the guard to use the local operation, then run the existing test suite; done when _commit uses one name for the operation in those checks.

Written by the indexing model from the issue text.

Description

area:providers effort:S priority:P3 risk:night-safe status:ready type:refactor

Problem

In _commit, one guard reads request.operation while the neighbouring guard and the rest of the function use the local operation that commit obtained from _require_permitted_commit_point. _require_permitted_commit_point ties the two together (src/kdive/providers/local_libvirt/external_boot_authority.py:~521-524), so today they are equal; the mix invites divergence.

Evidence

(Line numbers moved from ~574.)

  • src/kdive/providers/local_libvirt/external_boot_authority.py:603-607: allow_cleanup_receipt=operation in _DELETING_OPERATIONS then request.operation in _DELETING_OPERATIONS two lines later; :609 uses operation.
  • Same file :725-735 (_observe) uses request.operation throughout, correctly, because it has no local.

Expected

_commit uses one name for the operation.

Proposed approach

Change request.operation to operation at :607. One line; no test needed beyond the existing suite.

Provenance

Follow-up from campaign 4c2c8dc9e59d-7f9a87f5-2251-458a-bb30-04fbb2d4b05c.

Dominant language
Python
Stars
0
Forks
0
Avg merge
9h 13m
Merged PRs (30d)
197

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from randomparity/kdive

All issues in randomparity/kdive

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.