jfrog / jfrog/setup-jfrog-cli

CLI is download even when found in runner cache

Open
#282 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
266
Forks
110
Avg merge
3d 15h
Merged PRs (30d)
3

Description

Describe the bug

I've placed jf in the runner cache, but the action is still downloading if because jfrog isn't cached.

Debug logs excerpt

##[debug]isExplicit: 2.75.0
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/jf/2.75.0/x64
##[debug]Found tool in cache jf 2.75.0 x64
##[debug]isExplicit: 2.75.0
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/jfrog/2.75.0/x64
##[debug]not found
Downloading JFrog CLI from https://releases.jfrog.io/artifactory/jfrog-cli/v2/2.75.0/jfrog-cli-linux-amd64/jfrog

The workaround seems to place both jf and jfrog in the cache. but that seems wasteful.

If one tool is found, why do we need the other?

Current behavior

Is download the CLI even though it's found in the cache

Reproduction steps

Place jf in the tools cache eg: /opt/hostedtoolcache/jf/2.75.0/x64 for x64

Expected behavior

if jf is found, don't download jfrog as well

Setup JFrog CLI version

v4.5.11

JFrog CLI version

2.75.0

Workflow operating system type and version

linux

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a source file or test. Start by tracing the setup action's cache lookup for jf and jfrog, then reproduce the Linux x64 case with only jf in the tools cache. Done means a cached jf prevents the redundant jfrog download.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.