opensafely-core / job-server

A server for mediating jobs that can be run in an OpenSAFELY secure environment. q.v. job-runner
https://jobs.opensafely.org
Other
5 stars 11 forks source link

Move a single report from the Reports site to Job Server #3309

Open lucyb opened 1 year ago

lucyb commented 1 year ago

Identify a single report, and with the permission of the owner of that report, move it into Job Server.

We are doing this so that we get a better idea of the work required to move all of the reports and the potential benefits of doing the work.

The report on reports.opensafely.org should not be affected by doing this work.

It should be time-boxed to four days.

Acceptance criteria

ghickman commented 1 year ago

@lucyb – 👍 I'm adding some bits below for future-me.

There's three parts to this:

The final one is the largest part, and comes in two flavours: files hosted on job-server and those hosted on GitHub. I'm going to ignore the GitHub ones for this ticket because several GitHub-hosted ones are older versions of reports currently hosted on job-server and fixing it, if we go this route, requires releasing those files to job-server, while the process for exporting the data should remain much the same.

We can dumpdata on the reports database and mutate the output to match job-server's expected format. jobserver.Report very closely matches report.Report by design to help this very transition. The job-server URLs in report.Report contain PKs for ReleaseFiles which we can turn into FKs.

lucyb commented 1 year ago

I think we're waiting on a report in order to do this, so I'm removing it from the board. We should move it back when we have a report (and some time).