Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 537284

Summary: Provide CJE instance for Xtext
Product: Community Reporter: Karsten Thoms <karsten.thoms>
Component: CI-JenkinsAssignee: CI Admin Inbox <ci.admin-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.dietrich.opensource, frederic.gurr, mikael.barbero, pgowda, webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=540066
Whiteboard:
Bug Depends on: 539987    
Bug Blocks:    
Attachments:
Description Flags
Screenshot: Credentials none

Description Karsten Thoms CLA 2018-07-23 06:49:01 EDT
The Xtext team wants to volunteer on testing CJE for their build jobs. We have especially long running UI tests and would like to share performance measurements against JIPP.

The following jobs are the first subjects:
- https://ci.eclipse.org/xtext/job/xtext-umbrella/
- https://ci.eclipse.org/xtext/job/xtext-lib/
- https://ci.eclipse.org/xtext/job/xtext-core/
- https://ci.eclipse.org/xtext/job/xtext-extras/
- https://ci.eclipse.org/xtext/job/xtext-eclipse/
- https://ci.eclipse.org/xtext/job/xtext-xtend/

(to complete the list of main build jobs:)
- https://ci.eclipse.org/xtext/job/xtext-web/
- https://ci.eclipse.org/xtext/job/xtext-idea/
- https://ci.eclipse.org/xtext/job/xtext-maven/
- https://ci.eclipse.org/xtext/job/xtext-gradle/

These are all multibranch pipeline jobs that are structurally similar.
Comment 1 Karsten Thoms CLA 2018-09-24 17:50:26 EDT
What is the current state? When can we start testing builds on CJE?
Comment 2 Mikaël Barbero CLA 2018-09-28 10:37:23 EDT
The Xtext JIPP is now setup at https://jenkins.eclipse.org/xtext/

Committers should now be able to login and create jobs. Please note that you will need to login with your _email_ address as your username.

If you require additional plugins feel free to comment on this bug and list them.
Comment 3 Karsten Thoms CLA 2018-10-01 09:11:23 EDT
Cool! Thanks, Mikael. We'll try this and provide feedback. Login works.
Comment 4 Karsten Thoms CLA 2018-10-01 09:19:05 EDT
Created attachment 276094 [details]
Screenshot: Credentials

We'll need credentials for the genie-xtext bot user configured in the JIPP instance
Comment 5 Karsten Thoms CLA 2018-10-01 09:21:26 EDT
Maybe related to the missing credentials?
https://jenkins.eclipse.org/xtext/job/Xtext/job/xtext-lib/indexing/console

-----------------------------------------------
13:20:20 Connecting to https://api.github.com with no credentials, anonymous access
ERROR: [Mon Oct 01 13:20:20 GMT 2018] Could not update folder level actions from source 0cd50781-b22f-41a5-bf3b-03be4b64bce4
org.jenkinsci.plugins.github_branch_source.RateLimitExceededException: GitHub API rate limit exceeded
-----------------------------------------------
Comment 6 Mikaël Barbero CLA 2018-10-01 09:25:54 EDT
(In reply to Karsten Thoms from comment #4)
> Created attachment 276094 [details]
> Screenshot: Credentials
> 
> We'll need credentials for the genie-xtext bot user configured in the JIPP
> instance

Done.
Comment 7 Mikaël Barbero CLA 2018-10-01 09:26:08 EDT
(In reply to Karsten Thoms from comment #5)
> Maybe related to the missing credentials?
> https://jenkins.eclipse.org/xtext/job/Xtext/job/xtext-lib/indexing/console

Yes.
Comment 8 Karsten Thoms CLA 2018-10-01 09:37:46 EDT
Started configuring the jobs and created smoke. The JIPP is now not available anymore.

-------------------------------------------
Application is not available

The application is currently not serving requests at this endpoint. It may not have been started or is still starting.

Possible reasons you are seeing this page:

    The host doesn't exist. Make sure the hostname was typed correctly and that a route matching this hostname exists.
    The host exists, but doesn't have a matching path. Check if the URL path was typed correctly and that the route was created using the desired path.
    Route and path matches, but all pods are down. Make sure that the resources exposed by this route (pods, services, deployment configs, etc) have at least one pod running.
-------------------------------------------
Comment 9 Karsten Thoms CLA 2018-10-01 10:09:46 EDT
----------------------------
Could not find tools.jar. Please check that /opt/java/openjdk contains a valid JDK installation.
----------------------------

Something I have to configure in Jenkinsfile? We have only configured Maven tool and use property 'mvnHome'. Nothing about the JDK to use so far.
Comment 10 Mikaël Barbero CLA 2018-10-01 11:13:01 EDT
We don't define a tool named "M3"

The proper values are the following:

Apache Maven

apache-maven-latest
apache-maven-3.5.4
apache-maven-3.3.9
apache-maven-3.2.5

JDK

openjdk-jdk11-latest
openjdk-jdk10-latest
openjdk-jdk-latest (= openjdk-jdk11-latest)

oracle-jdk11-latest
oracle-jdk10-latest
oracle-jdk9-latest
oracle-jdk8-latest
oracle-jdk7-latest
oracle-jdk6-latest
oracle-jdk5-latest
oracle-jdk-latest (= oracle-jdk11-latest)

Ant 

apache-ant-latest

I will add this list to https://wiki.eclipse.org/Jenkins#Jenkins_configuration_and_tools_.28clustered_infra.29 as soon as I can login to the wiki again ;)
Comment 11 Mikaël Barbero CLA 2018-10-01 12:24:04 EDT
(In reply to Mikaël Barbero from comment #6)
> (In reply to Karsten Thoms from comment #4)
> > Created attachment 276094 [details]
> > Screenshot: Credentials
> > 
> > We'll need credentials for the genie-xtext bot user configured in the JIPP
> > instance
> 
> Done.

I also configured the GitHub pull request builder plugin that I forgot earlier.
Comment 12 Karsten Thoms CLA 2018-10-01 14:54:16 EDT
The genie-xtext credentials got lost. Could you add them again, please? Any idea why this happened?
Comment 13 Mikaël Barbero CLA 2018-10-01 14:56:30 EDT
Sorry, I've tweaked the domain usage restriction and it was too restrictive.
Comment 14 Karsten Thoms CLA 2018-10-01 15:44:55 EDT
The GitHub webhook does not work yet. I'd expect that build are triggered on push. Currently I'm experimenting with the xtext-lib build. It works already so far. It requires a different Jenkinsfile than we had before, since the tool identifiers are different. And I'm migrating to a declarative pipeline.
Comment 15 Karsten Thoms CLA 2018-10-02 00:29:29 EDT
1) 
'open-jdk-latest' seems to point to openjdk 10, not 11
/opt/tools/java/openjdk/jdk-10/10.0.2/bin/java


2)
When using openjdk-jdk11-latest JVM option 'UseCGroupMemoryLimitForHeap' becomes invalid. Execution on openjdk 10 already warned about this depracation. This seems to be a global option.

Build fails with error:
  Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
  Unrecognized VM option 'UseCGroupMemoryLimitForHeap'

On openjdk 10 you see:
  OpenJDK 64-Bit Server VM warning: Option UseCGroupMemoryLimitForHeap was deprecated in version 10.0 and will likely be removed in a future release.

Please remove the global setting '-XX:+UnlockExperimentalVMOptions'.


3)
I'd like to try the parallel-test-executor plugin. Could you add that please?


4)
A security warning is raised while accessing OSSRH snapshot repository. I have seen such a problem on JDK 8 previously, but this build is running on openjdk 10:
https://jenkins.eclipse.org/xtext/job/xtext-maven/job/kth_issue1309_cbi/1/console

Seems here only a warning, but can this be resolved?

[WARNING] Could not transfer metadata org.eclipse.emf:org.eclipse.emf.mwe.core/maven-metadata.xml from/to sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Comment 16 Karsten Thoms CLA 2018-10-02 11:44:36 EDT
What is the proper way to run UI tests? We use in our Jenkinsfile
  wrap([$class:'Xvnc', useXauthority: true]) { ... }

=> Cannot run program "vncserver"
https://jenkins.eclipse.org/xtext/job/xtext-eclipse/job/kth_issue1309_cbi/6/console
Comment 17 Karsten Thoms CLA 2018-10-04 06:27:10 EDT
> https://wiki.eclipse.org/Jenkins#Jenkins_configuration_and_tools_.28clustered_infra.29
> Currently we don't recommend to use the 'Use github hooks for build triggering' option.

