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

Command fails when JFROG_CLI_TEMP_DIR does not exist #2833

Open
daykjfrog opened this issue Jan 16, 2025 · 0 comments
Open

Command fails when JFROG_CLI_TEMP_DIR does not exist #2833

daykjfrog opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@daykjfrog
Copy link

Describe the bug

With the recent versions of JFrog CLI (e.g. v2.71.2), when JFROG_CLI_TEMP_DIR does not exist, commands fail.
But with older versions of JFrog CLI (e.g. v1.25.0.1), when JFROG_CLI_TEMP_DIR does not exist, the issue does not occur as it creates the folder.

Current behavior

When using the most recent version of CLI, v2.71.2, commands fail as the temp folder does not exist.
But when using older versions the same issue does not happen.

Reproduction steps

  1. Set JFROG_CLI_TEMP_DIR to a nonexisting folder. e.g
    export JFROG_CLI_TEMP_DIR=/Users/dayk/nonexistingpath
  2. Run a simple download command, e.g.
    jf rt dl generic-local/ ./ --explode --bypass-archive-inspection --threads 8 --split-count=0
14:18:19 [Debug] JFrog CLI version: 2.71.2
14:18:19 [Debug] OS/Arch: darwin/amd64
14:18:19 [Debug] Trace ID for JFrog Platform logs: 40e00b5069e3d6b1
14:18:19 [🔵Info] Log path: /Users/dayk/.jfrog/logs/jfrog-cli.2025-01-15.14-18-19.10685.log
14:18:20 [🔵Info] Trace ID for JFrog Platform logs: 40e00b5069e3d6b1
14:18:20 [🟠Warn] failed while attempting to cleanup old CLI temp directories: open /Users/dayk/nonexistingpath: no such file or directory
14:18:20 [🚨Error] download finished with errors, please review the logs
3. It fails as the JFROG_CLI_TEMP_DIR does not exist.
❯ cat /Users/dayk/.jfrog/logs/jfrog-cli.2025-01-15.14-18-19.10685.log
[Debug] Usage Report: Sending info...
[Debug] Sending HTTP GET request to: http://mill.jfrog.info:32834/artifactory/api/system/version
[Debug] Sending HTTP GET request to: http://mill.jfrog.info:32834/artifactory/api/system/version
[Debug] Artifactory response: 200 OK
[Debug] JFrog Artifactory version is: 7.90.13
[Debug] Sending HTTP POST request to: http://mill.jfrog.info:32834/artifactory/api/system/usage
[Debug] Artifactory response: 200 OK
[Debug] JFrog Artifactory version is: 7.90.13
[Debug] Searching Artifactory using AQL query:
 items.find({"$or":[{"$and":[{"repo":"generic-local","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
[Debug] Sending HTTP POST request to: http://mill.jfrog.info:32834/artifactory/api/search/aql
[Debug] Artifactory response: 200 OK
[Debug] Streaming data to file...
[Error] open /Users/dayk/nonexistingpath/jfrog.cli.temp.-1736979500-1297365030: no such file or directory
[Error] open /Users/dayk/nonexistingpath/jfrog.cli.temp.-1736979500-1297365030: no such file or directory
[Error] open /Users/dayk/nonexistingpath/jfrog.cli.temp.-1736979500-1297365030: no such file or directory

Expected behavior

It should create the temp folder if it does not exist, as how it handled it in the previous versions.

JFrog CLI version

2.71.2

Operating system type and version

Mac OS

JFrog Artifactory version

No response

JFrog Xray version

No response

@daykjfrog daykjfrog added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant