Skip to content

Update immediately to opam-repository changes #26

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

Closed
talex5 opened this issue Oct 10, 2019 · 5 comments
Closed

Update immediately to opam-repository changes #26

talex5 opened this issue Oct 10, 2019 · 5 comments
Labels
type/enhancement New feature or request

Comments

@talex5
Copy link
Contributor

talex5 commented Oct 10, 2019

At the moment, we update the base Docker images once a week, and this brings in the latest opam-repository changes. However, it would be good to be able to test against new releases immediately.

The problem with doing opam update before each job is that we would lose the benefits of caching, because the layer hash would be different each time.

Some options:

  1. If opam could extract from a repository just the information it needed, we could throw away the repository and just keep that. Then repository changes would invalidate the cache only if something we needed changed. There doesn't seem to be any way to do that, though.

  2. We could add a configuration file where the user specifies the mimimum repository commit they need. e.g.

     (ocaml-ci
      (minimum-opam-commit abcd123e))
    

    If the repository doesn't contain that commit then we update to it.

@talex5
Copy link
Contributor Author

talex5 commented Nov 4, 2019

Note that you can work around this problem by adding git-submodule(s) with the versions you need. Then the CI will test against those.

@avsm
Copy link
Member

avsm commented Nov 4, 2019

I don't think that the second suggestion is practical, since there is no clear correspondence in the order of opam-repo commits (that is, there is no guarantee that all subsequent commits after a minimum-opam-commit would actually work). The only thing that information would tell the CI is that one particular opam-repo revision was known to work -- and even then, that might fail with different solver information such as os/arch/ocaml-version.

@hannesm
Copy link
Contributor

hannesm commented Feb 27, 2020

the unknown update cycle of the opam-repository in the ci images makes it very non-intuitive to use for me (esp. since I can't find any documentation thereof, neither how to manually update the opam repository, nor which opam-repository commit a CI run used), and I'd appreciate any solution (such as (minimum-opam-commit abcd123e) would work fine for me).

thanks.

@talex5
Copy link
Contributor Author

talex5 commented May 11, 2020

Since #167 and #173 were merged, the CI now checks for changes to opam-repository hourly and should start rebuilding anything that needs updating within about 30 minutes of that.

@talex5
Copy link
Contributor Author

talex5 commented Jun 9, 2020

Fixed in #194. The CI gets a webhook event when opam-repository updates and starts rebuilding things immediately.

@talex5 talex5 closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants