tkobayas commented on code in PR #6074:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6074#discussion_r1749894948


##########
.ci/jenkins/Jenkinsfile.weekly.deploy:
##########
@@ -91,7 +91,7 @@ pipeline {
                     withCredentials([usernamePassword(credentialsId: 
env.MAVEN_REPO_CREDS_ID, usernameVariable: 'REPOSITORY_USER', passwordVariable: 
'REPOSITORY_TOKEN')]) {
                         def installOrDeploy
                         if (shouldDeployToRepository()) {
-                            installOrDeploy = "deploy -DdeployAtEnd 
-Dapache.repository.username=${REPOSITORY_USER} 
-Dapache.repository.password=${REPOSITORY_TOKEN} 
-DretryFailedDeploymentCount=5" +
+                            installOrDeploy = "deploy 
-Dapache.repository.username=${REPOSITORY_USER} 
-Dapache.repository.password=${REPOSITORY_TOKEN} 
-DretryFailedDeploymentCount=5" +

Review Comment:
   @jstastny-cz  Thank you for the comment!
   
   > Can you please provide evidence for your findings? Because from what I've 
seen the retry was only for artifacts that actually failed.
   
   1. I created debug jars of `maven-resolver-connector-basic-1.9.18.jar` and 
`maven-resolver-transport-http-1.9.18.jar`. It throws an Exception when 
`simple-pojo05` jar is about to be uploaded. Placed the debug jars into maven 
lib directory : 
https://gist.github.com/tkobayas/d74b103eb98d62b1300e6d905699486a
   2. Running Nexus locally
   3. I build the project to deploy multiple artifacts : 
https://github.com/tkobayas/maven-experiment/tree/main/multi-artifacts
   ```
   mvn -s ./settings.xml -fae -ntp -Dfull clean deploy -DdeployAtEnd 
-DretryFailedDeploymentCount=3  -Dfull -Dmaven.test.failure.ignore=true 
-DskipTests=false
   ```
   
   Here is the result debug log : 
https://gist.github.com/tkobayas/12c4379d5eb0fbe17facbc14ea47cee8
   
   ```
   [INFO] --- deploy:3.1.1:deploy (default-deploy) @ simple-pojo06 ---
   ...
   [INFO] execute PUT 
http://localhost:8081/repository/maven-snapshots/org/example/deploy/simple-pojo01/1.0.0-SNAPSHOT/simple-pojo01-1.0.0-20240909.083542-8.jar
 HTTP/1.1
   ...
   [INFO] execute done PUT 
http://localhost:8081/repository/maven-snapshots/org/example/deploy/simple-pojo01/1.0.0-SNAPSHOT/simple-pojo01-1.0.0-20240909.083542-8.jar
 HTTP/1.1
   ...
   [INFO] execute PUT 
http://localhost:8081/repository/maven-snapshots/org/example/deploy/simple-pojo05/1.0.0-SNAPSHOT/simple-pojo05-1.0.0-20240909.083542-8.jar
 HTTP/1.1
   ...
   [WARNING] Encountered issue during deployment: Failed to deploy artifacts: 
Could not transfer artifact 
org.example.deploy:simple-pojo05:jar:1.0.0-20240909.083542-8 from/to 
nexus-snapshots (http://localhost:8081/repository/maven-snapshots/): DEBUG
   [INFO] Retrying deployment attempt 2 of 3
   ...
   [INFO] execute PUT 
http://localhost:8081/repository/maven-snapshots/org/example/deploy/simple-pojo01/1.0.0-SNAPSHOT/simple-pojo01-1.0.0-20240909.083542-8.jar
 HTTP/1.1
   ...
   [INFO] execute done PUT 
http://localhost:8081/repository/maven-snapshots/org/example/deploy/simple-pojo01/1.0.0-SNAPSHOT/simple-pojo01-1.0.0-20240909.083542-8.jar
 HTTP/1.1
   ```
   
   You can see that `simple-pojo01-1.0.0-20240909.083542-8.jar` was 
successfully deployed, but it was deployed again after retrying (caused by 
simeple-pojo05).
   
   > resulting in broken snapshots and projects impossible to build.
   
   Agreed that it's a more importance issue than the uploading failure.
   
   Also sorry that I missed that `deployAtEnd` is an agreed decision. I'm not 
willing to push this solution. I'm closing this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to