Skip to content

8360816: [11u] Use default value for ProgramFiles(x86) in GHA #3056

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

Closed
wants to merge 2 commits into from

Conversation

vieiro
Copy link
Contributor

@vieiro vieiro commented Jun 27, 2025

A fix for JDK-8360816.

The ProgramFiles(x86) environment variable is not properly propagated to JTReg tests in JDK11, which makes the AOT compiler tests fail on the new windows-2025 GHA runners, as manifested in the backport of https://bugs.openjdk.org/browse/JDK-8358538.

Propagating this environment variable to JTRegs may require creating devkits for Windows 2022, but previous attempts were discarded JDK-8283723.

This fix prints a warning message when this environment variable is not set, and then uses a default value (C:\Program Files (x86)) that makes it possible to run the AOT tests with these new windows-2025 GHA runners. If the ProgramFiles(x86) env variable is set the fix has no effect, ensuring the previous behaviour. If the proposed default value is incorrect the AOT tests will continue to fail as before.

The PR is on top of #3052 to verify the fix works as intended with the new windows-2025 GHA runners.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8360816 needs maintainer approval

Issue

  • JDK-8360816: [11u] Use default value for ProgramFiles(x86) in GHA (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3056

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 27, 2025

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

@openjdk
Copy link

openjdk bot commented Jun 27, 2025

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

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

8360816: [11u] Use default value for ProgramFiles(x86) in GHA

Reviewed-by: sgehwolf

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jerboaa) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 27, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 27, 2025

Webrevs

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/3052 to master June 27, 2025 12:05
@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 fixes/JDK-8360816
git fetch https://git.openjdk.org/jdk11u-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

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Why don't we set the expected ProgramFiles(x86) environment variable to value C:\\Program Files (x86) in the GHA job? This would be a less invasive fix as the code in this PR changes product code.

@vieiro
Copy link
Contributor Author

vieiro commented Jun 27, 2025

Why don't we set the expected ProgramFiles(x86) environment variable to value C:\\Program Files (x86) in the GHA job? This would be a less invasive fix as the code in this PR changes product code.

ProgramFiles(x86) does not comply with naming conventions for configuration variables (but who knows, maybe we can pass it as an environment variable, despite it having parentheses in the name). Also JTReg may refuse to pass that env variable to the test.

I think we could also add a new entry to the VSVERSIONS enum, specific to the 2022 configuration, that also uses default C:\\Program Files (x86) paths, but this will touch product code in any case.

I'll experiment with this and report back.

@vieiro vieiro force-pushed the fixes/JDK-8360816 branch from a358297 to 14e3f88 Compare June 27, 2025 16:53
@openjdk
Copy link

openjdk bot commented Jun 27, 2025

@vieiro Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@vieiro vieiro closed this Jun 27, 2025
@vieiro vieiro force-pushed the fixes/JDK-8360816 branch from 14e3f88 to 0927ca7 Compare June 27, 2025 17:01
@vieiro vieiro reopened this Jun 27, 2025
@openjdk
Copy link

openjdk bot commented Jun 27, 2025

@vieiro Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@vieiro
Copy link
Contributor Author

vieiro commented Jun 27, 2025

We cannot add a ProgramFiles(x86) environment variable through Github Actions, because JTReg will block it (the list of environment variables that JTReg passes to tests on Windows is very small.

We can instead add it directly to the JTReg options using -eKEY:VALUE, properly escaping the spaces and the backslashes.

This is cleaner (no changes to product code) but it propagates the environment variable on Linux and MacOS.

@jerboaa
Copy link
Contributor

jerboaa commented Jul 1, 2025

This is cleaner (no changes to product code) but it propagates the environment variable on Linux and MacOS.

Right, but we can fix that too. See my suggested comment.

@vieiro
Copy link
Contributor Author

vieiro commented Jul 1, 2025

Ah, that's clever. Will do that during the week! Thanks!

@vieiro
Copy link
Contributor Author

vieiro commented Jul 2, 2025

Well, this should do it...

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Seems OK.

@openjdk
Copy link

openjdk bot commented Jul 2, 2025

⚠️ @vieiro 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.

@vieiro
Copy link
Contributor Author

vieiro commented Jul 2, 2025

/approval request Please consider approving this PR as it makes it possible to pass the AOT compiler tests in GitHub Actions with the latest "windows-2025" runners. Little risk as only the .github files are modified.

@openjdk
Copy link

openjdk bot commented Jul 2, 2025

@vieiro
8360816: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Jul 2, 2025
@vieiro
Copy link
Contributor Author

vieiro commented Jul 2, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 2, 2025
@openjdk
Copy link

openjdk bot commented Jul 2, 2025

@vieiro
Your change (at version 51e8454) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Jul 2, 2025

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 2, 2025

Going to push as commit 646b6b5.

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

openjdk bot commented Jul 2, 2025

@jerboaa @vieiro Pushed as commit 646b6b5.

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

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

Successfully merging this pull request may close these issues.

2 participants