dabla commented on code in PR #77370: URL: https://github.com/apache/airflow/pull/77370#discussion_r4639581109
########## providers/common/io/src/airflow/providers/common/io/xcom/backend.py: ########## @@ -66,7 +66,14 @@ def _get_compression_suffix(compression: str) -> str: @cache def _get_base_path() -> ObjectStoragePath: - return ObjectStoragePath(conf.get_mandatory_value(SECTION, "xcom_objectstorage_path")) + path = conf.get_mandatory_value(SECTION, "xcom_objectstorage_path") + # Reads only resolve URLs, so a schemeless path would read back as the path string. + if not urlsplit(path).scheme: + raise ValueError( Review Comment: **[nit]** The config docs could say what this message now enforces. `provider.yaml` isn't in the diff, so this sits on the new error. The `xcom_objectstorage_path` description still reads "Path to a location on object storage where XComs can be stored in url format", with `s3://conn_id@bucket/path` as the only example. Someone reading the config reference only finds out that a scheme is required (and that `file:///…` is the way to get local storage) when a task fails. One sentence in the description would make the docs match the code: the path needs a URL scheme once `xcom_objectstorage_threshold` is 0 or higher, and `file:///path/to/xcom` works for local storage. Then regenerate the provider docs and `get_provider_info.py`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
