fix(build): use container directories in executable_search_paths when building in container#1030
fix(build): use container directories in executable_search_paths when building in container#1030sanathkr merged 6 commits intoaws:developfrom
Conversation
There was a problem hiding this comment.
Nit: can we add kwarg mapping.
Clarification:
Add kwarg mapping to the method call _convert_to_container_dirs
_convert_to_container_dirs(host_paths_to_convert=executable_search_paths, host_to_container_path_mapping={source_dir:containers_dir["source_dir"],manifest_dir: containers_dir["manifest_dir"]})
There was a problem hiding this comment.
This is under the assumption that, the base path we are looking for, is already mounted within the container correct?
eg:
/a/b is already mounted within container, and we are just passing additional /a/b/c as additional path.
There was a problem hiding this comment.
No, result is a list. I am just adding elements to the list without altering the container paths themselves.
There was a problem hiding this comment.
ok this is a passthrough, but searching this path within the container will not turn up anything right?
There was a problem hiding this comment.
In other words, if the path that is supplied to be added as executable_search_path within the container is already present in the mapping of paths to be mounted, we add the path to be mounted within the container to list of executable search paths.
Also this is very opinionated to adding just source_dir or manifest_dir within the container to search paths, and not any other sub paths.
eg: instead of just /tmp/source_dir and /tmp/manifest_dir , we dont yet support /tmp/source_dir/myexecutable_versions/
There was a problem hiding this comment.
Correct, we don't support that. This is a good call out. We should be okay for the gradlew case now, but we definitely need to implement a generic path-translation logic that handles lot of these cases
sriram-mv
left a comment
There was a problem hiding this comment.
Thank you for engaging through my long list of questions 🥇
Fixes #1029
Issue #, if available:
Description of changes:
Checklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.