CLOUDDST-32368 : Fix FBC remove by only passing DB-backed packages to opm registry rm#1312
Open
ashwgit wants to merge 1 commit intorelease-engineering:masterfrom
Open
CLOUDDST-32368 : Fix FBC remove by only passing DB-backed packages to opm registry rm#1312ashwgit wants to merge 1 commit intorelease-engineering:masterfrom
ashwgit wants to merge 1 commit intorelease-engineering:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRestricts FBC operator removal to packages present in the index DB and updates the FBC removal test to assert correct filtering and argument passing to helper functions. Sequence diagram for FBC operator removal using DB-backed operators onlysequenceDiagram
participant HandleRmRequest
participant IndexDB
participant OpmRegistryRmFbc
HandleRmRequest->>IndexDB: query_operators_in_db(operators)
IndexDB-->>HandleRmRequest: operators_in_db
alt operators_in_db not empty
HandleRmRequest->>OpmRegistryRmFbc: opm_registry_rm_fbc(base_dir, from_index_resolved, operators_in_db, index_db_path)
OpmRegistryRmFbc-->>HandleRmRequest: fbc_dir
else operators_in_db empty
HandleRmRequest-->>HandleRmRequest: skip FBC removal (no DB-backed operators)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
handle_rm_request,opm_registry_rm_fbcnow receivesoperators_in_dbwhilerm_operatorsin theset_request_statecall still uses the originaloperatorslist; consider passing the same filtered collection through all downstream calls so external behavior and logs stay consistent with what is actually removed from the DB. - The tests now treat
operatorsas a set (e.g.,mock_voe.return_value = {'some-operator'}and assertingmock_orrfreceives a set); double-check that the production code and any consumers of theoperatorsparameter consistently expect and handle sets rather than lists to avoid subtle type or ordering issues.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `handle_rm_request`, `opm_registry_rm_fbc` now receives `operators_in_db` while `rm_operators` in the `set_request_state` call still uses the original `operators` list; consider passing the same filtered collection through all downstream calls so external behavior and logs stay consistent with what is actually removed from the DB.
- The tests now treat `operators` as a set (e.g., `mock_voe.return_value = {'some-operator'}` and asserting `mock_orrf` receives a set); double-check that the production code and any consumers of the `operators` parameter consistently expect and handle sets rather than lists to avoid subtle type or ordering issues.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
Please |
50775ce to
616384e
Compare
…es in the index.db Only pass operators which are present in db, for removal from db while performing rm operation on fbc operators.
616384e to
5235f6d
Compare
lipoja
approved these changes
Apr 29, 2026
Collaborator
|
/agentic_review |
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
Collaborator
|
/review |
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
opm registry rm failed when the removal list included FBC-only packages
not present in the index.db. This MR patches this bug by only passing operators which are present in DB when trying removing operators from db.
Summary by Sourcery
Filter remove-operator requests so opm registry rm is invoked only with DB-backed packages when handling FBC removals.
Bug Fixes:
Tests: