google-marketing-solutions / vigenair

Recrafting Video Ads with Generative AI
Apache License 2.0
47 stars 12 forks source link

Gcloud CLI beta component now required? #5

Closed nazincubeta closed 3 months ago

nazincubeta commented 4 months ago

So I just pulled the repo just now and tried re-deploying Vigenair to our GCP, when I get this error message:

ERROR: (gcloud) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk].

Click the Google Cloud SDK Shell icon and re-run the command in that window, or re-run the command with elevated privileges by right-clicking cmd.exe and selecting "Run as Administrator".
You do not currently have this command group installed.  Using it
requires the installation of components: [beta]

Does this mean the beta component for Gcloud SDK Shell command line interface is now required?

Thanks.

nazincubeta commented 3 months ago

After I ran Gcloud SDK shell as admin, it asked me to install the gcloud Beta Commands component:

INFO - Creating Service Agents and granting roles...
You do not currently have this command group installed.  Using it
requires the installation of components: [beta]

Your current Google Cloud CLI version is: 464.0.0
Installing components from version: 464.0.0

+---------------------------------------------+
|     These components will be installed.     |
+----------------------+------------+---------+
|         Name         |  Version   |   Size  |
+----------------------+------------+---------+
| gcloud Beta Commands | 2024.02.09 | < 1 MiB |
+----------------------+------------+---------+

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)?  Y
nazincubeta commented 3 months ago

It's now also asking me to enable the Service Usage API, which was not required in the previous Vigenair version last week.

nazincubeta commented 3 months ago

After running npm start as admin with Google Cloud CLI, then installing the Beta component and enabling the Service Usage API, the current build deployed with no more warnings or errors.

mohabfekry commented 3 months ago

Yes, some projects in certain cloud orgs had issues where Service Agents (bots that are created automatically when you enable any API in GCP) weren't created, and the associated functionality was constantly running into errors. Specifically, we saw cases where the Vertex AI Service Agent was missing, which lead to all Gemini calls from Cloud Functions to fail with "500 Internal Server Error".

The impact of that was having no descriptions or keywords attached to every segment created by the tool, which lead to poor quality combinations. Demand Gen assets where also impacted.

This was fixed using gcloud beta, which creates the main service agents we need for the different inter-cloud-components communication, and granting them the necessary roles.

The Service Usage API is a good hint, thank you. We've added it now to the deploy.sh script so that it gets automatically enabled for you on projects.