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

[Packaging] linux-packaging helper.rb::detect_version function tries to find version from non-existent java/pom.xml when no ARROW_VERSION is defined #45347

Open
raulcd opened this issue Jan 24, 2025 · 1 comment

Comments

@raulcd
Copy link
Member

raulcd commented Jan 24, 2025

Describe the bug, including details regarding any error messages, version, and platform.

I am trying to reproduce how to build linux packages locally and was testing the different steps when I realised we are still trying to identify the version from the java pom.xml if no ARROW_VERSION is used.

This is how I reproduced from arrow/dev/tasks/linux-packages/apache-arrow:

$ rake version:update ARROW_RELEASE_TIME="$(date --iso-8601=seconds)"
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /home/raulcd/code/arrow/dev/tasks/linux-packages/../../../java/pom.xml
/home/raulcd/code/arrow/dev/tasks/linux-packages/helper.rb:53:in `read'
/home/raulcd/code/arrow/dev/tasks/linux-packages/helper.rb:53:in `detect_version'
/home/raulcd/code/arrow/dev/tasks/linux-packages/apache-arrow/Rakefile:29:in `initialize'
/home/raulcd/code/arrow/dev/tasks/linux-packages/apache-arrow/Rakefile:128:in `new'
/home/raulcd/code/arrow/dev/tasks/linux-packages/apache-arrow/Rakefile:128:in `<top (required)>'
(See full trace by running task with --trace)

We should update the following to not use java/pom.xml:

def detect_version(release_time)
version_env = ENV["ARROW_VERSION"]
return version_env if version_env
pom_xml_path = File.join(arrow_source_dir, "java", "pom.xml")
pom_xml_content = File.read(pom_xml_path)
version = pom_xml_content[/^ <version>(.+?)<\/version>/, 1]
formatted_release_time = release_time.strftime("%Y%m%d")
version.gsub(/-SNAPSHOT\z/) {"-dev#{formatted_release_time}"}
end

Component(s)

Packaging

kou added a commit to kou/arrow that referenced this issue Jan 24, 2025
…java/pom.xml to detect version

java/pom.xml was moved to apache/arrow-java from apache/arrow.
@kou
Copy link
Member

kou commented Jan 24, 2025

Oh, sorry. I missed this.

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

No branches or pull requests

2 participants