eclipse-platform/eclipse.platform.releng

Maven snapshots are not properly published

Closed this issue · 11 comments

merks commented

@mickaelistria What does that publishing? Is the following job involved?

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/

That hasn't been working quite some time and it was publishing the 4.25 release not the 4.26 IBuilds until I made these changes:

4c233cf

I cannot reproduce the issue at the moment. Let's close.

merks commented

@mickaelistria

I think it was caused by a bug in the aggregator for the case of producing SNAPSHOT versions which I fixed and was then used in a subsequent builds.

Note though that these two things keep failing:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign-and-deploy-file (default-cli) on project org.eclipse.platform.publish2maven: POM not found /home/jenkins/agent/workspace/PublishPlatformToMaven/org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.500/org.eclipse.e4.ui.progress-0.3.500.pom: /home/jenkins/agent/workspace/PublishPlatformToMaven/org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.500/org.eclipse.e4.ui.progress-0.3.500.pom (No such file or directory) -> [Help 1]
[ERROR] 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign-and-deploy-file (default-cli) on project org.eclipse.platform.publish2maven: POM not found /home/jenkins/agent/workspace/PublishPlatformToMaven/org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.500/org.eclipse.e4.ui.progress-0.3.500.pom: /home/jenkins/agent/workspace/PublishPlatformToMaven/org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.500/org.eclipse.e4.ui.progress-0.3.500.pom (No such file or directory) -> [Help 1]
[ERROR] 

I think it should be trying to work not with 0.3.500 but rather with 0.3.600:

https://repo.eclipse.org/content/repositories/eclipse-snapshots/org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.600-SNAPSHOT/

That's what's in the repo being processed.

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/job/CBIaggregator/lastSuccessfulBuild/artifact/repo-184/org/eclipse/platform/org.eclipse.e4.ui.progress/

But I don't understand how all this stuff is working... 😢

Oh, wait, I think this is the cause!

# WORKAROUND org.eclipse.e4.ui.progress.sources missing in p2 repo
# artifact was built locally and can be used for publication
# Root issue is fixed in 4.26-I-build repo, so this block can be removed
# as soon as 4.25 is pushed to Maven Central
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1QxAIx2tI9oNOVC7ZYUIi9oPVcCK8tfbu' -O sources.jar
${MVN} -f platform-pom.xml -s ${SETTINGS} gpg:sign-and-deploy-file \
-Durl=${URL} -DrepositoryId=${REPO} \
-Dfile=sources.jar -DpomFile=org/eclipse/platform/org.eclipse.e4.ui.progress/0.3.500/org.eclipse.e4.ui.progress-0.3.500.pom -Dclassifier=sources \
>> .log/sources-upload.txt

Shall I remove that now?

Shall I remove that now?

I hope this can now be safely removed, so yes, please give it a try if you can. We'll see if I was right back then.

merks commented

The builds a really poorly behaved. :-(

E.g., I see this fail:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign-and-deploy-file (default-cli) on project org.eclipse.jdt.publish2maven: /home/jenkins/agent/workspace/PublishJDTtoMaven/org/eclipse/jdt/ecj/3.32.0-SNAPSHOT/ecj-3.32.0-20221020.095200-0.jar not found. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

But I see it exists in the repo:

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/job/CBIaggregator/lastSuccessfulBuild/artifact/repo-186/org/eclipse/jdt/ecj/3.32.0-SNAPSHOT/

Moreover, when I download the zip from here:

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/job/CBIaggregator/lastSuccessfulBuild/artifact/*zip*/archive.zip

I see it's present in that zip:

image

But when the build downloads that file and unzips it, I only see this in the log:

  inflating: archive/repo-186/org/eclipse/jdt/ecj/3.32.0-SNAPSHOT/ecj-3.32.0-20221020.095200-0-javadoc.jar  
  inflating: archive/repo-186/org/eclipse/jdt/ecj/3.32.0-SNAPSHOT/ecj-3.32.0-20221020.095200-0.pom  
  inflating: archive/repo-186/org/eclipse/jdt/ecj/3.32.0-SNAPSHOT/ecj-3.32.0-20221020.095200-0.pom-bak  

From here I see that the zip appears incomplete:

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/job/PublishJDTtoMaven/119/consoleFull

@mickaelistria I wonder if the downstream jobs are downloading the zip before the archive is properly created by this job?

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/job/CBIaggregator/

merks commented

I see this in the log

07:00:56 ~/agent/workspace/CBIaggregator/gitcache ~/agent/workspace/CBIaggregator/repo-186
07:00:56 ~/agent/workspace/CBIaggregator/repo-186
07:00:56 java.nio.file.NoSuchFileException: /tmp/org.eclipse.e4.tools.emf.ui-4.7.300-sources.jar6404135684629021219.jar -> ../org/eclipse/platform/org.eclipse.e4.tools.emf.ui/4.7.300/org.eclipse.e4.tools.emf.ui-4.7.300-sources.jar
07:00:56 	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
07:00:56 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
07:00:56 	at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:478)
07:00:56 	at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:263)
07:00:56 	at java.base/java.nio.file.Files.move(Files.java:1421)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.validateAndClose(Main.java:466)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.run(Main.java:349)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.main(Main.java:1676)
07:00:56 /home/jenkins/agent/workspace/CBIaggregator/repo-186
07:00:57 org/eclipse/jdt/ecj/3.30.0/ecj-3.30.0-sources.jar: No such file or directory
07:00:57 ========== Repo completed =========
07:00:58 /home/jenkins/agent/workspace/CBIaggregator/repo-186
07:00:58 ========== Next baseline created =========
07:00:58 Triggering projects: [PublishJDTtoMaven](https://ci.eclipse.org/releng/job/PublishJDTtoMaven/)
07:00:58 Triggering projects: [PublishPlatformToMaven](https://ci.eclipse.org/releng/job/PublishPlatformToMaven/)
07:00:58 Triggering projects: [PublishPDEToMaven](https://ci.eclipse.org/releng/job/PublishPDEToMaven/)
07:00:58 $ ssh-agent -k
07:00:58 unset SSH_AUTH_SOCK;
07:00:58 unset SSH_AGENT_PID;
07:00:58 echo Agent pid 56 killed;
07:00:58 [ssh-agent] Stopped.
07:00:58 Archiving artifacts

So it does seem the jobs could run before the archiving is complete.

I also see this is the log though it doesn't fail the build:

07:00:56 ~/agent/workspace/CBIaggregator/gitcache ~/agent/workspace/CBIaggregator/repo-186
07:00:56 ~/agent/workspace/CBIaggregator/repo-186
07:00:56 java.nio.file.NoSuchFileException: /tmp/org.eclipse.e4.tools.emf.ui-4.7.300-sources.jar6404135684629021219.jar -> ../org/eclipse/platform/org.eclipse.e4.tools.emf.ui/4.7.300/org.eclipse.e4.tools.emf.ui-4.7.300-sources.jar
07:00:56 	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
07:00:56 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
07:00:56 	at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:478)
07:00:56 	at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:263)
07:00:56 	at java.base/java.nio.file.Files.move(Files.java:1421)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.validateAndClose(Main.java:466)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.run(Main.java:349)
07:00:56 	at jdk.jartool/sun.tools.jar.Main.main(Main.java:1676)
07:00:56 /home/jenkins/agent/workspace/CBIaggregator/repo-186
07:00:57 org/eclipse/jdt/ecj/3.30.0/ecj-3.30.0-sources.jar: No such file or directory
07:00:57 ========== Repo completed =========

I'll have to look at the source of these things...

merks commented

I've reconfigure the job to move the triggered build to post build actions that are after the archive action

image

This looks bogus and I will remove it:

eclipse-platform/eclipse.platform.ui.tools.git \
bundles/org.eclipse.e4.tools.emf.ui \
S4_24_0_RC2a \
org/eclipse/platform org.eclipse.e4.tools.emf.ui 4.7.300

This looks questionable and I still need to understand the purpose:

# ECLIPSE:
DROPS4=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4
SDK_BUILD_DIR=R-4.24-202206070700
SDK_VERSION=4.24
FILE_ECLIPSE=${DROPS4}/${SDK_BUILD_DIR}/eclipse-SDK-${SDK_VERSION}-linux-gtk-x86_64.tar.gz

I've reconfigure the job to move the triggered build to post build actions that are after the archive action

good finding!

This looks bogus and I will remove it

OK.

This looks questionable and I still need to understand the purpose

I believe this is the IDE that is used in order to install and run the aggregator application.

merks commented

Woo hoo, the first fully successful build!

https://ci.eclipse.org/releng/view/Publish%20to%20Maven/

I'll do more cleanup and try again with more removed mappings and with the version range changes we are discussing here:

#128