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

4.31 I-Build: I20240114-1800 - BUILD FAILED #1724

Closed
MohananRahul opened this issue Jan 15, 2024 · 10 comments · Fixed by #1727, #1728 or eclipse-platform/eclipse.platform.swt#982
Closed

4.31 I-Build: I20240114-1800 - BUILD FAILED #1724

MohananRahul opened this issue Jan 15, 2024 · 10 comments · Fixed by #1727, #1728 or eclipse-platform/eclipse.platform.swt#982
Assignees
Labels
bug Something isn't working

Comments

@MohananRahul
Copy link
Contributor

See https://ci.eclipse.org/releng/job/Builds/job/I-build-4.31/91/console

@MohananRahul MohananRahul added the bug Something isn't working label Jan 15, 2024
@jukzi
Copy link
Contributor

jukzi commented Jan 15, 2024

regression from eclipse-platform/eclipse.platform.swt#973

00:07:42  [INFO] --- antrun:3.1.0:run (collect-java-sources) @ org.eclipse.swt.gtk.linux.x86_64 ---
00:07:42  [INFO] Executing tasks
00:07:42  [INFO]      [exec] build-scripts/CollectSources.java:35: error: illegal start of expression
00:07:42  [INFO]      [exec] 		private static ScriptEnvironment read(String[] args) {
00:07:42  [INFO]      [exec] 		^

@HannesWell

@HannesWell
Copy link
Member

That's unexpected, because in general it works to launch the Java script, as one can see at the SWT master branch build.
But I have seen similar errors in early versions of the PR when the java executable used by the Jenkins executor by default was a Java-11 one. But this script requires Java-17, mainly due to the use of records (but maybe also other library calls).

I can investigate this in detail this evening, unless somebody else has fixed it in the meantime. But my current guess is that the Maven build is launched with an explicit java exe and not the default one on the system, which I assume is still Java-11.
Maybe it is sufficient to add a tools section to the build stage that installs java-17.

HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Jan 15, 2024
Since eclipse-platform/eclipse.platform.swt#973
the I-build (like the SWT build) requires a java-17 (or later) jdk on
the PATH system environment-variable in order to launch a jdk>=17 with
the 'java' command from the CLI. Just setting the JAVA_HOME variable to
a path pointing to a jdk-17 is not sufficient since the the java
executable is usually located in '$JAVA_HOME/bin'. And while the maven
launch script searches in '$JAVA_HOME/bin' for a java executable to run
the build itself, a simple java command on the CLI isn't that smart.
Previously java would just run the default default java version on the
Jenkins executor.

In general this simplifies the build-configuration because the JDK to
use is only defined once and used everywhere.

Fixes eclipse-platform#1724
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this issue Jan 15, 2024
Since eclipse-platform/eclipse.platform.swt#973
the I-build (like the SWT build) requires a java-17 (or later) jdk on
the PATH system environment-variable in order to launch a jdk>=17 with
the 'java' command from the CLI. Just setting the JAVA_HOME variable to
a path pointing to a jdk-17 is not sufficient since the the java
executable is usually located in '$JAVA_HOME/bin'. And while the maven
launch script searches in '$JAVA_HOME/bin' for a java executable to run
the build itself, a simple java command on the CLI isn't that smart.
Previously running the 'java' command would just run the default default
java version on the Jenkins executor.

In general this simplifies the build-configuration because the JDK to
use is only defined once and used everywhere.

Fixes eclipse-platform#1724
HannesWell added a commit that referenced this issue Jan 15, 2024
Since eclipse-platform/eclipse.platform.swt#973
the I-build (like the SWT build) requires a java-17 (or later) jdk on
the PATH system environment-variable in order to launch a jdk>=17 with
the 'java' command from the CLI. Just setting the JAVA_HOME variable to
a path pointing to a jdk-17 is not sufficient since the the java
executable is usually located in '$JAVA_HOME/bin'. And while the maven
launch script searches in '$JAVA_HOME/bin' for a java executable to run
the build itself, a simple java command on the CLI isn't that smart.
Previously running the 'java' command would just run the default default
java version on the Jenkins executor.

In general this simplifies the build-configuration because the JDK to
use is only defined once and used everywhere.

Fixes #1724
@HannesWell
Copy link
Member

After applying #1727 the newly triggered I-build failed with:

19:06:34  [ssh-agent] Using credentials eclipse-releng-bot (GitHub bot (SSH))
19:06:34  [ssh-agent] Looking for ssh-agent implementation...
19:06:35  [ssh-agent] FATAL: Could not find a suitable ssh-agent provider
19:06:35  [ssh-agent] Diagnostic report

@HannesWell HannesWell reopened this Jan 15, 2024
@HannesWell
Copy link
Member

I replayed the I build with and without the new tools section echoing the value of PATH and with

  tools {
      jdk 'openjdk-jdk17-latest'
      maven 'apache-maven-latest'
  }

PATH is

/opt/tools/java/openjdk/jdk-17/latest/bin:
/opt/tools/apache-maven/latest/bin:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

and without PATH is just

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

So the tools are prepended as expected, but somehow the sshagent step does not like the newer java version (I assume maven is not relevant here)?
If the tools are removed again, the Setup intial configuration works...

@akurtakov
Copy link
Member

Is the path really multiline ?

@HannesWell
Copy link
Member

Is the path really multiline ?

No it is linear. I just split it for better comparability.

I now did some replays (with failure mails disabled to not spam everybody) and it looks like that the

tools {
    maven 'apache-maven-latest'
}

Breaks the build, at least the replay https://ci.eclipse.org/releng/job/Builds/job/I-build-4.31/95/console makes me be believe it.

@akurtakov
Copy link
Member

If that's the case define just the jdk tool.

@HannesWell
Copy link
Member

If that's the case define just the jdk tool.

Tried that with I-build-4.31#97. Fingers crossed.

@akurtakov
Copy link
Member

It would be nice if you open helpdesk issue so the issue can be investigated further.

@HannesWell
Copy link
Member

It would be nice if you open helpdesk issue so the issue can be investigated further.

Done with https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4171.

With I-build-4.31#97 the build of all the native swt fragments succeeded. Just created #1728 to fix the template with the changes from the replay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment