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

Add additional quiet check in update-report #10868

Merged
merged 2 commits into from
Mar 28, 2021
Merged

Add additional quiet check in update-report #10868

merged 2 commits into from
Mar 28, 2021

Conversation

dkav
Copy link
Contributor

@dkav dkav commented Mar 16, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

An additional --quiet check that excludes reporting of tagged releases and relevant online links. Revision changes are still reported. Builds on #10844.

@carlocab
Copy link
Member

Thanks for your PR, @dkav.

I don't think it's a good idea to silence these messages with a --quiet flag.

One reason why these messages are printed out is that we've gotten a number of rather loud complaints about breaking changes and users being unaware of these. It's important that we try to make users more aware of breaking changes, and one way to try to do that is to make sure everyone sees these update messages.

New releases don't happen very often (the last two were an exception: they were tagged to ship security fixes), so I don't think it's that burdensome to not be able to silence these messages.

That said, if you still feel that strongly about this, it might be worth pursuing a more targetted silencing of these messages, so that there's a way to get the really important updates to users when they do brew update.

@MikeMcQuaid
Copy link
Member

One reason why these messages are printed out is that we've gotten a number of rather loud complaints about breaking changes and users being unaware of these. It's important that we try to make users more aware of breaking changes, and one way to try to do that is to make sure everyone sees these update messages.

Or, at the very least, --quiet should silence announcing patch releases but not major/minor releases.

@dkav
Copy link
Contributor Author

dkav commented Mar 18, 2021

Thanks for the feedback. I amended the change so that --quiet silences patch release announcements only.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

One other thing I'd like to see if this change is made is for the Settings.write "latesttag", new_tag call on line 95 to be moved down to where the message is actually displayed.

Calling the Settings.write method remembers whether or not the "updated version" message has been shown, so it makes sense to only set this once the message actually shows. That way, if someone needs to run with --quiet, they can still see the message next time they run brew update.

Adding the following line just before the puts_stdout_or_stderr calls on lines 192 and 197 should do it:

Settings.write "latesttag", new_repository_version

@dkav
Copy link
Contributor Author

dkav commented Mar 23, 2021

Amended with @Rylan12 suggestions.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Looks good to me, @dkav! Thanks! 🎉

@MikeMcQuaid MikeMcQuaid enabled auto-merge March 24, 2021 19:49
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Mar 24, 2021

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @dkav!

@carlocab
Copy link
Member

Rebased against master to resolve the failing cask audit.

@MikeMcQuaid MikeMcQuaid merged commit a8f2fd2 into Homebrew:master Mar 28, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants