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

Log error instead of crash on failed branch re-alignment #48

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

dgellow
Copy link
Member

@dgellow dgellow commented Oct 2, 2023

No description provided.

@@ -444,6 +445,9 @@ export class Manifest {
parseConfig(github, configFile, changesBranch, path, releaseAs),
parseReleasedVersions(github, manifestFile, changesBranch),
]);
if (manifestOptions.logger) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

@dgellow dgellow Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manifestOptions.logger is an optional logger instance to use. By default release-please relies on a global logger defined in src/util/logger.ts.

When CLI commands are run, setupLogger() is called to do some configuration.

In our case we are using release-please via fromManifest(), and pass the logger via the option. But I'm not convinced release-please correctly use the logger from the options all the time. It is safer to also set the global one to ensure a consistent logging behaviour.

@dgellow dgellow merged commit 47844fc into main Oct 3, 2023
4 checks passed
@dgellow dgellow deleted the sam/no-crash-on-failed-alignment branch October 3, 2023 08:11
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.

2 participants