You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <kw...@apache.org> on 2023/05/12 12:24:00 UTC

Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Hi,
Currently we still build by default all our modules with Java 8 on Linux only [1].
In SLING-11843 I proposed to change the default to Java 11 and 17 with Linux and Windows. 
The default build (i.e. the one which deploys the Snapshot) would be Java 11 on Linux.

As there were some concerns raised that multiple builds may break due to this change I would like to hear if there are any objections to raise the default CI build in the proposed way.
In my opinion every maintained Sling module should build nowadays with Java 11 and 17 on both Linux and Windows (to ease contributions).
All other failing modules either need to be fixes accordingly or deprecated.

Thanks in advance for your opinions,
Konrad


[1] - https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor#Slingmoduledescriptor-DefaultValues
[2] - https://issues.apache.org/jira/browse/SLING-11843

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2023-05-15 at 16:51 +0200, Konrad Windszus wrote:
> 
> 
> > Is a Jenkins rebuild
> > going to happen once the
> > https://github.com/apache/sling-tooling-jenkins/pull/16 is merged
> > or
> > will the potential failures be exposed once a new CI job runs?
> > 
> No, not automatically. But either through a dedicated build (due to
> some commits in the affected module repository) or latest through the
> automatic weekly build
> (https://github.com/apache/sling-tooling-jenkins/blob/a9f5de4236ed657
> 118a9561e3367c107856a72ef/vars/slingOsgiBundleBuild.groovy#LL64C56-
> L64C56) it will be triggered.
> 
> I don’t think there is the need to rebuild all Modules immediately
> after this change (also to not overload the ASF Jenkins).

Good to know.

Thanks,
Robert

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Konrad Windszus <kw...@apache.org>.

> Is a Jenkins rebuild
> going to happen once the
> https://github.com/apache/sling-tooling-jenkins/pull/16 is merged or
> will the potential failures be exposed once a new CI job runs?
> 
No, not automatically. But either through a dedicated build (due to some commits in the affected module repository) or latest through the automatic weekly build (https://github.com/apache/sling-tooling-jenkins/blob/a9f5de4236ed657118a9561e3367c107856a72ef/vars/slingOsgiBundleBuild.groovy#LL64C56-L64C56) it will be triggered.

I don’t think there is the need to rebuild all Modules immediately after this change (also to not overload the ASF Jenkins).

Konrad

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2023-05-15 at 13:31 +0000, Stefan Seifert wrote:
> 
> > -----Original Message-----
> > From: Robert Munteanu <ro...@apache.org>
> > Sent: Monday, May 15, 2023 2:57 PM
> > To: dev@sling.apache.org
> > Subject: Re: Automatically build on ASF Jenkins with Java 11/17 on
> > Linux/Windows
> > 
> > I was thinking of a set of gradual changes:
> > 
> > 1. Add Windows alongside Linux
> > 2. Add Java 11
> > 3. Add Java 17, drop Java 8
> 
> ah, ok.
> if we want to separate the steps i would see more use in:
> 
> 1. add windows alongside linux and java 11 and java 17
> 2. drop java 8
> 
> as all builds for linux/windows and different JDKs are executed
> separately by Jenkins it's immediately visible which combination is
> still fine and which change leads to problems. and if you start
> fixing the builds for a project, it's probably easier to fix them all
> together than to pick it up again every few months on the next
> iterative step.
> 
> and as stated earlier, personally for me it would also be fine to
> include everything in a single step and dropping java 8 right-away.

That is also fine with me.

Thanks,
Robert

RE: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Stefan Seifert <St...@diva-e.com.INVALID>.
> -----Original Message-----
> From: Robert Munteanu <ro...@apache.org>
> Sent: Monday, May 15, 2023 2:57 PM
> To: dev@sling.apache.org
> Subject: Re: Automatically build on ASF Jenkins with Java 11/17 on
> Linux/Windows
> 
> I was thinking of a set of gradual changes:
> 
> 1. Add Windows alongside Linux
> 2. Add Java 11
> 3. Add Java 17, drop Java 8

ah, ok.
if we want to separate the steps i would see more use in:

1. add windows alongside linux and java 11 and java 17
2. drop java 8

as all builds for linux/windows and different JDKs are executed separately by Jenkins it's immediately visible which combination is still fine and which change leads to problems. and if you start fixing the builds for a project, it's probably easier to fix them all together than to pick it up again every few months on the next iterative step.

and as stated earlier, personally for me it would also be fine to include everything in a single step and dropping java 8 right-away.

stefan

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2023-05-15 at 12:51 +0000, Stefan Seifert wrote:
>  
> > The concern I raised was on making it hard to fix a module because
> > we
> > introduce multiple changes
> > 
> > - Java 8 → Java 11, Java 17
> > - Linux → Linux, Windows
> > 
> > That will make it more difficult to get the module building again.
> > I am
> > not _that_ worried about Windows, I am more thinking about the need
> > to
> > update the parent POM to >= 35 for Java 11, which brings the
> > migration to
> > bnd and to the official OSGi annotations.
> 
> what would be your proposal to make this less painful? add java 11
> and java 17 builds but not remove java 8 builds yet, so it's easier
> to detect in the different Jenkins builds results that it's still
> fine with java 8; and remove the java 8 build later?
> 

I was thinking of a set of gradual changes:

1. Add Windows alongside Linux
2. Add Java 11
3. Add Java 17, drop Java 8

Thanks,
Robert


RE: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Stefan Seifert <St...@diva-e.com.INVALID>.
 
> The concern I raised was on making it hard to fix a module because we
> introduce multiple changes
> 
> - Java 8 → Java 11, Java 17
> - Linux → Linux, Windows
> 
> That will make it more difficult to get the module building again. I am
> not _that_ worried about Windows, I am more thinking about the need to
> update the parent POM to >= 35 for Java 11, which brings the migration to
> bnd and to the official OSGi annotations.

what would be your proposal to make this less painful? add java 11 and java 17 builds but not remove java 8 builds yet, so it's easier to detect in the different Jenkins builds results that it's still fine with java 8; and remove the java 8 build later?

stefan


Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
Hi,

On Fri, 2023-05-12 at 14:24 +0200, Konrad Windszus wrote:
> Hi,
> Currently we still build by default all our modules with Java 8 on
> Linux only [1].
> In SLING-11843 I proposed to change the default to Java 11 and 17
> with Linux and Windows. 
> The default build (i.e. the one which deploys the Snapshot) would be
> Java 11 on Linux.
> 
> As there were some concerns raised that multiple builds may break due
> to this change I would like to hear if there are any objections to
> raise the default CI build in the proposed way.
> In my opinion every maintained Sling module should build nowadays
> with Java 11 and 17 on both Linux and Windows (to ease
> contributions).

Overall I think this is a very good idea. We will make it simpler for
new contributors. I don't think people usually have Java 8 installed
and not everyone is on Linux (yet ;-) ).

The concern I raised was on making it hard to fix a module because we
introduce multiple changes

- Java 8 → Java 11, Java 17
- Linux → Linux, Windows

That will make it more difficult to get the module building again. I am
not _that_ worried about Windows, I am more thinking about the need to
update the parent POM to >= 35 for Java 11, which brings the migration
to bnd and to the official OSGi annotations.

If I'm the only one concerned, then we should not spend more time
talking about it and "just do it" instead :-)

It would be good to send a notification when the merge happens, so
maintainers can check which modules are affected. Is a Jenkins rebuild
going to happen once the
https://github.com/apache/sling-tooling-jenkins/pull/16 is merged or
will the potential failures be exposed once a new CI job runs?

Thanks,
Robert

> All other failing modules either need to be fixes accordingly or
> deprecated.
> 
> Thanks in advance for your opinions,
> Konrad
> 
> 
> [1] -
> https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor#Slingmoduledescriptor-DefaultValues
> [2] - https://issues.apache.org/jira/browse/SLING-11843


Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Konrad Windszus <kw...@apache.org>.
Hi,
Given Robert stated

> If I'm the only one concerned, then we should not spend more time
> talking about it and "just do it" instead :-)


And no one else raised any concern I will go ahead and merge the PR connected with https://issues.apache.org/jira/browse/SLING-11843.
Hopefully that allows us to improve compatibility with Windows and Java 11/17.

Thanks,
Konrad


> On 12. May 2023, at 14:24, Konrad Windszus <kw...@apache.org> wrote:
> 
> Hi,
> Currently we still build by default all our modules with Java 8 on Linux only [1].
> In SLING-11843 I proposed to change the default to Java 11 and 17 with Linux and Windows. 
> The default build (i.e. the one which deploys the Snapshot) would be Java 11 on Linux.
> 
> As there were some concerns raised that multiple builds may break due to this change I would like to hear if there are any objections to raise the default CI build in the proposed way.
> In my opinion every maintained Sling module should build nowadays with Java 11 and 17 on both Linux and Windows (to ease contributions).
> All other failing modules either need to be fixes accordingly or deprecated.
> 
> Thanks in advance for your opinions,
> Konrad
> 
> 
> [1] - https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor#Slingmoduledescriptor-DefaultValues
> [2] - https://issues.apache.org/jira/browse/SLING-11843


Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
On Fri, 2023-06-02 at 15:28 +0200, Konrad Windszus wrote:
> Thanks, but I would rename the page. The failures are not specific to
> Jenkins or CI but rather generic Maven build with Java 17 issues.
> Konrad 

Sure, feel free to rename as you see fit.

Thanks,
Robert

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Konrad Windszus <ko...@windszus.net>.
Thanks, but I would rename the page. The failures are not specific to Jenkins or CI but rather generic Maven build with Java 17 issues.
Konrad 

> Am 02.06.2023 um 13:40 schrieb Robert Munteanu <ro...@apache.org>:
> 
> Hi,
> 
>> On Fri, 2023-05-12 at 14:24 +0200, Konrad Windszus wrote:
>> All other failing modules either need to be fixes accordingly or
>> deprecated.
> 
> I created a wiki page [1] which tracks failures that are often seen
> when updating to a new Java version. Feel free to use it as a reference
> for known fixes and to enhance it with new ones.
> 
> Thanks,
> Robert
> 
> [1]:
> https://cwiki.apache.org/confluence/display/SLING/Common+CI+failures+when+upgrading+to+a+new+Java+version

Re: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Robert Munteanu <ro...@apache.org>.
Hi,

On Fri, 2023-05-12 at 14:24 +0200, Konrad Windszus wrote:
> All other failing modules either need to be fixes accordingly or
> deprecated.

I created a wiki page [1] which tracks failures that are often seen
when updating to a new Java version. Feel free to use it as a reference
for known fixes and to enhance it with new ones.

Thanks,
Robert

[1]:
https://cwiki.apache.org/confluence/display/SLING/Common+CI+failures+when+upgrading+to+a+new+Java+version

RE: Automatically build on ASF Jenkins with Java 11/17 on Linux/Windows

Posted by Stefan Seifert <St...@diva-e.com.INVALID>.
robert detected a bigger number of builds failing with those new defaults (~90) - but after looking on the list of failures it seems to me that most of them affect modules not touched for some years, and likely on completely outdated sling-parent pom. only a few current ones have issues with Java 17.

in my POV it's fine to switch the defaults now, and afterwards look into the failing tests and fix the relevant ones.

stefan


> -----Original Message-----
> From: Konrad Windszus <kw...@apache.org>
> Sent: Friday, May 12, 2023 2:24 PM
> To: dev@sling.apache.org
> Subject: Automatically build on ASF Jenkins with Java 11/17 on
> Linux/Windows
> 
> Hi,
> Currently we still build by default all our modules with Java 8 on Linux
> only [1].
> In SLING-11843 I proposed to change the default to Java 11 and 17 with
> Linux and Windows.
> The default build (i.e. the one which deploys the Snapshot) would be Java
> 11 on Linux.
> 
> As there were some concerns raised that multiple builds may break due to
> this change I would like to hear if there are any objections to raise the
> default CI build in the proposed way.
> In my opinion every maintained Sling module should build nowadays with
> Java 11 and 17 on both Linux and Windows (to ease contributions).
> All other failing modules either need to be fixes accordingly or
> deprecated.
> 
> Thanks in advance for your opinions,
> Konrad
> 
> 
> [1] -
> https://cwiki.apache.org/confluence/display/SLING/Sling+module+descriptor#
> Slingmoduledescriptor-DefaultValues
> [2] - https://issues.apache.org/jira/browse/SLING-11843