Hello there,
I want to mirror artifacts that are not provided through any kind of public repository and require some custom logic to even get the file url for a download.
So creating and assigning a remote would not work in these cases.
One example is the installer of DaVinci Resolve Studio from https://www.blackmagicdesign.com/support/
To achieve this I started utilizing a pulp file repository on my server and uploading content directly.
The upload is implemented via pulp-glue in the python code that fetches the actual download url.
Here an example how I currently create the file content
relative_path: str = f"{product_name}/{product_version}/{Path(url_base).name}"
print(f"processing '{relative_path}' ({index + 1}/{len(missing_artifacts)})")
pulp_file_ctx.create(
body={
"file_url": artifact_url,
"relative_path": relative_path,
"repository": self.pulp_repo_ctx.entity["name"],
}
)
I intentionally want to assign the file_url so pulp handles the download and I avoid having to pre-download.
The logic works just fine with most artifacts until I hit any larger artifacts (up to 9GB). in these cases I get (after some minutes) this kind of timeout error.
Task /pulp/api/v3/tasks/019dc454-0e21-7491-a170-5432a115cea0/ failed: '[PLP0005] Request timed out for https://swr.cloud.blackmagicdesign.com/DaVinciResolve/v20.3/DaVinci_Resolve_Studio_20.3_Windows.zip?verify=1777114847-K03MnZAzq5Tb03TwuOIOjtVJgnxt3oA7GgcLQFkfwBM%3D. Increasing the total_timeout value on the remote might help.'
File "/home/dev_test/artifact_compare/file_providers/blackmagic/sync.py", line 50, in sync
body={
"file_url": artifact_url,
"relative_path": relative_path,
"repository": self.pulp_repo_ctx.entity["name"],
}
)
File "/home/dev_test/artifact_compare/core/file_base.py", line 58, in sync_repo
self.sync()
File "/home/dev_test/artifact_compare/main.py", line 30, in <module>
bm_sync.sync_repo()
pulp_glue.common.exceptions.PulpException: Task /pulp/api/v3/tasks/019dc454-0e21-7491-a170-5432a115cea0/ failed: '[PLP0005] Request timed out for https://swr.cloud.blackmagicdesign.com/DaVinciResolve/v20.3/DaVinci_Resolve_Studio_20.3_Windows.zip?verify=1777114847-K03MnZAzq5Tb03TwuOIOjtVJgnxt3oA7GgcLQFkfwBM%3D. Increasing the total_timeout value on the remote might help.'
As this error is from the pulp task I assume its from the server side. I think it usually happens between 10-15 minutes.
I'm not sure what timeout I'm hitting here and how I can adjust it. So far I didn't find anything in the docs that resolved this.
On the client site I set this but it only helped in cases where the client was timing out before the task on the server did.
pulp_ctx = PulpContext(
api_root="/pulp/",
api_kwargs={
"base_url": pulp_url,
"username": pulp_user_name,
"password": pulp_password,
},
verify_ssl=False,
timeout=timedelta(1800),
)
So let me know if I just missed a setting and can easily adjust this somewhere or if I got any wrong assumptions in my approach.
Hello there,
I want to mirror artifacts that are not provided through any kind of public repository and require some custom logic to even get the file url for a download.
So creating and assigning a remote would not work in these cases.
One example is the installer of DaVinci Resolve Studio from https://www.blackmagicdesign.com/support/
To achieve this I started utilizing a pulp file repository on my server and uploading content directly.
The upload is implemented via pulp-glue in the python code that fetches the actual download url.
Here an example how I currently create the file content
I intentionally want to assign the
file_urlso pulp handles the download and I avoid having to pre-download.The logic works just fine with most artifacts until I hit any larger artifacts (up to 9GB). in these cases I get (after some minutes) this kind of timeout error.
As this error is from the pulp task I assume its from the server side. I think it usually happens between 10-15 minutes.
I'm not sure what timeout I'm hitting here and how I can adjust it. So far I didn't find anything in the docs that resolved this.
On the client site I set this but it only helped in cases where the client was timing out before the task on the server did.
So let me know if I just missed a setting and can easily adjust this somewhere or if I got any wrong assumptions in my approach.