Skip to content

Fix get_owner to fall back to requester_group when owner_group is absent - #24002

Merged
agrare merged 1 commit into
ManageIQ:masterfrom
jrafanie:fix-vm-provisioning-owning-group
Oct 17, 2026
Merged

agrare merged 1 commit into
ManageIQ:masterfrom
jrafanie:fix-vm-provisioning-owning-group

Conversation

@jrafanie

@jrafanie jrafanie commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

A user can switch their active group between submitting a provisioning
request and the time the worker runs. When that happens, vm.miq_group
should reflect the group that was active at request time, not whatever
the DB says when the task executes.

set_request_values always stamps requester_group on new requests, making
it the authoritative record of the request-time group. get_owner already
uses owner_group for the same purpose when present, but had no fallback
when it was absent -- leaving set_ownership to silently use
user.current_group from the live DB.

Using requester_group as the fallback closes that gap.

CP4AIOPS-37102

@jrafanie
jrafanie requested review from Fryguy and agrare as code owners October 7, 2026 19:44
@miq-bot miq-bot removed the wip label Oct 9, 2026
@Fryguy Fryguy changed the title [WIP ] Fix vm provisioning owning group bug [WIP] Fix vm provisioning owning group bug Oct 14, 2026
@Fryguy Fryguy added the wip label Oct 14, 2026
A user can switch their active group between submitting a provisioning
request and the time the worker runs. When that happens, vm.miq_group
should reflect the group that was active at request time, not whatever
the DB says when the task executes.

set_request_values always stamps requester_group on new requests, making
it the authoritative record of the request-time group. get_owner already
uses owner_group for the same purpose when present, but had no fallback
when it was absent -- leaving set_ownership to silently use
user.current_group from the live DB.

Using requester_group as the fallback closes that gap.

CP4AIOPS-37102
@jrafanie
jrafanie force-pushed the fix-vm-provisioning-owning-group branch from 789e196 to e2bb25a Compare October 16, 2026 20:29
@jrafanie jrafanie changed the title [WIP] Fix vm provisioning owning group bug [WIP] Fix get_owner to fall back to requester_group when owner_group is absent Oct 16, 2026
@jrafanie jrafanie removed the wip label Oct 16, 2026
@jrafanie jrafanie changed the title [WIP] Fix get_owner to fall back to requester_group when owner_group is absent Fix get_owner to fall back to requester_group when owner_group is absent Oct 16, 2026
@miq-bot

miq-bot commented Oct 16, 2026

Copy link
Copy Markdown
Member

Checked commit jrafanie@e2bb25a with ruby 3.3.12, rubocop 1.91.0, haml-lint 0.78.0, and yamllint 1.37.1
3 files checked, 0 offenses detected
Everything looks fine. 🍰

@Fryguy

Fryguy commented Oct 16, 2026

Copy link
Copy Markdown
Member

@agrare Please review.

@agrare
agrare merged commit 7a0171b into ManageIQ:master Oct 17, 2026
6 checks passed
@Fryguy

Fryguy commented Oct 19, 2026

Copy link
Copy Markdown
Member

Backported to tal in commit 7b7007b.

commit 7b7007b93ca402c02bb645567bd72cbdc8089935
Author: Adam Grare <adam@grare.com>
Date:   Sat Oct 17 14:56:55 2026 -0400

    Merge pull request #24002 from jrafanie/fix-vm-provisioning-owning-group
    
    Fix get_owner to fall back to requester_group when owner_group is absent
    
    (cherry picked from commit 7a0171b1b345555b11751093b56c2efc57b4324b)

Fryguy pushed a commit that referenced this pull request Oct 19, 2026
Fix get_owner to fall back to requester_group when owner_group is absent

(cherry picked from commit 7a0171b)
@jrafanie
jrafanie deleted the fix-vm-provisioning-owning-group branch October 23, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants