Skip to content

feat(dev/release): verify binary JARs on Windows - #4624

Open
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:gh-4583
Open

feat(dev/release): verify binary JARs on Windows#4624
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:gh-4583

Conversation

@lidavidm

@lidavidm lidavidm commented Jul 29, 2026

Copy link
Copy Markdown
Member
  • Add a skeleton for binary verification
  • Add options (like the Unix script) to control what to verify
  • Add Java JAR verification by testing a minimal Maven project

On a Windows VM I've used the 24 RC1 artifacts (which are still
present) to validate that the test fails as expected.

This is intentionally minimal. It can be extended for other
platforms and binaries next.

Part of #682.
Part of #4583.

Assisted-by: GPT 5.6 Sol codex@openai.com

@lidavidm

Copy link
Copy Markdown
Member Author

That said, even with LLMs, I'm still tempted to declare that verification will require Python and just unify the verification scripts across platforms rather than maintain both PowerShell and Bash versions.

lidavidm added 2 commits July 31, 2026 13:47
- Add a skeleton for binary verification
- Add options (like the Unix script) to control what to verify
- Add Java JAR verification by testing a minimal Maven project

On a Windows VM I've used the 24 RC1 artifacts (which are still
present) to validate that the test fails as expected.

Part of apache#4583.

Assisted-by: GPT 5.6 Sol <codex@openai.com>
@lidavidm

lidavidm commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

I'll fix this separately. #4639

> if (!requireNamespace("testthat", quietly = TRUE)) install.packages("testthat", repos = "https://cloud.r-project.org/")
> 
+ R CMD INSTALL /tmp/arrow-adbc-1.13.0.Zr0E8/apache-arrow-adbc-1.13.0/r/adbcdrivermanager --preclean --library=/tmp/arrow-adbc-1.13.0.Zr0E8/r/tmplib
* installing *source* package ‘adbcdrivermanager’ ...
** this is package ‘adbcdrivermanager’ version ‘0.24.0.9000’
** using staged installation
Running bootstrap.R...
** libs
Error: C++20 standard requested but CXX20 is not defined
* removing ‘/tmp/arrow-adbc-1.13.0.Zr0E8/r/tmplib/adbcdrivermanager’
+ cleanup
+ chmod -R u+w /tmp/arrow-adbc-1.13.0.Zr0E8
+ '[' no = yes ']'
Failed to verify release candidate. See /tmp/arrow-adbc-1.13.0.Zr0E8 for details.
+ echo 'Failed to verify release candidate. See /tmp/arrow-adbc-1.13.0.Zr0E8 for details.'

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm supportive of having a single bash script for all paltforms. The deps we need on Windows are pretty easy to acquire.

# Use conda, mamba appears to ignore --force
conda remove -y --force gtest
# Activating doesn't appear to set GOROOT
$env:GOROOT = $(Join-Path $ArrowTempDir conda-env go)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should make any use of Join-Path compatible with Powershell 5 which is default. Only newer Join-Path supports more than two args to Join-Path.

Suggested change
$env:GOROOT = $(Join-Path $ArrowTempDir conda-env go)
$env:GOROOT = $(Join-Path $ArrowTempDir $(Join-Path conda-env go))

if ($TestJars) {
Show-Header "Verify Java JARs"
if ($env:JAVA_HOME -eq $null) {
$env:JAVA_HOME = & java -XshowSettings:properties -version 2>&1 | Select-String "java.home" | ForEach-Object { $_.ToString().Split("=")[1].Trim() }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When I test this locally, I error at this step:

============================================================
Verify Java JARs
============================================================
java.exe : Property settings:
At C:\Users\Bryce\src\apache\arrow-adbc\dev\release\verify-release-candidate.ps1:246 char:30
+ ... nv:JAVA_HOME = & java -XshowSettings:properties -version 2>&1 | Selec ...
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Property settings::String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Claude thinks this is because of setting,

$ErrorActionPreference = "Stop"

earlier in the script. This was its suggestion which seems reasonable:

Suggested change
$env:JAVA_HOME = & java -XshowSettings:properties -version 2>&1 | Select-String "java.home" | ForEach-Object { $_.ToString().Split("=")[1].Trim() }
$javaPath = (Get-Command java).Source
$env:JAVA_HOME = Split-Path (Split-Path $javaPath -Parent) -Parent

Tested locally and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants