This is a "solution" that does what I need and does not cause the problem
(by passing output through a passthrough grep, and then to the desired
file), but this is very roundabout.

What is causing appengine deployment to fail when I redirect stderr to a
file?

for i in {1..5}; do gcloud app deploy -q 2>&1 >/dev/null |egrep -i "." >>
err.txt ; done

On Wed, Dec 16, 2020 at 1:17 PM Joshua Fox <jos...@doit-intl.com> wrote:

> I am deploying a trivial App Engine app. (Literally the shortest possible,
> a Python "hello world"-- full code attached.)
>
> If I redirect standard error to file, I get an error (below) every time.
> If I omit the redirection, it succeeds every time. (There is no difference
> between using > or >>.)  Redirecting with a pipe, e.g. to grep, does not
> cause the problem.
>
>   Note that I use -q, so waiting for my Y for approval is not the issue.
>
> for i in {1..5}; do gcloud app deploy -q  2>>err.log ; done
>
> The error is
>
> ..................failed.
> ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build BUILD_ID status: 
> FAILURE
> Build error details: Failed to download at least one file. Cannot continue.
>
> Full build logs: 
> https://console.cloud.google.com/cloud-build/builds/BUILD_ID?project=PROJECT_ID
>
> Error follows (Identifiers were anonymized.)
>
> (Note also StackOverflow question
> <https://stackoverflow.com/questions/65310454>.)
>
> starting build "BUILD_ID"
> FETCHSOURCE
> BUILD
> Starting Step #0 - "fetcher"
> Step #0 - "fetcher": Already have image (with digest): 
> gcr.io/cloud-builders/gcs-fetcher
> Step #0 - "fetcher": Fetching manifest 
> gs://staging.joshua-playground.appspot.com/ae/BUILD_ID/manifest.json.
> Step #0 - "fetcher": Processing 728 files.
> Step #0 - "fetcher": Failed to fetch 
> gs://staging.my-project.appspot.com/BUILD_ID, will no longer retry: fetching 
> "gs://staging.my-project.appspot.com/BUILD_ID" with timeout 1h0m0s to temp 
> file "/workspace/.download/staging.joshua-playground.appspot.com-BUILD_ID": 
> err SHA mismatch, got "SHA_VALUE", want "SHA_VALUE"
> Step #0 - "fetcher": Failed to download at least one file. Cannot continue.
> Finished Step #0 - "fetcher"
> ERROR
> ERROR: build step 0 "gcr.io/cloud-builders/gcs-fetcher" failed: step exited 
> with non-zero status: 1
>
>

-- 

Joshua Fox // DoIT International | Senior Architect | IL: +972 (0545) 69
1165 <+972545691154>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAN0Y2EsO5FfdUKkabagO%3DDYcJaftuv%3DdEJ4AGcrzwq0YYtJxfA%40mail.gmail.com.

Reply via email to