This is an automated email from the ASF dual-hosted git repository.
linxinyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new b24a44d2da fix(core): Fix Amber Home Path Resolution (#4356)
b24a44d2da is described below
commit b24a44d2da35c52671d82a3a95309b7bfc7cae82
Author: carloea2 <[email protected]>
AuthorDate: Sat Apr 11 02:20:10 2026 -0600
fix(core): Fix Amber Home Path Resolution (#4356)
### What changes were proposed in this PR?
This PR fixes an issue in `amberHomePath` resolution where the previous
implementation could select the wrong repo by going to the parent. This
new approach search directly under the current directory.
Previous:
https://github.com/apache/texera/blob/ac909a07dc656689a946fcc8cf08fbfe6b4595b5/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala#L39-L59
### Any related issues, documentation, discussions?
Closes #4262
### How was this PR tested?
Manually tested
### Was this PR authored or co-authored using generative AI tooling?
No
Co-authored-by: Xinyuan Lin <[email protected]>
---
.../src/main/scala/org/apache/texera/amber/engine/common/Utils.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala
b/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala
index dc074c1094..079640317c 100644
--- a/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala
+++ b/amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala
@@ -42,10 +42,10 @@ object Utils extends LazyLogging {
if (isAmberHomePath(currentWorkingDirectory)) {
currentWorkingDirectory
} else {
- // from current path's parent directory, search its children to find
amber home path
+ // from current path's directory, search its children to find amber home
path
// current max depth is set to 2 (current path's siblings and direct
children)
val searchChildren = Files
- .walk(currentWorkingDirectory.getParent, 2)
+ .walk(currentWorkingDirectory, 2)
.filter((path: Path) => isAmberHomePath(path))
.findAny
if (searchChildren.isPresent) {