Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled builds? #672

Open
eitsupi opened this issue Jun 28, 2023 · 6 comments
Open

Scheduled builds? #672

eitsupi opened this issue Jun 28, 2023 · 6 comments
Labels
CI pre-built images Related to pre-built images

Comments

@eitsupi
Copy link
Member

eitsupi commented Jun 28, 2023

I was wondering if we should add a cron trigger to the action to ensure an auto-build of the latest image on a predictable schedule? Maybe once a week? I think it would be nice to ensure that the latest image is a relatively recent build across the board, e.g. that we're not a month behind pulling in patches to security-related libraries that aren't installed in the base image by default, (e.g. network-related libs like openssl / curl). This also serves to keep R packages more up-to-date though that's probably less important.

Originally posted by @cboettig in #668 (comment)

@eitsupi
Copy link
Member Author

eitsupi commented Jun 28, 2023

We used to build every time we updated the Rocker scripts (scripts dir), but this was changed about a year ago in #504 to build only when updating the Dockerfile, as I felt this made too many builds.

I think that building too many times is undesirable in the following points:

  1. Downstream repositories may need to be updated more than necessary due to dependabot, etc.
  2. It is likely to be a waste of capacity.

Docker Official Images are updated when upstream images are updated, etc., and may not be updated as often as once a week.

If we set up a build to happen every Monday, then the next Monday after a new version of R is released we will have a new build in just a few days.
So I strongly oppose builds by cron.

I would not disagree if the job, for example, checked the time elapsed since the last build and triggered a build if more than 30 days had elapsed.

I have read the dependabot source and it seems to use the Docker Registry API.
I have been hesitant to use it because it requires authentication, but I believe it can be used to detect base image updates and elapsed time since the last build.

@eitsupi eitsupi added CI pre-built images Related to pre-built images labels Jun 28, 2023
@cboettig
Copy link
Member

Balancing resource demand on downstream repos and not being headless of resource use are both good points. I do think having some form of automated trigger mechanism would be reasonable though. A cron task in the action seems to me the simplest and the most transparent option (I don't know how to have the Github action detect base image updates).

@cboettig
Copy link
Member

Maybe a monthly tempo would be appropriate?

I'm definitely up for other options, just not sure what they are. I just think when a user looks at the repo builds they should be able to determine when they might expect the next build to happen without needing to open an issue. Of course we can also continue triggering manual builds when necessary to meet needs of downstream repos and users.

@eitsupi
Copy link
Member Author

eitsupi commented Jun 28, 2023

I don't know how to have the Github action detect base image updates

Since ubuntu have tags with the date it was released (like ubuntu:jammy-20230605), the API can detect the last build by retrieving the tag.
https://docs.docker.com/registry/spec/api/

Maybe a monthly tempo would be appropriate?

I think the frequency of once a month is reasonable. The release frequency of ubuntu, the base image, is also almost once a month.

I just think when a user looks at the repo builds they should be able to determine when they might expect the next build to happen without needing to open an issue.

I strongly agree with that (I would have asked you that too), but I feel that the user's interest is mostly in the new R or RStudio and that the other cases may be quite specific.

@jan-abel-inwt
Copy link

Hi there, thank you for your hard work and the excellent R images. Are there any updates on the scheduled builds? Are you planning to do regular builds also for older R versions?

@eitsupi
Copy link
Member Author

eitsupi commented Feb 19, 2024

I don't think there is anything more than what is written here at this point.

I think I've seen requests for scheduled builds in other issues, but I don't know the best strategy for mixing builds from Dockerfile updates with scheduled builds (i.e., just a few minutes after a scheduled build, a new RStudio release could be made and built again).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI pre-built images Related to pre-built images
Projects
None yet
Development

No branches or pull requests

3 participants