encode-dcc / autouri Goto Github PK
View Code? Open in Web Editor NEWRecursive localization for various types of URIs
License: MIT License
Recursive localization for various types of URIs
License: MIT License
I am using caper
, which I have integrated into my own application as a library in order to provide a convenient API around Cromwell.
While submitting a workflow to Cromwell using , using a local WDL file, and an inputs JSON file located in Google Cloud Storage, I am having some issues that I have traced to AutoURI that perhaps you could help me with.
For some reason, the PUT call from the following code returns a 403 Forbidden (Access Denied) error from the Google Cloud Storage APIs. This is strange, because the principal trying to make the call, has full roles/storage.admin
(Storage Admin) permissions on the Google Cloud Project. The Google Cloud Policy Analyzer confirms that it should have no issues accessing/updating the object.
Lines 270 to 274 in 73d97ac
I also know that this shouldn't be failing like this, because a few milliseconds seconds earlier, my application makes a number of successful requests to the bucket, including a POST request that uploads the inputs JSON file.
I believe this might have to do with the object having just been uploaded a few seconds earlier. I suspect that the a-time (which is I assume what the comment means) cannot be updated when the upload time is so soon.
I was wondering if you had any insight into this? I know it's definitely a Google Cloud Error, but I'm wondering if this is an issue that you might have seen before.
Here's a full stack trace showing the interaction with caper
:
File "/opt/dashboard/server/handlers/submit_handler.py", line 216, in post
submitted = server.submit_client.submit(wdl=str(wdl_path), inputs=config_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/caper/caper_client.py", line 343, in submit
inputs = AutoURI(maybe_remote_file).localize_on(work_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/autouri/autouri.py", line 409, in localize_on
return AutoURI.localize(
^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/autouri/autouri.py", line 646, in localize
src_uri.cp(
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/autouri/autouri.py", line 338, in cp
if not self._cp(dest_uri=d):
^^^^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/autouri/gcsuri.py", line 272, in _cp
src_blob.update()
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/google/cloud/storage/_helpers.py", line 433, in update
api_response = client._put_resource(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/google/cloud/storage/client.py", line 555, in _put_resource
return self._connection.api_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/google/cloud/storage/_http.py", line 72, in api_request
return call()
^^^^^^
File "/opt/dashboard/server/venv/lib/python3.11/site-packages/google/cloud/_http/__init__.py", line 494, in api_request
raise exceptions.from_http_response(response)
google.api_core.exceptions.Forbidden: 403 PUT https://storage.googleapis.com/storage/v1/b/my-bucket/o/config%input.json?generation=1704960651986132&projection=full&prettyPrint=false: Access denied.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.