Avoid passing artifacts `expire_in` to Runner
Summary
We seem to pass artifacts' expire_in
param to the Runner when it requests a new job but I have the feeling the Runner does not do anything with it.
The Runner finally returns it to the server when uploading artifacts and at that point it's used to calculate the expire_at
date.
Improvements
We don't need to pass expire_in
around if it's not used by the Runner. When an artifact is uploaded we can fetch it from the job.options
and apply the correct expiration date without relying on the Runner to send it back.
Also, we can reduce the footprint of what the Runner depends on.
Risks
Asses whether the Runner does anything with expire_in
parameter
Involved components
lib/api/runner.rb
and JobRequest::Artifacts entity.
Optional: Intended side effects
Reduce the data the Runner depends on.