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

Closed
raulcd opened this issue Jan 24, 2025 · 2 comments

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.

raulcd pushed a commit that referenced this issue Jan 27, 2025
…om.xml to detect version (#45348)

### Rationale for this change

java/pom.xml was moved to apache/arrow-java from apache/arrow.

### What changes are included in this PR?

Detect version from cpp/CMakeLists.txt.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #45347

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
@raulcd
Copy link
Member Author

raulcd commented Jan 27, 2025

Issue resolved by pull request 45348
#45348

@raulcd raulcd added this to the 20.0.0 milestone Jan 27, 2025
@raulcd raulcd closed this as completed Jan 27, 2025
lriggs pushed a commit to lriggs/arrow that referenced this issue Jan 30, 2025
…java/pom.xml to detect version (apache#45348)

### Rationale for this change

java/pom.xml was moved to apache/arrow-java from apache/arrow.

### What changes are included in this PR?

Detect version from cpp/CMakeLists.txt.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#45347

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
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