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

8318039: GHA: Bump macOS and Xcode versions #2206

Closed
wants to merge 1 commit into from
Closed

Conversation

gdams
Copy link
Member

@gdams gdams commented Feb 13, 2024

In GHA, the versions of macOS (note: the version used for build/test, not the target macOS version we compile for) and Xcode are starting to show age. It's time to update to more modern versions.

This change bumps the macOS to 13 (from 11) and Xcode to 14.3.1 (from 12.5.1/11.7). This is a prerequisite change for JDK-8317970 / openjdk/jdk#16155, without which the build SIGSEGVs (presumably some since-fixed issue in Xcode 12.5.1).

The macOS jobs are expected to fail until all remaining instances of sprintf have been replaced as well as gtest upgraded


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8318039 needs maintainer approval

Issue

  • JDK-8318039: GHA: Bump macOS and Xcode versions (Enhancement - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2206/head:pull/2206
$ git checkout pull/2206

Update a local copy of the PR:
$ git checkout pull/2206
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2206/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2206

View PR using the GUI difftool:
$ git pr show -t 2206

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2206.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 13, 2024

👋 Welcome back gdams! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 79bd47a78c0cc34bf3ff068038ef5cc1d56b762a 8318039: GHA: Bump macOS and Xcode versions Feb 13, 2024
@openjdk
Copy link

openjdk bot commented Feb 13, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Feb 13, 2024

⚠️ @gdams This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 13, 2024
@gdams
Copy link
Member Author

gdams commented Feb 13, 2024

/approval request backport applies cleanly, affects CI only

@openjdk
Copy link

openjdk bot commented Feb 13, 2024

@gdams
8318039: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Feb 13, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 13, 2024

Webrevs

@gdams
Copy link
Member Author

gdams commented Feb 13, 2024

Looks like it's failing with sprintf errors. I'll need to backport:

https://bugs.openjdk.org/browse/JDK-8299635 and https://bugs.openjdk.org/browse/JDK-8299378

@gdams
Copy link
Member Author

gdams commented Feb 13, 2024

/approval cancel

@gdams gdams marked this pull request as draft February 13, 2024 11:39
@openjdk openjdk bot removed the rfr Pull request is ready for review label Feb 13, 2024
@openjdk
Copy link

openjdk bot commented Feb 13, 2024

@gdams
8318039: The approval request has been cancelled successfully.

@openjdk openjdk bot removed the approval label Feb 13, 2024
@openjdk
Copy link

openjdk bot commented Mar 13, 2024

@gdams This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8318039: GHA: Bump macOS and Xcode versions

Reviewed-by: andrew

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

  • 8d974ea: 8299378: sprintf is deprecated in Xcode 14
  • e191f94: 8299397: Remove metaprogramming/isFloatingPoint.hpp

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@bridgekeeper
Copy link

bridgekeeper bot commented May 9, 2024

@gdams This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@zzambers
Copy link
Contributor

zzambers commented Jul 1, 2024

It would be nice to have this done, as macos-11 seems to have been dropped in GHA

@zzambers
Copy link
Contributor

zzambers commented Jul 1, 2024

But it seems, quite a few sprintf related backports needs to be done first (not just 2 mentioned higher), see JDK-8296812 and linked issues.. :(

@gnu-andrew
Copy link
Member

@gdams do you plan to reopen this? Now the MacOS 11 runner is gone, adding this to have some MacOS build which we can then fix with follow-up backports would be better than no build at all.

@gdams
Copy link
Member Author

gdams commented Jul 3, 2024

@gdams do you plan to reopen this? Now the MacOS 11 runner is gone, adding this to have some MacOS build which we can then fix with follow-up backports would be better than no build at all.

yeah it would be good to get this backported. I think the issue was the complexity of the other xcode-related backports that needed to go in first so if people wanted to pick them up I'd encourage them to take a look

@gdams gdams changed the base branch from master to pr/2662 July 4, 2024 19:01
@openjdk-notifier openjdk-notifier bot changed the base branch from pr/2662 to master July 5, 2024 07:14
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout xcode
git fetch https://git.openjdk.org/jdk17u-dev.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot removed the clean label Jul 5, 2024
@gdams gdams changed the base branch from master to pr/2663 July 5, 2024 08:42
@openjdk openjdk bot added clean rfr Pull request is ready for review labels Jul 5, 2024
@gdams
Copy link
Member Author

gdams commented Jul 5, 2024

@gnu-andrew I'll kick off the approval request now if you're happy to approve it so we can get the ball rolling

/approval request clean backport, CI-only so low risk. This is required as macos-11 github executors have been deprecated and several PRs are now stuck in a pending state

@openjdk
Copy link

openjdk bot commented Jul 5, 2024

@gdams
8318039: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Jul 5, 2024
@gnu-andrew
Copy link
Member

@gdams do you plan to reopen this? Now the MacOS 11 runner is gone, adding this to have some MacOS build which we can then fix with follow-up backports would be better than no build at all.

yeah it would be good to get this backported. I think the issue was the complexity of the other xcode-related backports that needed to go in first so if people wanted to pick them up I'd encourage them to take a look

Thanks. I'll have a look at #2663 but I think this may need to go in first now, because the Mac OS 11 runner is gone (actions/runner-images#9255 (comment)) and this is why the Mac tasks on that PR are still spinning.

I'd like to get #2661 and #2663 merged first and then I'll propose that we merge this one (with failing builds)

Ok, both approved now. I don't mind the order if these are imminent (and thanks for doing them so quickly). When I looked yesterday, it looked like these fixes might take longer.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Identical to 21u, just bumps MacOS and XCode versions in the GHA workflow.

@gnu-andrew
Copy link
Member

/approve yes

@openjdk
Copy link

openjdk bot commented Jul 5, 2024

@gnu-andrew
8318039: The approval request has been approved.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Jul 5, 2024
@gdams
Copy link
Member Author

gdams commented Jul 5, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Jul 5, 2024

Going to push as commit 7144027.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 8d974ea: 8299378: sprintf is deprecated in Xcode 14
  • e191f94: 8299397: Remove metaprogramming/isFloatingPoint.hpp

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 5, 2024
@openjdk openjdk bot closed this Jul 5, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 5, 2024
@openjdk
Copy link

openjdk bot commented Jul 5, 2024

@gdams Pushed as commit 7144027.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@gnu-andrew
Copy link
Member

@gdams are you planning to also fix this in 11u & 8u?

@gdams gdams deleted the xcode branch July 9, 2024 08:27
@gdams
Copy link
Member Author

gdams commented Jul 9, 2024

@gdams are you planning to also fix this in 11u & 8u?

I've been speaking to @vieiro who is tackling 11u - albeit these changes are even more complex than 17u but I'm happy to help where possible.

8u is a much harder one to fix, one thing I'd considered was bumping the CI to macos-12 (which is still in support) and has xcode 13.x installed on it. This would only be pushing the problem down the road for now but would at least get 8u green again. WDYT?

@jerboaa
Copy link
Contributor

jerboaa commented Jul 9, 2024

@gdams are you planning to also fix this in 11u & 8u?

I've been speaking to @vieiro who is tackling 11u - albeit these changes are even more complex than 17u but I'm happy to help where possible.

For 11u I don't think we can do the google test upgrade since that would need all the type trait fixes (all the linked issues in JDK-8299386. We will have to find a more minimal solution there.

8u is a much harder one to fix, one thing I'd considered was bumping the CI to macos-12 (which is still in support) and has xcode 13.x installed on it. This would only be pushing the problem down the road for now but would at least get 8u green again. WDYT?

Yes, that sounds about right. That's enough change as it is. We need the lowest risk solution for that one, which means the fewest amount of changes/backports. On the plus side, gtest isn't needed for JDK 8 since it only got introduced in JDK 9 with: https://openjdk.org/jeps/281

@gdams
Copy link
Member Author

gdams commented Jul 9, 2024

For 11u I don't think we can do the google test upgrade since that would need all the type trait fixes (all the linked issues in JDK-8299386. We will have to find a more minimal solution there.

We won't need to do that for 11u as https://bugs.openjdk.org/browse/JDK-8222414 is 13+. It should just be a case of backporting the appropriate sprint removals.

Yes, that sounds about right. That's enough change as it is. We need the lowest risk solution for that one, which means the fewest amount of changes/backports. On the plus side, gtest isn't needed for JDK 8 since it only got introduced in JDK 9 with: https://openjdk.org/jeps/281

I did have a go at building 8u with Xcode 13 on macos-12 but wasn't successful, I'll do some digging and see what needs to be backported

@jerboaa
Copy link
Contributor

jerboaa commented Jul 9, 2024

For 11u I don't think we can do the google test upgrade since that would need all the type trait fixes (all the linked issues in JDK-8299386. We will have to find a more minimal solution there.

We won't need to do that for 11u as https://bugs.openjdk.org/browse/JDK-8222414 is 13+. It should just be a case of backporting the appropriate sprint removals.

Good to know. Thanks!

@zzambers
Copy link
Contributor

zzambers commented Jul 9, 2024

For 11u I don't think we can do the google test upgrade since that would need all the type trait fixes (all the linked issues in JDK-8299386. We will have to find a more minimal solution there.

We won't need to do that for 11u as https://bugs.openjdk.org/browse/JDK-8222414 is 13+. It should just be a case of backporting the appropriate sprint removals.

Yes, that sounds about right. That's enough change as it is. We need the lowest risk solution for that one, which means the fewest amount of changes/backports. On the plus side, gtest isn't needed for JDK 8 since it only got introduced in JDK 9 with: https://openjdk.org/jeps/281

I did have a go at building 8u with Xcode 13 on macos-12 but wasn't successful, I'll do some digging and see what needs to be backported

I have also done some experiments with jdk8 and I was able to pass builds on macos-12 + Xcode 13.1 in GHA.
At first, I saw this build failure on macos-12:

...
## Starting jaxp
Compiling 1870 files for BUILD_JAXP
/usr/bin/awk: towc: multibyte conversion failure on: '�vard Wigtil)'
Updating jaxp/dist/lib/src.zip

 input record number 22, file 
 source line number 1
gmake[1]: *** [BuildJaxp.gmk:58: /Users/runner/work/jdk8u-dev/jdk8u-dev/jdk/build/macos-x64/jaxp/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties] Error 2
gmake[1]: *** Waiting for unfinished jobs....
...

However I was able to fix this by installing gawk.

@gdams
Copy link
Member Author

gdams commented Jul 9, 2024

For 11u I don't think we can do the google test upgrade since that would need all the type trait fixes (all the linked issues in JDK-8299386. We will have to find a more minimal solution there.

We won't need to do that for 11u as https://bugs.openjdk.org/browse/JDK-8222414 is 13+. It should just be a case of backporting the appropriate sprint removals.

Yes, that sounds about right. That's enough change as it is. We need the lowest risk solution for that one, which means the fewest amount of changes/backports. On the plus side, gtest isn't needed for JDK 8 since it only got introduced in JDK 9 with: https://openjdk.org/jeps/281

I did have a go at building 8u with Xcode 13 on macos-12 but wasn't successful, I'll do some digging and see what needs to be backported

I have also done some experiments with jdk8 and I was able to pass builds on macos-12 + Xcode 13.1 in GHA. At first, I saw this build failure on macos-12:

...
## Starting jaxp
Compiling 1870 files for BUILD_JAXP
/usr/bin/awk: towc: multibyte conversion failure on: '�vard Wigtil)'
Updating jaxp/dist/lib/src.zip

 input record number 22, file 
 source line number 1
gmake[1]: *** [BuildJaxp.gmk:58: /Users/runner/work/jdk8u-dev/jdk8u-dev/jdk/build/macos-x64/jaxp/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties] Error 2
gmake[1]: *** Waiting for unfinished jobs....
...

However I was able to fix this by installing gawk.

Interesting, you seem to have got further than I did, would you raise a PR so I can take a look @zzambers

@zzambers
Copy link
Contributor

zzambers commented Jul 9, 2024

@gdams Sure.

Actually, turned out, I was even able build jdk8 on macos-13 and Xcode 14.3.1, so I created it as backport of this issue.

PR (with details): openjdk/jdk8u-dev#544

@vieiro
Copy link

vieiro commented Jul 9, 2024

Hi all,

Yes, for 11 I'm trying to do as less changes as required.

@zzambers you may want to take a look at the advances in 11, the ordered list of issues we're tackling is currently:

  1. 8318039: GHA: Bump macOS and Xcode versions - Integrated.
  2. 8296812: sprintf is deprecated in Xcode 14
  3. 8299254: Support dealing with standard assert macro
  4. 8299635: Hotspot update for deprecated sprintf in Xcode
  5. ... More to come

@zzambers
Copy link
Contributor

zzambers commented Jul 9, 2024

@vieiro thanks

jdk8u is not in such hurry as 11/17, as additional backports are not necessary to pass the build (it's build system seems to be more relaxed, when it comes warnings as errors). I can take a look on some 11/17 backports, if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants