Skip to content

[WIP] Expose request_logs as a read-only subcollection of all request types - #1331

Open
jrafanie wants to merge 1 commit into
ManageIQ:masterfrom
jrafanie:add-request-log-subcollection
Open

[WIP] Expose request_logs as a read-only subcollection of all request types#1331
jrafanie wants to merge 1 commit into
ManageIQ:masterfrom
jrafanie:add-request-log-subcollection

Conversation

@jrafanie

Copy link
Copy Markdown
Member

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.

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.
Comment thread config/api.yml
:klass: AutomationRequest
:subcollections:
- :request_tasks
- :request_logs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetical.

🏃💨

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)>'

@miq-bot miq-bot added the wip label Jun 25, 2026
@miq-bot

miq-bot commented Jun 25, 2026

Copy link
Copy Markdown
Member

Checked commit jrafanie@7e5bd08 with ruby 3.3.10, rubocop 1.86.0, haml-lint 0.73.0, and yamllint 1.37.1
6 files checked, 0 offenses detected
Everything looks fine. 🏆

Comment thread config/api.yml
:subcollection_actions:
:get:
- :name: read
:identifier: miq_request_show

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants