Skip to content

feat: Set JULIAUP_DEPOT_PATH to a location in the runner tool cache#205

Open
krynju wants to merge 5 commits into
julia-actions:mainfrom
krynju:kr/depot-runner-cache
Open

feat: Set JULIAUP_DEPOT_PATH to a location in the runner tool cache#205
krynju wants to merge 5 commits into
julia-actions:mainfrom
krynju:kr/depot-runner-cache

Conversation

@krynju
Copy link
Copy Markdown

@krynju krynju commented Apr 30, 2026

Found because a worker had juliaup preinstalled and we've hit Error: The Julia launcher failed to figure out which juliaup channel to use.

I think it makes more sense to put it in the runner cache, so that it completely ignores what's currently on the runner.

@krynju krynju force-pushed the kr/depot-runner-cache branch from 5c5902d to 0b83653 Compare April 30, 2026 15:57
@DilumAluthge DilumAluthge self-requested a review April 30, 2026 23:56
@DilumAluthge
Copy link
Copy Markdown
Member

Would you be able to put the changes that touch lib/* and dist/* into a separate commit? It makes review a little easier, and also it makes it easier when rebasing and fixing merge conflicts.

@DilumAluthge
Copy link
Copy Markdown
Member

At first glance, at a high-level, this seems reasonable to me, but I haven't done a line-by-line review yet.

@krynju krynju force-pushed the kr/depot-runner-cache branch from 0b83653 to 0f17925 Compare May 5, 2026 16:16
@krynju
Copy link
Copy Markdown
Author

krynju commented May 5, 2026

Would you be able to put the changes that touch lib/* and dist/* into a separate commit? It makes review a little easier, and also it makes it easier when rebasing and fixing merge conflicts.

Done

Comment thread src/start_here.ts
@DilumAluthge
Copy link
Copy Markdown
Member

I left one comment, but overall this makes sense and we should do it.

Users can recover the old behavior by manually setting the JULIAUP_DEPOT_PATH environment variable themselves.

One question though, is whether this is breaking. My initial instinct is that it is breaking. @MichaelHatherly what do you think?

We could work around it by making it opt-in in the current major version of install-juliaup, which would be nonbreaking. And then we could change the default in a future major release.

@MichaelHatherly
Copy link
Copy Markdown
Collaborator

My initial instinct is that it is breaking.

I'm inclined to agree with that. Opt-in during this current major release and then switching it in the next might be the most reasonable.

@krynju
Copy link
Copy Markdown
Author

krynju commented May 7, 2026

My initial instinct is that it is breaking.

I'm inclined to agree with that. Opt-in during this current major release and then switching it in the next might be the most reasonable.

Assuming people use the action as intended it shouldn't be breaking. The only side effect I think would be that the cache is not reused on next the first run after the upgrade.
But I'm not 100% sure people use it as intended

@DilumAluthge DilumAluthge changed the title feat: set juliaup depot env to a location in the runner tool cache feat: Set JULIAUP_DEPOT_PATH to a location in the runner tool cache May 11, 2026
@krynju krynju force-pushed the kr/depot-runner-cache branch from 2fa90cf to 86c213d Compare May 29, 2026 07:23
@DilumAluthge
Copy link
Copy Markdown
Member

I've been giving this some more thought, and I wonder if we can call this a bugfix, with the idea being that GitHub Actions are expected to use the toolcache generally, so the fact that we haven't been using the toolcache up until now could be considered a bug. So then we'd say this is a bugfix, but users that need to recover the old behavior can manually set the JULIAUP_DEPOT_PATH environment variable prior to running this action. Users shouldn't actually experience any breakage, it's just that they'll need to redownload some Julia versions the next time they run this action.

By calling it a bugfix, we also don't need to create an opt-in mechanism, so the code surface becomes simpler.

@MichaelHatherly What do you think?

@DilumAluthge
Copy link
Copy Markdown
Member

BTW, before merging, @krynju could you rebase on the latest main branch and squash everything into two commits - one commit with the main changes (but no changes to lib/* and dist/*), and a second commit with only the changes to lib/* and dist/*?

@DilumAluthge DilumAluthge self-requested a review May 30, 2026 01:04
Comment thread src/start_here.ts
// https://docs.github.com/en/actions/reference/workflows-and-actions/variables
const tool_cache = process.env['RUNNER_TOOL_CACHE']
if (!tool_cache || tool_cache.length === 0) {
core.warning(`RUNNER_TOOL_CACHE is not set; leaving ${env_name} unset (Juliaup will use its default location)`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escalate this to a core.error? (Non-fatal, but the log message looks scarier). I think it would be pretty unusual for RUNNER_TOOL_CACHE to not be defined.

Comment thread src/start_here.ts
inputs.get_juliaup_channel_input()
inputs.get_juliaup_version_input()

// Step 1b: Pin the Juliaup depot under RUNNER_TOOL_CACHE so it does
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to edit line 16 to say "Step 1a", for consistency.

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

Successfully merging this pull request may close these issues.

3 participants