Skip to content

Remove hardcoded job log endpoint from code

Miguel Rincon requested to merge mrincon-cleanup-rails-path into master

What does this MR do and why?

This change replaces the job log JSON endpoint URL with a path built using rails routes.

This helps ensure that changes in the Rails routes will no cause issues when fetching a job.

Note: Endpoint change

As we would now (correctly) use the path generated by trace_project_job_path to load the log and this route is configured to be json by default, the outgoing request for job logs changes from:

before after
/-/jobs/801/trace.json /-/jobs/801/trace

This doesn't have any material impact on the page, but it may impact some monitoring, if any, on this endpoint, as the URL changes.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Visit any job you have, and ensure both the job log and job information are loaded correctly.
    • We have extensive automated tests for this, so risk is very low.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miguel Rincon

Merge request reports