<@U01EY27APNH> (or anyone else, I just like buggi...
# adobe
d
@Mark Takata (Adobe) (or anyone else, I just like bugging Mark), Any specific reason why when I try and use getCloudService() I don't get an error that the package isn't installed like other packages?
Also, for reference, the alias in the code doesn't exist. I am working on my CFSummit presentation and getting some config screenshots for setup and usage. I was hoping CF would throw an error that you needed to install the package. But, nope.
Ok.. played around a little more. Looks like you can get CF to tell you you need to install the gcpfirestore package a couple ways. 1: When you try and add a cloud service config in the cfadmin and select firestore as service name 2: When you try and interact with a firestore service after creating a valid cloud credential in cfadmin I was however, able to add a cloud credential without having any GCP packages installed. This just seems off and disjointed to me as I had no GCP packages installed in the server. I need to go multiple levels into the config before I am told I am missing a package. This is counter to other package missing notifications in the admin / code.
m
Dave, that's definitely a bug. Please drop a tracker note. cc: @Bagish Mishra (Bagish please do a check with the team on this for all of the GCP and other cloud feature error handling for packages)
b
sure
n
@dfgrumpy: Can you please share more details about these strings that you are using “GCP-Firestore-Owner-SA” and “myGCPAliass” ? Have you created these configurations in CF admin ?
There are 3 ways in which you can use getCloudService() API to get the cloud service handle. 1. Configure settings in CF Admin and pass it to getCloudService() API as a string. 2. Configure settings at the Application.cfc level and use it in getCloudService() API 3. You can directly pass a struct to getCloudService() API
You can refer this document on how we can create these configuration structs: https://helpx.adobe.com/in/coldfusion/using/integrate-coldfusion-gcp-firestore.html
Since this API is cloud agnostic, we need to pass the service name to this API to work.
Please let me know if we can discuss this issue in more detail.
d
Thanks for getting back to me. Initially I had setup things in the CF admin. I rebuilt the server without installing the gcpfirestore package and that is how I got this error. In subsequent attempts I set some app vars for creds and config. I had issues with that as well and opened other tickets for those. The issue is that the error, in this case, being given is incorrect. It should state that I need to install the gcpfirestore package not the invalid config. The shouldn't matter if the packages are not installed. For example, if I were to do this... fsObject= getCloudService('-','-'); It errors with the error "Invalid Cloud Config Alias (null/Not found)' . Instead of telling me that the package is not installed. The check for the package installation should be the first thing done.
n
Thanks Dave for the detailed information. getCloudService() API is used to the cloud service reference for all cloud services (AWS S3, AWS SNS, Azure ServiceBus, GCP Firestore etc.), so it cannot identify which cloud service you are trying to use if the configuration details does not contain the service name. We can definitely improve the error message and make it more user friendly.
Please do let me know if you are facing any blocker/critical issue which is impacting your CF Summit demo.
d
Hi. I get that it is not specific ... however, I didn't have any packages installed. The error should say something about installing a package, any package.
n
We can consider showing that message if no package is installed.