[WIP] Expose request_logs as a read-only subcollection of all request types - #1331
Open
jrafanie wants to merge 1 commit into
Open
[WIP] Expose request_logs as a read-only subcollection of all request types#1331jrafanie wants to merge 1 commit into
jrafanie wants to merge 1 commit into
Conversation
Request logs were already being tracked per-request in the database but were not exposed through the API. This changes makes them accessible without introducing new RBAC complexity - if a user can view the request, they can view its logs. The subcollection reuses the miq_request_show identifier so no new product features need to be defined or granted. The same pattern is applied across all four request collections (requests, service_requests, provision_requests, and automation_requests) for consistency.
Fryguy
reviewed
Jun 25, 2026
| :klass: AutomationRequest | ||
| :subcollections: | ||
| - :request_tasks | ||
| - :request_logs |
Member
Author
There was a problem hiding this comment.
OH, we added @Fryguy as a test
1) API configuration (config/api.yml) collections is sorted a-z
Failure/Error: expect(actual).to eq(expected)
expected: [:accounts, :actions, :alert_actions, :alert_definition_profiles, :alert_definitions, :alerts, :auth,...mplates, :tenant_groups, :tenants, :time_profiles, :users, :vms, :volume_mappings, :widgets, :zones]
got: [:accounts, :actions, :alert_actions, :alert_definition_profiles, :alert_definitions, :alerts, :auth,...mplates, :tenant_groups, :tenants, :time_profiles, :users, :vms, :volume_mappings, :widgets, :zones]
(compared using ==)
Diff:
@@ -106,8 +106,8 @@
:rates,
:regions,
:reports,
- :request_logs,
:request_tasks,
+ :request_logs,
:requests,
:resource_actions,
:resource_pools,
# ./spec/lib/api/api_config_spec.rb:10:in `block (3 levels) in <top (required)>'
Member
|
Checked commit jrafanie@7e5bd08 with ruby 3.3.10, rubocop 1.86.0, haml-lint 0.73.0, and yamllint 1.37.1 |
jrafanie
commented
Jul 1, 2026
| :subcollection_actions: | ||
| :get: | ||
| - :name: read | ||
| :identifier: miq_request_show |
Member
Author
There was a problem hiding this comment.
I need to double check what the classic UI and (if the service UI has it, which it might not) uses in order to determine who can see request logs... the current logic is to show request logs for people who can see the request.
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.
Request logs were already being tracked per-request in the database but were
not exposed through the API. This changes makes them accessible without
introducing new RBAC complexity - if a user can view the request, they can
view its logs.
The subcollection reuses the miq_request_show identifier so no new product
features need to be defined or granted. The same pattern is applied across
all four request collections (requests, service_requests, provision_requests,
and automation_requests) for consistency.