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

GAE buildpack is not able to determine zip file without .zip extension #172

Open
xSAVIKx opened this issue Jan 26, 2022 · 5 comments
Open
Labels
good first issue Good for newcomers kind/bug Something isn't working priority/low

Comments

@xSAVIKx
Copy link

xSAVIKx commented Jan 26, 2022

While deploying GAE standard service with a ZIP archive stored in the GCS I found that it's not capable of determining the archive type properly and just fails after trying to unpack .tar instead of .zip 3 times.

At the same time, GCF buildpack is able to work with the same ZIP archive without any glitches.

I assume the reason behind such behavior is the usage of different buildpacks for GAE and GCF environments. And I assume that GAE uses google.python.webserver to unpack the archive while GCF uses google.utils.archive-source to do the same job.

Can anyone please help me out understanding if that's the case and maybe give a direction on how this can be fixed?

@squee1945
Copy link
Collaborator

Can you mention how you're deploying to GAE?

@xSAVIKx
Copy link
Author

xSAVIKx commented Jan 27, 2022

I'm using Pulumi to deploy the app, but I believe that even with the gcloud cli and a zip archive as a source we'll see the same results.

Pulumi like Terraform uses AppEngine Admin SDK under the hood.

@matthewrobertson matthewrobertson added the kind/bug Something isn't working label Jan 28, 2022
@matthewrobertson
Copy link
Member

@xSAVIKx is right, we do fetch the code differently on GAE and GCF. On GAE we use a custom build step that runs the gcs-fetcher. I guess we would need to fix the bug in that image.

@xSAVIKx
Copy link
Author

xSAVIKx commented Mar 3, 2023

@matthewrobertson, can you please pinpoint where and how we're starting the gcs-fetcher? I'd be glad to jump in and see if I can fix the fetcher, but I have trouble understanding this whole buildpacks/bazel setup and dependencies.

@xSAVIKx
Copy link
Author

xSAVIKx commented Mar 3, 2023

Just tried again. Here are the logs from Cloud Build build of the App Engine app (it hasn't even started the first pre-buildpacks step):

starting build "241b0b97-e90d-425c-bfe2-f8b8171d2ff6"

FETCHSOURCE
Fetching storage object: gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243
Copying gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243...
/ [0 files][    0.0 B/185.0 KiB]                                                
/ [1 files][185.0 KiB/185.0 KiB]                                                
Operation completed over 1 objects/185.0 KiB.                                    
tar: This does not look like a tar archive
tar: Skipping to next header
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Fetching storage object: gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243
Copying gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243...
/ [0 files][    0.0 B/185.0 KiB]                                                
/ [1 files][185.0 KiB/185.0 KiB]                                                
Operation completed over 1 objects/185.0 KiB.                                    
gzip: stdin has more than one entry--rest ignored
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Fetching storage object: gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243
Copying gs://<PROJECT_ID>/<PROJECT_NAME>-sources-6236cb3#1677879307405243...
/ [0 files][    0.0 B/185.0 KiB]                                                
/ [1 files][185.0 KiB/185.0 KiB]                                                
Operation completed over 1 objects/185.0 KiB.                                    
gzip: stdin has more than one entry--rest ignored
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Child returned status 2
tar: Error is not recoverable: exiting now
ERROR
ERROR: error fetching storage source: generic::unknown: retry budget exhausted (3 attempts): fetching gcs source: unpacking source from gcs: source fetch container exited with non-zero status: 2

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Something isn't working priority/low
Projects
None yet
Development

No branches or pull requests

4 participants