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

Cannot report buildinfo from parallel executions of jfrog rt dl #407

Open
daveneeley opened this issue Jun 25, 2019 · 3 comments
Open

Cannot report buildinfo from parallel executions of jfrog rt dl #407

daveneeley opened this issue Jun 25, 2019 · 3 comments

Comments

@daveneeley
Copy link

For cases where an AQL file specification can include only one file, such as when searching by file hash, I would like to run multiple instances of jfrog-cli simultaneously.

Parallel executions work great at download time. Unfortunately, build reporting fails later. The cli seems to save off work in a temporary file and then reference it at reporting. But the last known file can't be found after a parallel run.

run these in parallel {
jfrog rt dl --spec file1.txt --build-number 1 --build-name mybuild
jfrog rt dl --spec file2.txt --build-number 1 --build-name mybuild
jfrog rt dl --spec file3.txt --build-number 1 --build-name mybuild
}
then run {
jfrog rt bp mybuild 1
}

It will throw an error message on the call to rt bp

@AlexeiVainshtein
Copy link
Contributor

Hi @daveneeley

I've tried on my end with the latest release of JFrog CLI (1.26.1) and all worked. I run parallel download of files (using spec with AQL. Within each spec one file). All the download finished successfully and then I run the jfrog rt bp command and the build info was deployed. I've also tried without spec and also finished successfully.

For example:

 export a=1; while [ $a -le 1 ]; do jfrog rt dl --spec file3.txt --build-name mybuild --build-number 3 & jfrog rt dl --spec file2.txt --build-name mybuild --build-number 3 & jfrog rt dl --spec file1.txt --build-name mybuild --build-number 3 & a=`expr $a + 1`; done

[1]   Done                    jfrog rt dl --spec file3.txt --build-name mybuild --build-number 3
[2]-  Done                    jfrog rt dl --spec file2.txt --build-name mybuild --build-number 3
[3]+  Done                    jfrog rt dl --spec file1.txt --build-name mybuild --build-number 3

Published the build info:

jfrog rt bp mybuild 3
[Info] Deploying build info...
[Debug] Sending HTTP PUT request to: http://localhost:8081/artifactory/api/build/
[Debug] Artifactory response: 204 No Content
[Info] Build info successfully deployed. Browse it in Artifactory under http://localhost:8081/artifactory/webapp/builds/mybuild/3

I've also tried with parallel command and also all worked. It will help us for troubleshooting this issue if you could please let us know the following:

  • Version of JFrog CLI that you are using
  • What error you are getting when trying to publish the build info?
  • What the outcome of the download commands?
  • What the spec file includes and how you perform the execution in parallel.

Thanks,

@daveneeley
Copy link
Author

The problem occurs on Windows Server 2012. I cannot reproduce it on Windows 10 or in a Linux container.

Version of JFrog CLI that you are using:
1.16.2, 1.22.0

What the outcome of the download commands?
The download commands all complete successfully.

What the spec file includes and how you perform the execution in parallel.
See this gist https://gist.github.com/daveneeley/6ad2870a19a239a2b59c90e3dc85d3e8

@eyalbe4
Copy link
Contributor

eyalbe4 commented Jul 2, 2019

@daveneeley,
What is the error message thrown by the jfrog rt bp command?

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

3 participants