Commit Graph
2255 Commits
Author SHA1 Message Date
Alexander Bayandin 27772ab57a typecheck: do not generate RBI file for did_you_mean 2021-06-24 15:45:03 +01:00
Mike McQuaidandGitHub 41803ebf93 Merge pull request #11578 from jasonrudolph/flaky-test-detection
Automatically detect and track flaky tests
2021-06-23 11:00:38 +01:00
Jason Rudolph e163eb8650 Enhance test suite to emit JUnit XML test reports
In preparation for detecting flaky tests with BuildPulse, this commit
sets up the rspec_junit_formatter gem to output JUnit XML reports of the
test suite, which is the format used by BuildPulse and various other
tooling that interprets test results.

Because the test suite uses the parallel_tests gem, this commit
incorporates some related changes to make all the parallel_tests gem and
the rspec_junit_formatter gem to cooperate with each other.

rspec_junit_formatter writes everything to a single XML file. That works
fine when there's only one process writing to the file. By default,
whatever process finishes last will write to the file and clobber the
output of all the other processes that wrote to the file. 🙈

To prevent this issue, the parallel_tests wiki recommends adding a
`.rspec_parallel` file to specify its RSpec options
(https://github.com/grosser/parallel_tests/wiki#with-rspec_junit_formatter----by-jgarber),
then the project can specify different files for each process to write
to like so:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

However, prior to this commit, the Homebrew/brew test suite specified
its RSpec options via the command line. Unfortunately though, there's no
way (AFAICT) to set the equivalent of these options via the command
line:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

So, we need to use a `.rspec_parallel` file to specify these options ☝️.

However, it appears that RSpec allows you to specify formatters _either_
in an options file (like `.rspec_parallel`) _or_ via command-line args.
But if you specify any formatters via command-line args, then all
formatters in the options file are ignored.  (I suspect that's somehow
related to this bit of code in rspec-core:
https://github.com/rspec/rspec-core/blob/v3.10.0/lib/rspec/core/configuration_options.rb#L64.)

With that in mind, in order to have the RspecJunitFormatter configured
 in `.rspec_parallel`, we need to move the other formatters into
 `.rpsec_parallel` as well, instead of passing them as command-line
 args. Therefore, this commit moves all the formatters into a
 `.rspec_parallel` file.
2021-06-21 13:14:18 -04:00
Mike McQuaid 08c96df947 release_notes: refactor/cleanup.
This was failing for me locally so I've made some fixes:
- remove the `markdown` flag (as it's the only path now)
- refactor the generation to not use intermediate variables
- discard more weird cases rather than erroring
- exclude @Homebrew changes (e.g. from bots) because we don't care about
  these in the release notes
2021-06-21 14:25:01 +01:00
Mike McQuaid 30a65342e8 Deprecate, disable, delete code for Homebrew 3.2.0
Do the usual deprecation, disable, delete dance for Homebrew 3.2.0.
2021-06-17 11:34:32 +01:00
Bo Anderson a06d136d2c Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01:00
Mike McQuaidandGitHub d69f1a317b Merge pull request #11507 from ncruces/patch-1
brew tap-new: tests.yml workflow fails with casks
2021-06-10 11:46:48 +01:00
Nuno Cruces 7db528163c brew audit: fails on Linux if tap has any casks
Running `brew audit --tap=[TAP]` fails on Linux (including GitHub Actions CI) if the tap has any caksks.
2021-06-09 19:13:39 +01:00
Nuno Cruces 9740510650 Revert "brew tap-new: tests.yml workflow fails with casks"
This reverts commit 20d59effd6.
2021-06-09 19:11:42 +01:00
Bo AndersonandGitHub 9938621f23 Merge pull request #11470 from Bo98/unbottled-arch
dev-cmd/unbottled: fix arch requirement handling
2021-06-09 14:01:06 +01:00
Rylan Polster 08b44afcdf cli/parser: allow options to be hidden 2021-06-08 22:02:32 -04:00
Nuno CrucesandGitHub 20d59effd6 brew tap-new: tests.yml workflow fails with casks
Running `brew test-bot --only-tap-syntax` fails on `ubuntu-latest` if any casks are added later to the tap, since casks are macOS only.
2021-06-08 13:09:27 +01:00
Nanda H KrishnaandGitHub 99702b2475 Merge pull request #11497 from nandahkrishna/remove-publish-flag
`brew pr-{pull,upload}`: remove `--no-publish` flag
2021-06-08 17:33:22 +05:30
Mike McQuaidandGitHub c4d69dd2e9 Revert "fix(vendor-gems): redirect bundler stdout to stderr" 2021-06-07 14:51:07 +01:00
Nanda H Krishna b607fb0712 brew pr-{pull,upload}: remove --no-publish flag
The `--no-publish` flag isn't used anywhere since we removed all the
Bintray code. Also, the `--no-upload` flag used in `pr-pull` doesn't
apply the bottle commit, so its description has been modified.
2021-06-07 15:13:29 +05:30
Gibson Fahnestock 07d571bebc fix(vendor-gems): redirect bundler stdout to stderr
When running brew commands and interpreting the output, e.g. running
`brew livecheck --json`, it's necessary to stop other programs Homebrew
happens to execute from writing logging output to stdout. Most programs
don't do this, but `bundle install` does seem to.

To reproduce the issue you can run:

```shell
git -C "$(brew --prefix)" clean -ffdx Library/Homebrew/vendor
stdout=$(HOMEBREW_FORCE_VENDOR_RUBY=1 brew livecheck --newer-only --json --cask $(brew --repo homebrew/cask)/Casks/grid.rb)
echo "^^^ was stderr, >>> is stdout: $stdout"
```

If you run it without this change it will print a bunch of output like
this to the stdout before printing out the livecheck JSON output:

```text
Using bundler 1.17.3
Fetching byebug 11.1.3
Fetching coderay 1.1.3
Installing byebug 11.1.3 with native extensions
Installing coderay 1.1.3
Fetching colorize 0.8.1
Installing colorize 0.8.1

[
  # Contents of the JSON block.
]
```

With this change the stdout from `bundle install` will be redirected to
brew's stderr, meaning only the JSON goes to stdout, and the rest goes
to stderr.
2021-06-03 11:18:23 +01:00
Rylan Polster 023063d6a2 bottle: calculate rebuild correctly when removing bottle :unneeded 2021-06-01 11:39:07 -04:00
Bo Anderson 984226d5b5 dev-cmd/unbottled: fix arch requirement handling 2021-05-31 15:24:20 +01:00
Bo AndersonandGitHub 7ae9cc3467 Merge pull request #11440 from scpeters/extract_downcased_version
extract: use downcased version in filename
2021-05-27 15:07:56 +01:00
Rylan PolsterandGitHub d0f5a0832e Merge pull request #11397 from cnnrmnn/add-link-head
Add `brew link --HEAD`
2021-05-26 11:46:58 -04:00
Steve PetersandGitHub 2655014951 extract: use downcased version in filename
Formula filenames are required to be lowercase, so the
extract command should downcase version before
using it to construct the filename. I noticed this while
extracting tbb@2020, which has version 2020_U3
and resulted in tbb@2020_U3.rb
2021-05-25 23:20:15 -07:00
Nanda H Krishna ba17e2b8c1 dev-cmd/update-maintainers: fix require
Use require "dev-cmd/generate-man-completions" instead of require "dev-cmd/man".
2021-05-22 05:57:19 +05:30
Connor Mann 2bfdbc6b39 Rename missed to_keg 2021-05-19 12:59:53 -04:00
2bd71ffb30 /dev-cmd/pr-publish: tweak wording.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2021-05-19 11:36:59 +01:00
WingLim ddcb0519b6 feat: add branch param 2021-05-19 18:06:21 +08:00
Connor Mann d46881c5e2 Rename to_kegs to to_keg 2021-05-18 09:52:19 -04:00
Rylan PolsterandGitHub 7c68b1738b Merge pull request #11332 from Rylan12/relocate-paths-at-start
keg_relocate: only replace matches at the start of a path
2021-05-13 12:19:06 -04:00
Rylan Polster 4457dc904b Cleanup using suggestions from code review 2021-05-13 11:02:39 -04:00
Bo Anderson 6d31408606 dev-cmd/bottle: make gzip creation consistent across platforms 2021-05-12 14:21:38 +01:00
Mike McQuaid b914411ac8 Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Rylan Polster 5f781770b4 Extract Keg::text_matches_in_file from bottle command 2021-05-11 14:26:14 -04:00
Rylan Polster fe7f80f647 Refactor out and correctly create path regex 2021-05-11 14:26:14 -04:00
Rylan Polster fd3730a531 bottle: allow links to pkgconfig directory in HOMEBREW_REPOSITORY 2021-05-11 14:26:14 -04:00
Rylan Polster 9ddb531249 bottle: update keg_contain? to match correctly 2021-05-11 14:26:14 -04:00
Nanda H Krishna 8e1c9234e3 dev-cmd/bump: fix empty array check 2021-05-09 18:07:33 +05:30
acebeab9cb bottle: improve style of rebuild fallback
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-05-05 08:27:58 -04:00
Rylan Polster da27c70323 bottle: properly set rebuild for new formulae 2021-05-04 23:10:40 -04:00
Nanda H KrishnaandGitHub 0ed2f6423f Merge pull request #11308 from nandahkrishna/rename-brew-man
Rename `brew man` to `brew generate-manpages`
2021-05-04 23:02:39 +05:30
Mike McQuaidandGitHub 7c52c30312 Merge pull request #11293 from bluelabsio/latest-version-only
bottle: Only consider latest rebuild
2021-05-04 17:01:34 +01:00
Chris Wegrzyn aa3e623b28 Omit warning, as brew audit already covers this 2021-05-04 09:50:42 -04:00
Chris Wegrzyn 570b62dd75 prev_f -> upstream_f 2021-05-04 09:41:53 -04:00
Bo Anderson f174d4363f extend/pathname: limit write override to a refinement 2021-05-04 14:20:20 +01:00
ca11dc92ca dev-cmd/generate-man-completions: update description
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-05-04 18:38:55 +05:30
Nanda H Krishna b9b83edc1a dev-cmd: rename brew man to brew generate-man-completions 2021-05-04 18:32:42 +05:30
Chris Wegrzyn 9ab44b8b6a bottle: just check origin/HEAD for rebuild 2021-05-03 10:07:30 -04:00
Chris Wegrzyn 056c9bb37f Only consider latest rebuild 2021-05-03 10:07:29 -04:00
Mike McQuaid 08926fb1ec dev-cmd: run Homebrew.install_bundler_gems! earlier.
Run `Homebrew.install_bundler_gems!` a bit earlier for some developer
commands to avoid printing gem installation output in the middle of
normal developer command output.
2021-04-30 12:00:28 +01:00
Mike McQuaidandGitHub 2fa973bb3b Merge pull request #11259 from bluelabsio/bottle-root-url-specs
dev-cmd/bottle: Support adding root_url specs to bottle spec
2021-04-29 19:54:53 +01:00
Chris Wegrzyn 68852c9162 Style fix 2021-04-29 12:51:15 -04:00
Chris Wegrzyn ee8dc058d8 Better help text 2021-04-29 12:37:22 -04:00