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

Update registries if they already exist #18

Closed
omus opened this issue Jun 13, 2023 · 2 comments
Closed

Update registries if they already exist #18

omus opened this issue Jun 13, 2023 · 2 comments

Comments

@omus
Copy link
Contributor

omus commented Jun 13, 2023

While using julia-actions/cache I encountered a scenario where my CI registry didn't contain the latest version of a released package.

Here's a snippet of my workflow:

- uses: julia-actions/cache@v1
   with:
     cache-name: "${{ github.workflow }}-${{ github.job }}-${{ matrix.pkg.name }}-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.arch }}"
     cache-registries: true
     cache-compiled: true
- uses: julia-actions/add-julia-registry@v1

I'll outline the series of events I believed that took place:

  1. Opened my PR which triggered the above workflow. The added registries were then cached
  2. Updated the Project.toml in my PR to require a release of a package which was not yet released during step 1.
  3. Pushed change resulted in triggering of the CI workflow which had a cache hit and loaded the cache registries.
  4. The julia-actions/add-julia-registry sees that the registries are present and effectively does nothing.

I believe the add-julia-registry action should update any existing registries to avoid this kind of problem

@omus
Copy link
Contributor Author

omus commented Jan 5, 2024

The julia-actions/cache action now uses cache-registries: true by default. From a code deep dive I did any workflow that uses Pkg.instantiate should automatically update the registries: julia-actions/cache#62 (comment)

All that's left to do here is to try and attempt to reproduce the issue with the latest GitHub actions.

@omus
Copy link
Contributor Author

omus commented Jan 17, 2025

Fixed in #29

@omus omus closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant