You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are using dbt loom in our project on both MacOS and Windows computers. For the MacOS computers, everything works perfectly. However, for the Windows machines, we couldn't perform "dbt deps" or "dbt parse", as we always encountered a runtime error. After debugging for a while, we found the error.
Our dbt loom config looks the following:
In the config, we provide a relative local path to another dbt package we want to import
Then, by DBT Loom, it gets converted to an absolute path via the Pathlib
This Path again is converted to a string
The string is split into the individual parts by "urlsplit" -> here, normally path should end up in the path attribute in. However, for windows machines it ends up in the the netloc attribute. The reason for that is that on Windows, when converting the absolute path to a string, the path starts with two 2 forward slashes, which lets urlsplit parse it into the netloc attribute.
To Reproduce
Testing a dbt package import with a dbt loom config like above and on Windows 11.
Expected behavior
For now, we fixed it by patching the function "load_from_local_filesystem" in manifests.py the following way (if the path attribute is empty, it should look for it in the netloc attribute):
@staticmethod
def load_from_local_filesystem(config: FileReferenceConfig) -> Dict:
"""Load a manifest dictionary from a local file"""
path = config.path.path
if not path:
path = config.path.netloc
if not path:
raise InvalidManifestPath()
file_path = Path(path)
if not file_path.exists():
raise LoomConfigurationError(f"The path `{file_path}` does not exist.")
if file_path.suffix == ".gz":
with gzip.open(file_path, "rt") as file:
return json.load(file)
return json.load(open(file_path))
This was just a hotfix for us. Ideally, there is a better solution for that.
Screenshots
See code above.
OS: Windows 11
dbt-loom Version: 0.6.0
dbt-core Version: 1.8.7
Let me know if you have any further questions, happy to help/support! :)
The text was updated successfully, but these errors were encountered:
Alas, Windows is going to be a bit of a gap for the moment -- I don't have any Windows machines to test with! 😅 I'll see if I can get a VM going or something equivalent, so I can test out the hotfix and devise a more robust solution.
Describe the bug
We are using dbt loom in our project on both MacOS and Windows computers. For the MacOS computers, everything works perfectly. However, for the Windows machines, we couldn't perform "dbt deps" or "dbt parse", as we always encountered a runtime error. After debugging for a while, we found the error.
Our dbt loom config looks the following:
To Reproduce
Testing a dbt package import with a dbt loom config like above and on Windows 11.
Expected behavior
For now, we fixed it by patching the function "load_from_local_filesystem" in manifests.py the following way (if the path attribute is empty, it should look for it in the netloc attribute):
This was just a hotfix for us. Ideally, there is a better solution for that.
Screenshots
See code above.
Let me know if you have any further questions, happy to help/support! :)
The text was updated successfully, but these errors were encountered: