Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource_Error #36

Open
mibto opened this issue Jul 19, 2022 · 7 comments
Open

Resource_Error #36

mibto opened this issue Jul 19, 2022 · 7 comments

Comments

@mibto
Copy link

mibto commented Jul 19, 2022

Hi Typesense Team

i get the following message when i try to install this extension with the console and cli

RESOURCE_ERROR at /deployments/firebase-ext-firestore-typesense-search/resources/backfillToTypesenseFromFirestore: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":"Build failed: {"metrics":{},"error":{"buildpackId":"","buildpackVersion":"","errorType":"OK","canonicalCode":"OK","errorId":"","errorMessage":""},"stats":[{"buildpackId":"google.nodejs.runtime","buildpackVersion":"1.0.0","totalDurationMs":1496,"userDurationMs":0},{"buildpackId":"google.utils.archive-source","buildpackVersion":"0.0.1","totalDurationMs":45,"userDurationMs":44},{"buildpackId":"google.nodejs.npm","buildpackVersion":"1.0.0","totalDurationMs":6428,"userDurationMs":6185},{"buildpackId":"google.nodejs.functions-framework","buildpackVersion":"0.9.4","totalDurationMs":3756,"userDurationMs":3541},{"buildpackId":"google.config.entrypoint","buildpackVersion":"0.9.0","totalDurationMs":0,"userDurationMs":0},{"buildpackId":"google.utils.label","buildpackVersion":"0.0.2","totalDurationMs":0,"userDurationMs":0}],"warnings":null,"customImage":false}"}; RESOURCE_ERROR at /deployments/firebase-ext-firestore-typesense-search/resources/indexToTypesenseOnFirestoreWrite: {"ResourceType":"gcp-types/cloudfunctions-v1:projects.locations.functions","ResourceErrorCode":"400","ResourceErrorMessage":"Build failed: {"metrics":{},"error":{"buildpackId":"","buildpackVersion":"","errorType":"OK","canonicalCode":"OK","errorId":"","errorMessage":""},"stats":[{"buildpackId":"google.nodejs.runtime","buildpackVersion":"1.0.0","totalDurationMs":1485,"userDurationMs":0},{"buildpackId":"google.utils.archive-source","buildpackVersion":"0.0.1","totalDurationMs":59,"userDurationMs":59},{"buildpackId":"google.nodejs.npm","buildpackVersion":"1.0.0","totalDurationMs":6677,"userDurationMs":6425},{"buildpackId":"google.nodejs.functions-framework","buildpackVersion":"0.9.4","totalDurationMs":3689,"userDurationMs":3477},{"buildpackId":"google.config.entrypoint","buildpackVersion":"0.9.0","totalDurationMs":0,"userDurationMs":0},{"buildpackId":"google.utils.label","buildpackVersion":"0.0.2","totalDurationMs":0,"userDurationMs":0}],"warnings":null,"customImage":false}"}

when i look at the cloud functions there is a warning that the functions could not be built - log message from the function:

Build failed: {"metrics":{},"error":{"buildpackId":"","buildpackVersion":"","errorType":"OK","canonicalCode":"OK","errorId":"","errorMessage":""},"stats":[{"buildpackId":"google.nodejs.runtime","buildpackVersion":"1.0.0","totalDurationMs":1437,"userDurationMs":0},{"buildpackId":"google.utils.archive-source","buildpackVersion":"0.0.1","totalDurationMs":42,"userDurationMs":42},{"buildpackId":"google.nodejs.npm","buildpackVersion":"1.0.0","totalDurationMs":6883,"userDurationMs":6640},{"buildpackId":"google.nodejs.functions-framework","buildpackVersion":"0.9.4","totalDurationMs":3529,"userDurationMs":3323},{"buildpackId":"google.config.entrypoint","buildpackVersion":"0.9.0","totalDurationMs":0,"userDurationMs":0},{"buildpackId":"google.utils.label","buildpackVersion":"0.0.2","totalDurationMs":0,"userDurationMs":0}],"warnings":null,"customImage":false}

Thanks
Michael

@mibto
Copy link
Author

mibto commented Jul 19, 2022

  "environmentVariables": {
    "DATABASE_INSTANCE": "",
    "DATABASE_URL": "",
    "EXT_INSTANCE_ID": "firestore-typesense-search-p78z",
    "FIREBASE_CONFIG": "{\"projectId\":\"workid-d9387\",\"databaseURL\":\"\",\"storageBucket\":\"workid-d9387.appspot.com\"}",
    "FIRESTORE_COLLECTION_PATH": "occupations",

this looks a bit suspicious to me empty database_url / instance

@i14h
Copy link

i14h commented Jul 20, 2022

@mibto Firebaser here. I took a look around and saw nothing suspicious happening in Cloud Build or Cloud Functions. We've escalated this internally to the Cloud Build team to check your account and its permissions. I suggest creating a ticket with Cloud Support to keep track of the updates from our side.

@mibto
Copy link
Author

mibto commented Jul 20, 2022

Hi @i14h
I found the issue, it's because i redirected the traffic from container registry to artefact registry. i have reproduced it with a new project. unfortunately i already finalized the redirect, which can not be undone :(

any idea how i can get it working with he artefact registry?

thanks!
Michael

@i14h
Copy link

i14h commented Jul 21, 2022

thanks for the information. let me dig a bit and see what I can find

@mibto
Copy link
Author

mibto commented Jul 29, 2022

I just found the "solution"

--> go to https://console.cloud.google.com/functions -> edit the functions -> expand "Runtime, build, connections and security settings", select "SECURITY AND IMAGE REPO", under "Image repository", select "Google managed Artifact Registry".

would be nice if the extension could detect if you are using the container registry or artefact registry and deploy the functions accordingly

@mibto mibto changed the title Ressource_Error Resource_Error Jul 29, 2022
@mibto
Copy link
Author

mibto commented Mar 8, 2023

@jasonbosco why is this closed? did you change something?

@jasonbosco
Copy link
Member

I read your last comment and thought you had found a solution... Happy to re-open it.

From what I can tell though, this sounds like it's outside the realm of what extensions can do in general @i14h?

@jasonbosco jasonbosco reopened this Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants