In generation logic, when generating all libraries, we allow failure for one library and continue:
|
if err := r.generateSingleLibrary(ctx, library.ID, outputDir); err != nil { |
|
// TODO(https://github.com/googleapis/librarian/issues/983): record failure and report in PR body when applicable |
|
slog.Error("failed to generate library", "id", library.ID, "err", err) |
|
prBody += fmt.Sprintf("%s failed to generate\n", library.ID) |
For failure that occurred in runGenerateCommand, prior to "clean and copy" this should work as we expect.
|
generatedLibraryID, err := r.runGenerateCommand(ctx, libraryID, outputDir) |
|
if err != nil { |
|
return err |
|
} |
However, if failure is in subsequent steps, e.g. in build. We should expect the code change for the failed library reverted and not included in final worktree/PR. Currently, we do not have clean ups, I believe they will end-up in the changes produced.
|
if err := r.runBuildCommand(ctx, generatedLibraryID); err != nil { |
|
return err |
|
} |
In generation logic, when generating all libraries, we allow failure for one library and continue:
librarian/internal/librarian/generate.go
Lines 183 to 186 in 4b35724
For failure that occurred in
runGenerateCommand, prior to "clean and copy" this should work as we expect.librarian/internal/librarian/generate.go
Lines 216 to 219 in 4b35724
However, if failure is in subsequent steps, e.g. in build. We should expect the code change for the failed library reverted and not included in final worktree/PR. Currently, we do not have clean ups, I believe they will end-up in the changes produced.
librarian/internal/librarian/generate.go
Lines 221 to 223 in 4b35724