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

Use the latest available jdk #59788

Merged
merged 11 commits into from
Jan 31, 2025
Merged

Use the latest available jdk #59788

merged 11 commits into from
Jan 31, 2025

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jan 9, 2025

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 9, 2025
@ViktorHofer
Copy link
Member Author

ViktorHofer commented Jan 9, 2025

@wtgodbe @BrennanConroy this will fix your builds (everything is broken right now). I opened dotnet/source-build#4816 to track how to best handle this going forward, including your local script to install a jdk.

We patched the VMR with this change to unblock builds.

@ViktorHofer ViktorHofer marked this pull request as ready for review January 9, 2025 12:57
@wtgodbe wtgodbe mentioned this pull request Jan 9, 2025
@wtgodbe
Copy link
Member

wtgodbe commented Jan 9, 2025

Screenshot 2025-01-09 at 1 19 32 PM

Whoa, github AI automatically populated an accurate commit description for my commit. Neat

@wtgodbe wtgodbe enabled auto-merge (squash) January 9, 2025 21:21
@@ -22,7 +22,7 @@ allprojects {
version project.findProperty('packageVersion') ?: "99.99.99-dev"

java {
sourceCompatibility = 1.8
sourceCompatibility = 1.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

invalid source release: 9

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See dotnet/sdk#45822 (comment)

We started hitting an error w/ version 8 when updating to 11.0.25:

EXEC : error : [options] source value 8 is obsolete and will be removed in a future release [D:\a\_work\1\vmr\src\aspnetcore\src\SignalR\clients\java\signalr\core\signalr.client.java.core.javaproj]

I'm not sure how to proceed if the underlying machines are in a mixed state, as they seem to be (some have 11.0.24, which is incompatible w/ 9, and some have 11.0.25, which is incompatible w/ 8)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, never mind, it's Helix, not the build machines. Do you know why non-windows is on JDK 10 & windows is on 11 here? The Helix failure was only on Mac.

<HelixPreCommand Condition="'$(IsWindowsHelixQueue)' == 'true'" Include="call RunPowershell.cmd InstallJdk.ps1 11.0.3 %25HELIX_CORRELATION_PAYLOAD%25\jdk &amp;&amp; set %22JAVA_HOME=%25HELIX_CORRELATION_PAYLOAD%25\jdk%22" />
<HelixPreCommand Condition="'$(IsWindowsHelixQueue)' != 'true' AND '$(IsMacHelixQueue)' != 'true'" Include="./installjdk.sh 10.0.2 x64 &amp;&amp; if [ &quot;%24JAVA_HOME&quot; = &quot;&quot; ]%3B then export JAVA_HOME=%24PWD/java%3B fi" />

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought all machines were supposed to have moved to 21.X?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should remove those lines now? Wonder if we used to have to install the jdk ourselves 5 years ago.

Copy link
Member

@wtgodbe wtgodbe Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I totally missed that. So it looks like whatever version of macos-openjdk is pre-installed on the MacOS-13 queue isn't compatible w/ 1.9. @dotnet/dnceng does anyone know how we can check what version is installed on OSX.13.amd64.open? helix.dot.net doesn't list one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this ask?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet/dnceng#4554

all macOS machines will have OpenJDK 8 and 21 after they are next refreshed

So maybe the machines haven't been refreshed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we have

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

On Windows 🙄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably revert 3b86147

@wtgodbe
Copy link
Member

wtgodbe commented Jan 10, 2025

invalid source release: 9

I think dnceng rolled back the machine updates, we might have to hold this until all machines have a JDK that supports 1.9

@ViktorHofer
Copy link
Member Author

I think dnceng rolled back the machine updates, we might have to hold this until all machines have a JDK that supports 1.9

They rolled back yes, but the 1.9 sourceCompatibility setting works fine in the VMR with this patch. Are you sure that the current jdk that is installed on CI images don't support 1.9? Where do you see that failure?

@akoeplinger
Copy link
Member

akoeplinger commented Jan 10, 2025

@ViktorHofer check the failed jobs. I think it works in the VMR because we're using AzureLinux 3.0 which likely comes with a new JDK, but the builds here are on Ubuntu 20.04 and according to helix.dot.net it only has openjdk-8-jdk again after the rollback.

@ViktorHofer
Copy link
Member Author

Got it. Then I guess we just park this PR until the images get updated again and keep the patch in the VMR meanwhile.

@wtgodbe
Copy link
Member

wtgodbe commented Jan 31, 2025

Actually wait, looks like we're already skipping the mac java tests in Helix, and the local mac failure was for NPM. Looks like that may be transient? Re-running to check

@wtgodbe
Copy link
Member

wtgodbe commented Jan 31, 2025

Looks like the npm failure was unrelated. Filed #60139 to track re-enabling the Java tests on Mac.

@wtgodbe
Copy link
Member

wtgodbe commented Jan 31, 2025

/backport to release/10.0-preview1

Copy link
Contributor

Started backporting to release/10.0-preview1: https://github.com/dotnet/aspnetcore/actions/runs/13078023654

@wtgodbe
Copy link
Member

wtgodbe commented Jan 31, 2025

We have a test failure that looks new - let's quarantine it & merge this to unblock CI

@wtgodbe wtgodbe disabled auto-merge January 31, 2025 18:08
@wtgodbe wtgodbe merged commit 28bad7a into main Jan 31, 2025
24 of 27 checks passed
@wtgodbe wtgodbe deleted the ViktorHofer-patch-1 branch January 31, 2025 18:08
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview2 milestone Jan 31, 2025
@dougbu
Copy link
Member

dougbu commented Jan 31, 2025

any chance of getting the JDK updated/installed on the Mac build machines today?

none. we're in the midst of another rollout revert firedrill

@BrennanConroy
Copy link
Member

Don't tell us the jdk update is going to be reverted...

@dougbu
Copy link
Member

dougbu commented Jan 31, 2025

Don't tell us the jdk update is going to be reverted...

technically, yes it will be reverted. however it won't matter b/c the JDK installation on macOS only happens when machines are imaged. so, no macOS machines should have the new JDK and none will lose it. that's why I mentioned we'd need to work w/ DDFun

please file an issue in dotnet/dnceng and emphasize the urgency of getting this done on the macOS Helix machines. if you can't label the new issue there, let me know here. Needs Triage is probably the best one to apply though one of the Operations* or Ops* labels may help too

@wtgodbe
Copy link
Member

wtgodbe commented Jan 31, 2025

technically, yes it will be reverted. however it won't matter b/c the JDK installation on macOS only happens when machines are imaged. so, no macOS machines should have the new JDK and none will lose it. that's why I mentioned we'd need to work w/ DDFun

What about on Windows/Linux? We needed this PR specifically because of the JDK updates there - if those updates are rolled back, we'll need to revert this (then un-revert it when the updates get re-rolled back out).

wtgodbe added a commit that referenced this pull request Jan 31, 2025
wtgodbe added a commit that referenced this pull request Jan 31, 2025
mkArtakMSFT pushed a commit that referenced this pull request Feb 1, 2025
* Use the latest available jdk

* Specify toolchain in build.gradle files

* Try something else

* Update InstallJdk.ps1

* Remove unused variable `$globalJson` in InstallJdk.ps1

* Update Helix.targets

* Update GsonHubProtocolTest.java

* Update Helix.targets

* Add HelixPreCommand for non-Windows, non-Mac queues

* Update signalr.client.java.Tests.javaproj

* Update SkipHelixQueues for OSX.13.Amd64.Open

---------

Co-authored-by: William Godbe <[email protected]>
Co-authored-by: Brennan <[email protected]>
mkArtakMSFT pushed a commit that referenced this pull request Feb 1, 2025
@dougbu
Copy link
Member

dougbu commented Feb 2, 2025

technically, yes it will be reverted. however it won't matter b/c the JDK installation on macOS only happens when machines are imaged. so, no macOS machines should have the new JDK and none will lose it. that's why I mentioned we'd need to work w/ DDFun

What about on Windows/Linux? We needed this PR specifically because of the JDK updates there - if those updates are rolled back, we'll need to revert this (then un-revert it when the updates get re-rolled back out).

yup. those rolled back and the changes generally happened immediately. we have fewer Linux and Windows machines on-premises than we have VMs

ViktorHofer added a commit that referenced this pull request Feb 6, 2025
github-actions bot pushed a commit that referenced this pull request Feb 6, 2025
github-actions bot pushed a commit that referenced this pull request Feb 6, 2025
wtgodbe pushed a commit that referenced this pull request Feb 6, 2025
wtgodbe pushed a commit that referenced this pull request Feb 6, 2025
* Revert "Revert "Use the latest available jdk (#59788)" (#60143)"

This reverts commit 83da591.

* Update DelegateTests.cs

---------

Co-authored-by: Viktor Hofer <[email protected]>
Co-authored-by: Korolev Dmitry <[email protected]>
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
* Use the latest available jdk

* Specify toolchain in build.gradle files

* Try something else

* Update InstallJdk.ps1

* Remove unused variable `$globalJson` in InstallJdk.ps1

* Update Helix.targets

* Update GsonHubProtocolTest.java

* Update Helix.targets

* Add HelixPreCommand for non-Windows, non-Mac queues

* Update signalr.client.java.Tests.javaproj

* Update SkipHelixQueues for OSX.13.Amd64.Open

---------

Co-authored-by: William Godbe <[email protected]>
Co-authored-by: Brennan <[email protected]>
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants