ros-infrastructure / ros_buildfarm

ROS buildfarm based on Docker
Apache License 2.0
81 stars 96 forks source link

Add support for bare file paths in index URL #974

Closed cottsay closed 1 year ago

cottsay commented 2 years ago

This change enhances the URL resolution to support specifying bare file paths for the index URL. Previously, absolute file paths could be converted to URL syntax ('file:///foo/bar'), but with this change, any specified URL which lacks a schema will be treated as a file path. A relative file path is also supported, and is resolved from the current working directory (as expected).

This change leverages these traits of 'urljoin':

A great example where this behavior is desirable (and expected) is when using the validate_config_index.py script to inspect a local ros_buildfarm_config index, where you currently must use a file:///... absolute URL (like this).