What is the reasoning behind this? We worked with github hooks so far successfully and they work fine. This has the advantage that changes to PR creation/closing are immediately reflected to Jenkins instead of waiting for the next poll. And does 'don't recommend' mean if we want we can do so?
Comment 18 Mikaël Barbero CLA 2018-10-04 06:29:08 EDT
(In reply to Karsten Thoms from comment #17)
> > https://wiki.eclipse.org/Jenkins#Jenkins_configuration_and_tools_.28clustered_infra.29
> > Currently we don't recommend to use the 'Use github hooks for build triggering' option.
> 
> What is the reasoning behind this? We worked with github hooks so far
> successfully and they work fine. This has the advantage that changes to PR
> creation/closing are immediately reflected to Jenkins instead of waiting for
> the next poll. And does 'don't recommend' mean if we want we can do so?

They require the bot to get admin permission, which we can't give for security reasons. We should change the wording to say that we don't allow it.
Comment 19 Karsten Thoms CLA 2018-10-04 11:55:43 EDT
Is there already some example where GHPRB is used in a declarative pipeline? This does not work:

pipeline {
  ...
  triggers {
    githubPullRequest {
      cron('H/2 * * * *')
      useGitHubHooks()
      permitAll()
    }
  }
  ...
}

Triggers definitions cannot have blocks @ line 15, column 3.
   githubPullRequest {
Comment 20 Karsten Thoms CLA 2018-10-04 16:45:34 EDT
Declarative Pipelines seem to be unsupported by GHPRB:
- https://github.com/jenkinsci/ghprb-plugin/issues/617
- https://github.com/jenkinsci/ghprb-plugin/issues/681

I thought that these pipelines are the "way to go" nowadays.

@Mikael: Also don't forget about the issues from comment#15 and comment#16.
Comment 21 Frederic Gurr CLA 2018-10-05 05:06:34 EDT
(In reply to Karsten Thoms from comment #20)
> Declarative Pipelines seem to be unsupported by GHPRB:
> - https://github.com/jenkinsci/ghprb-plugin/issues/617
> - https://github.com/jenkinsci/ghprb-plugin/issues/681
You can use a Multi-branch-pipeline job instead.
Comment 22 Karsten Thoms CLA 2018-10-05 16:58:38 EDT
> You can use a Multi-branch-pipeline job instead.

The jobs are already set up as Multi-branch-pipeline. This will help to detect *branches*, but PRs are different to handle. On old JIPP the GH integration will take care of creating jobs not only for new branches, but also when a PR is opened. So how to achieve that?

For a reference, here is one of the multi-branch-pipeline jobs: https://jenkins.eclipse.org/xtext/job/xtext-lib/
It has only one branch at the moment, since we need a different Jenkinsfile than before which exists ATM only on that branch. The Jenkinsfile is here: https://github.com/eclipse/xtext-lib/blob/kth_issue1309_cbi/Jenkinsfile_CBI
Note that this one contains the faulty GHPRB configuration. So how to configure building pull requests when the setup is:
- job is Multi-branch-pipeline
- Jenkinsfile is using declarative pipeline
- Pull Requests are causing new Jobs to be created and give feedback to the PR

We have that currently on JIPP:
https://ci.eclipse.org/xtext/job/xtext-lib/view/change-requests/
https://github.com/eclipse/xtext-lib/pull/117 (Expand "All checks passed", it is linked to the PR build)
Comment 23 Frederic Gurr CLA 2018-10-08 07:03:32 EDT
Just to clarify: GHPRB is not compatible with pipeline jobs. So multi-branch-pipeline is the way to go.

I've tweaked the GitHub integration settings. Please try again.
Comment 24 Frederic Gurr CLA 2018-10-08 07:09:15 EDT
(In reply to Karsten Thoms from comment #16)
> What is the proper way to run UI tests? We use in our Jenkinsfile
>   wrap([$class:'Xvnc', useXauthority: true]) { ... }
> 
> => Cannot run program "vncserver"
> https://jenkins.eclipse.org/xtext/job/xtext-eclipse/job/kth_issue1309_cbi/6/
> console
UI tests are not supported in the default docker image. You will need to specify another docker image in your Jenkinsfile. There was a discussion on the cbi-dev mailing list with regards to UI tests and docker images a couple of days ago.
Comment 25 Karsten Thoms CLA 2018-10-08 09:07:02 EDT
(In reply to Frederic Gurr from comment #23)
> Just to clarify: GHPRB is not compatible with pipeline jobs. So
> multi-branch-pipeline is the way to go.
> 
> I've tweaked the GitHub integration settings. Please try again.

I have configured a cron trigger now. After I manually triggered "Scan Repository Now" the PR job appears.
https://jenkins.eclipse.org/xtext/job/xtext-lib/view/change-requests/

Have to observe now if the PR detection occurs automatically.


I would expect that also feedback goes to the PR:
https://github.com/eclipse/xtext-lib/pull/120

There are 2 entries in the Checks section for CI build, but both point to the old JIPP. I would expect that the new JIPP would also produce an entry. Is there something needed additionally to be configured in the GH integration?
Comment 26 Mikaël Barbero CLA 2018-10-10 05:00:43 EDT
(In reply to Karsten Thoms from comment #15)
> 1) 
> 'open-jdk-latest' seems to point to openjdk 10, not 11
> /opt/tools/java/openjdk/jdk-10/10.0.2/bin/java

This is fixed.

> 2)
> When using openjdk-jdk11-latest JVM option 'UseCGroupMemoryLimitForHeap'
> becomes invalid. Execution on openjdk 10 already warned about this
> depracation. This seems to be a global option.
> 
> Build fails with error:
>   Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions
> -XX:+UseCGroupMemoryLimitForHeap
>   Unrecognized VM option 'UseCGroupMemoryLimitForHeap'
> 
> On openjdk 10 you see:
>   OpenJDK 64-Bit Server VM warning: Option UseCGroupMemoryLimitForHeap was
> deprecated in version 10.0 and will likely be removed in a future release.
> 
> Please remove the global setting '-XX:+UnlockExperimentalVMOptions'.

I'm still looking for where this option is defined. Stay tuned.

> 3)
> I'd like to try the parallel-test-executor plugin. Could you add that please?

Done.

> 4)
> A security warning is raised while accessing OSSRH snapshot repository. I
> have seen such a problem on JDK 8 previously, but this build is running on
> openjdk 10:
> https://jenkins.eclipse.org/xtext/job/xtext-maven/job/kth_issue1309_cbi/1/
> console
> 
> Seems here only a warning, but can this be resolved?
> 
> [WARNING] Could not transfer metadata
> org.eclipse.emf:org.eclipse.emf.mwe.core/maven-metadata.xml from/to
> sonatype-nexus-snapshots
> (https://oss.sonatype.org/content/repositories/snapshots):
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target

I have no idea what this issue is. We will have a look.
Comment 27 Mikaël Barbero CLA 2018-10-12 15:13:56 EDT
(In reply to Mikaël Barbero from comment #26)
> > 2)
> > When using openjdk-jdk11-latest JVM option 'UseCGroupMemoryLimitForHeap'
> > becomes invalid. Execution on openjdk 10 already warned about this
> > depracation. This seems to be a global option.
> > 
> > Build fails with error:
> >   Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions
> > -XX:+UseCGroupMemoryLimitForHeap
> >   Unrecognized VM option 'UseCGroupMemoryLimitForHeap'
> > 
> > On openjdk 10 you see:
> >   OpenJDK 64-Bit Server VM warning: Option UseCGroupMemoryLimitForHeap was
> > deprecated in version 10.0 and will likely be removed in a future release.
> > 
> > Please remove the global setting '-XX:+UnlockExperimentalVMOptions'.
> 
> I'm still looking for where this option is defined. Stay tuned.

This should be fixed. Please try again. See also bug 540066.
Comment 28 Frederic Gurr CLA 2018-10-15 05:46:15 EDT
Can we close this issue or is there something left to do?
Comment 29 Karsten Thoms CLA 2018-10-15 16:25:28 EDT
I think the remaining steps we need to achieve are worth more specific tickets. We can close this one.