The local SDK's implementation of Cloud Storage seems faulty.

With the local SDK, the key for the filename does not match the hash used 
to test it.  For example:

Trying to create a text file to cache some data.  My app will create 3 
files:
65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json<https://storage.cloud.google.com/overnumerousness-site-cache%2Fcache%2F_system%2F65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json?response-content-disposition=attachment;%20filename=65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json>
65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-8fd4480eb27d93ea5a1239204577441a.json<https://storage.cloud.google.com/overnumerousness-site-cache%2Fcache%2F_system%2F65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-8fd4480eb27d93ea5a1239204577441a.json?response-content-disposition=attachment;%20filename=65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-8fd4480eb27d93ea5a1239204577441a.json>
65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-929adb9b368342c818ec393fb978a452.json<https://storage.cloud.google.com/overnumerousness-site-cache%2Fcache%2F_system%2F65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-929adb9b368342c818ec393fb978a452.json?response-content-disposition=attachment;%20filename=65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-929adb9b368342c818ec393fb978a452.json>

These are all created in the same bucket, gs://bucketname
and in the same "subfolders" cache/_system

So, for example, the full pathname of the first file will be:
gs://bucketname/cache/_system/
65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json<https://storage.cloud.google.com/overnumerousness-site-cache%2Fcache%2F_system%2F65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json?response-content-disposition=attachment;%20filename=65f1b09f8d57d15f0ec5f76d57ee034a-cache-_system-4035f745484f79c89073a196c46b3e8a.json>

I'm running under the Joomla CMS.  Whenever a new set of data is cached, it 
will call a method to generate a filename based on a hash of the key.  It 
also runs a check to make sure the "subdirectory" for the group exists.

*// returns the hashed monstrosity of a filename*
* $name = $this->_getCacheId($id, $group);*

*// Creates the fill directory name of gs://bucketname/cache/_system *
*$dir = $this->_root . '/' . $group;*

* // If the folder doesn't exist try to create it - presumably when run for 
3 files sequentially would only need to be called once*
* if (!is_dir($dir))*
* {*

*// Instead, this gets called 3 times  - remove the comment from the echo 
clause and watch it keep running*
* // echo "creating $dir<br/>";*
* mkdir($dir, 700 , true, $this->dirctx);*
* }*

*// returns the full pathname for the file to store to gs.  *
* return $dir . '/' . $name . '.json' ;*



By the same token, attempts to retrieve saved data from "Cloud Storage" 
 via the local SDK also fails.  

I'm wondering if maybe there is a filename length limit I'm hitting on the 
local SDK which does not exist for the deployed app?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to