Skip to content

Report cvd stack traces failing main only to the log file#2826

Open
Databean wants to merge 1 commit into
google:mainfrom
Databean:stack_trace_to_log_file
Open

Report cvd stack traces failing main only to the log file#2826
Databean wants to merge 1 commit into
google:mainfrom
Databean:stack_trace_to_log_file

Conversation

@Databean

@Databean Databean commented Jul 9, 2026

Copy link
Copy Markdown
Member

Bug: b/507554710

@Databean Databean requested a review from 3405691582 July 9, 2026 01:31
@Databean Databean enabled auto-merge July 9, 2026 01:33
@Databean Databean force-pushed the stack_trace_to_log_file branch from 0f045ad to 8b12841 Compare July 9, 2026 02:06
@Databean Databean added the kokoro:run Run e2e tests. label Jul 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Jul 9, 2026
Comment thread base/cvd/cuttlefish/host/commands/cvd/main.cc
@Databean Databean added kokoro:force-run Trigger a presubmit build unconditionally. kokoro:run Run e2e tests. labels Jul 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed kokoro:run Run e2e tests. kokoro:force-run Trigger a presubmit build unconditionally. labels Jul 9, 2026
@Databean Databean force-pushed the stack_trace_to_log_file branch from 8b12841 to 22a1816 Compare July 9, 2026 17:29
@Databean Databean added kokoro:force-run Trigger a presubmit build unconditionally. kokoro:run Run e2e tests. labels Jul 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed kokoro:run Run e2e tests. kokoro:force-run Trigger a presubmit build unconditionally. labels Jul 9, 2026
@Databean Databean force-pushed the stack_trace_to_log_file branch from 22a1816 to 8a8174b Compare July 9, 2026 18:40
@Databean

Databean commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

This was failing create_with_gce_metadata_credentials_test because the test validates that there is specific content in the error message:

_, err := srv.CreateCVD(req, &hoclient.AccessTokenBuildAPICreds{})
log.Printf("error: %s\n", err)
const expected = "Could not resolve host: metadata.google.internal"
if !strings.Contains(fmt.Sprintf("%s", err), expected) {
t.Fatalf("%q part not found in error message", expected)
}

I've additionally restricted the logic to the scenario where stderr is an interactive terminal to hopefully preserve host orchestrator interactions with cvd.

FYI @ser-io

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

Successfully merging this pull request may close these issues.

3 participants