Skip to content

Remove --verbose from drush core:cron command#1006

Open
davereid wants to merge 1 commit intomainfrom
remove-verbose-from-drush-cron
Open

Remove --verbose from drush core:cron command#1006
davereid wants to merge 1 commit intomainfrom
remove-verbose-from-drush-cron

Conversation

@davereid
Copy link
Copy Markdown
Member

@davereid davereid commented Nov 20, 2025

My logs for builds (on a site that deploys multiple sites in parallel) are often filled with a lot of Drush verbose output on cron:

[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase: bootstrapDrupalRoot()
[update:all] [site]      [drupal:update]  [info] Change working directory to /var/lib/tugboat/web
[update:all] [site]      [drupal:update]  [info] Initialized Drupal 11.2.8 root directory at /var/lib/tugboat/web
[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase: bootstrapDrupalSite()
[update:all] [site]      [drupal:update]  [info] Initialized Drupal site site-ulzl3zdhpmsglbvcfjspenhutcwc4vqj.tugboatqa.com at sites/site
[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase: bootstrapDrupalConfiguration()
[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase: bootstrapDrupalDatabase()
[update:all] [site]      [drupal:update]  [info] Successfully connected to the Drupal database.
[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase: bootstrapDrupalFull()
[update:all] [site]      [drupal:update]  [info] Starting bootstrap to none
[update:all] [site]      [drupal:update]  [info] Drush bootstrap phase 0
[update:all] [site]      [drupal:update]  [info] Try to validate bootstrap phase 0
[update:all] [site]      [drupal:update]  [info] Starting execution of dblog_cron().
[update:all] [site]      [drupal:update]  [info] Starting execution of field_cron(), execution of dblog_cron() took 1.81ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of file_cron(), execution of field_cron() took 0.8ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of layout_builder_cron(), execution of file_cron() took 21.09ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of lightning_scheduler_cron(), execution of layout_builder_cron() took 0.01ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of node_cron(), execution of lightning_scheduler_cron() took 63.75ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of search_cron(), execution of node_cron() took 7.93ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of system_cron(), execution of search_cron() took 5.93ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of trash_cron(), execution of system_cron() took 32.48ms.
[update:all] [site]      [drupal:update]  [info] Starting execution of update_cron(), execution of trash_cron() took 0.17ms.
[update:all] [site]      [drupal:update]  [info] Execution of update_cron() took 1258.68ms.
[update:all] [site]      [drupal:update]  [info] Cron run completed.

Maybe there's an alternate command we could use that could compromise in the amount of debugging shown?

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @davereid, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where build logs were excessively verbose due to the --verbose flag being used with the drush core:cron command. By removing this flag, the change aims to streamline log output, making it cleaner and easier to parse, particularly in environments that deploy multiple sites in parallel.

Highlights

  • Drush Command Verbosity: The --verbose flag has been removed from the drush core:cron command within tasks/drupal.yml to significantly reduce log output during build processes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the --verbose flag from the drush core:cron command. This is a positive change that effectively reduces log verbosity during builds, addressing the issue described. The change also brings the core:cron command's output level in line with other drush commands within the same update task, improving consistency.

In response to your question about alternatives, removing --verbose is the ideal approach. It reverts to Drush's default output level, which provides a good balance of information—showing errors and warnings without the excessive detail of verbose mode. For even less output, you could use --quiet (-q), but that might hide useful information. The current change is a solid compromise.

@github-actions github-actions bot temporarily deployed to lullabotsandbox.dev November 20, 2025 21:23 Inactive
@deviantintegral
Copy link
Copy Markdown
Member

If I remember right, the problem is that without verbose you don't get drupal log messages. That often means you end up with cron hooks failing, but no obvious notes in the output.

@davereid
Copy link
Copy Markdown
Member Author

Yeah, it's too bad that the first level of verbose adds all the bootstrap information when I feel like that's more of a -vv or higher kind of level. Maybe this is for the best for now.

@deviantintegral
Copy link
Copy Markdown
Member

What if we extended drush to have a --show-drupal-logs option for cron... or even for all commands?

@rabbitlair
Copy link
Copy Markdown
Contributor

Hey folks, is this something we still would like in? Does it require extra work, or is it ready as is?

@mrdavidburns
Copy link
Copy Markdown
Member

I have a preference for verbose, but could we make that configurable to allow each project to make their own determination if they want that or note?

@deviantintegral
Copy link
Copy Markdown
Member

Let's see about contributing an improvement to Drush for this. @rabbitlair will check for existing issues and pull requests and see what we can do here.

@rabbitlair
Copy link
Copy Markdown
Contributor

I created a pull request for Drush to implement the --show-drupal-logs flag when running core:cron command. It displays the Drupal cron related logs when the flag is present, without all the noise coming from --verbose. In case you are curious, you can check it out here: drush-ops/drush#6516

@dsayswhat
Copy link
Copy Markdown
Member

Moving to 'needs review' to reflect the fact that we're waiting for Drupal maintainer feedback.

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.

5 participants