Skip to content

Fix Function Deployment Polling (Handle 404 After Create) #1421

@Bhatt21

Description

@Bhatt21

Currently, when deploying a Cloud Function using create(), we sometimes see a 404 error when immediately trying to get() the function. This happens because the function creation process in Cloud Functions v1 is asynchronous—create() returns before the function is fully registered, causing transient 404 responses.
it happens here

I have a fix ready that adds proper polling logic:

Retry on 404 (since it means the function is not yet recognized).

Handle everything else as usual

Should we continue using Cloud Functions v1, or should we migrate to Cloud Functions v2?
In v2, we can poll the long-running Operation instead of polling get(), but moving to v2 might require more changes.
Would love input on whether we should stay with v1 and apply the polling fix, or consider moving to v2.

Note** Almost every time, get() fails with a 404 unless a manual delay is added.

Side Note: Lithops is awesome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions