Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Warn when logger is available #766

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions doozerlib/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,14 +806,15 @@ def images_build_image(runtime, repo_type, repo, push_to_defaults, push_to, scra
3. You will probably want to use --scratch since it is unlikely you want your
custom build tagged.
"""
if runtime.assembly != 'stream' and comment_on_pr:
runtime.logger.warning("Commenting on PRs is only supported for stream assembly")
comment_on_pr = False

# Initialize all distgit directories before trying to build. This is to
# ensure all build locks are acquired before the builds start and for
# clarity in the logs.
runtime.initialize(clone_distgits=True)

if runtime.assembly not in ['stream', 'test'] and comment_on_pr:
runtime.logger.warning("Commenting on PRs is only supported for stream/test assemblies")
comment_on_pr = False

runtime.assert_mutation_is_permitted()

cmd = runtime.command
Expand Down