Agis Anastasopoulos
a41b849b9b
worker: Move `files_or_dirs_to_run` to an accessor
...
Since we set a reasonable default ("spec", like RSpec does) that will fit most
of the cases, this setting doesn't have to be provided during Worker
initialization. This simplifies Worker#initialize.
2020-08-08 22:49:22 +03:00
Agis Anastasopoulos
ade52179d5
Update changelog for #16 and df9faa8
2020-08-08 22:18:38 +03:00
Agis Anastasopoulos
fb26b45d48
Merge pull request #16 from skroutz/gh8-sentry
...
Implement Sentry integration
2020-08-08 22:05:17 +03:00
Agis Anastasopoulos
42d20e75a6
worker: Redirect stderr of split command to stdout
...
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.
Ideally we'd do this with popen3, but this is good enough for now,
considering #6 .
2020-08-08 22:03:31 +03:00
Agis Anastasopoulos
3364dd0213
Implement Sentry integration
...
This patch adds support for Workers to emit various RSpecQ internal events to
a Sentry[1] instance.
Reporting to Sentry is opt-in and is enabled by setting the SENTRY_DSN
environment variable (see
https://github.com/getsentry/raven-ruby#raven-only-runs-when-sentry_dsn-is-set ).
If SENTRY_DSN is not set this is a noop.
Events emitted:
- [error] the spec file split command failed; slow spec files files will
be scheduled as a whole so build times will be negatively impacted
- [warning] no previous timings were found in Redis; scheduling will be random
so build times will be negatively impacted
- [info] slow files were detected and will be split, including the
actual filenames
The above are still printed to the standard output of the worker.
Closes #8
[1] https://sentry.io
2020-08-08 21:58:17 +03:00
Agis Anastasopoulos
83bd0c0821
Update README.md
2020-08-04 14:30:56 +03:00
Agis Anastasopoulos
ebe2b53147
Update changelog with #14
2020-08-03 22:28:40 +03:00
Roy Zwambag
8d6b0305f7
Add option to set max requeues ( #14 )
...
Adds a CLI option to set max-requeues. It will default to 3 if the
option is not given.
Fixes #14
2020-08-03 22:24:24 +03:00
Agis Anastasopoulos
e9620fe243
Update README.md
2020-08-03 17:43:03 +03:00
Agis Anastasopoulos
c2a698042b
Add a "Features" section in the README
2020-08-03 17:39:13 +03:00
Agis Anastasopoulos
3f9c8842f2
worker: Use queue attribute reader instead of ivar
2020-08-03 15:52:44 +03:00
Agis Anastasopoulos
2e50a61515
Improve README
2020-07-26 12:47:43 +03:00
Agis Anastasopoulos
4fa80e2712
Minor CLI help text improvements
2020-07-25 23:19:22 +03:00
Agis Anastasopoulos
06ed4ed64a
travis: Drop support for EOLed rubies
2020-07-24 21:49:49 +03:00
Agis Anastasopoulos
f31887c948
Merge pull request #12 from skroutz/test-concurrent-workers
...
Test suite run with concurrent workers
2020-07-22 22:08:45 +03:00
Agis Anastasopoulos
50b4a7523c
Switch to travis-ci.com for badge
2020-07-22 21:48:40 +03:00
Agis Anastasopoulos
3e293605c9
Limit gemspec rspec-core condition to CI builds
2020-07-22 21:06:32 +03:00
Agis Anastasopoulos
cb81cd23d0
test: Add helper to temporarily suppress stdout
...
This makes up testing output much cleaner.
Part of #1
2020-07-22 21:00:20 +03:00
Agis Anastasopoulos
6060bdd7db
worker: Explicitly require pathname
2020-07-22 21:00:20 +03:00
Agis Anastasopoulos
d26874cbf1
Test suite run with concurrent workers
...
Part of #1
2020-07-22 21:00:20 +03:00
Agis Anastasopoulos
ec69f311b4
queue: Make all key_* methods public
...
For testability reasons.
2020-07-22 21:00:20 +03:00
Agis Anastasopoulos
52049e5561
Fix gemspec with no RSPEC_CORE var is set
2020-07-22 00:16:38 +03:00
Agis Anastasopoulos
6c42357699
Merge branch 'travis'
2020-07-22 00:13:57 +03:00
Agis Anastasopoulos
0c139b9d16
Add Travis badge to README
2020-07-22 00:09:22 +03:00
Agis Anastasopoulos
408c55f2f2
test: Don't require pry-byebug explicitly
...
This will make testing on older, unsupported Rubies in Travis easier.
2020-07-22 00:09:22 +03:00
Agis Anastasopoulos
124d21eec4
Add Travis configuration file
...
Closes #7
2020-07-22 00:09:22 +03:00
Agis Anastasopoulos
4f1a59f2a9
Fix markdown formatting in README
2020-07-21 23:39:34 +03:00
Agis Anastasopoulos
1975d7af84
Update README.md
2020-07-21 23:39:08 +03:00
Agis Anastasopoulos
0fbea083fa
Merge branch 'tests'
2020-07-21 23:29:43 +03:00
Agis Anastasopoulos
c8a87dfd47
Add some initial tests
...
- end-to-end tests
- scheduling tests
Part of #1
2020-07-21 23:28:47 +03:00
Agis Anastasopoulos
63a126b25a
Use `bundle exec` instead of rspec binstub
...
Not all projects are guaranteed to have a binstub. `bundle exec` is the
more bulletproof way to do this right now. Also fixes some test
failures.
2020-07-21 23:28:47 +03:00
Agis Anastasopoulos
04e6a88cad
Fix uninitialized instance variable warning
2020-07-21 23:28:03 +03:00
Agis Anastasopoulos
dccb027e04
reporter: Remove unused variable
2020-07-21 23:28:03 +03:00
Agis Anastasopoulos
2b772ae269
Cast Queue#example_count to an integer
2020-07-21 23:28:03 +03:00
Agis Anastasopoulos
7afa9b4900
Add some public API methods for testability
...
- add Queue#redis attribute reader
- add Queue#unprocessed_jobs, #processed_jobs and #requeued_jobs
- make Worker#try_publish_queue! public
- add Worker#queue attribute reader
2020-07-21 23:26:59 +03:00
Agis Anastasopoulos
b9dbd99355
Update README.md
2020-07-10 19:00:30 +03:00
Agis Anastasopoulos
9f1e6fbf3b
Update changelog
2020-07-06 21:51:02 +03:00
Agis Anastasopoulos
85e0eb25d0
Update gem description
2020-07-05 17:37:00 +03:00
Agis Anastasopoulos
8145aa047f
Update changelog with df9faa8
, c519230
and 4323a75
2020-07-05 17:01:44 +03:00
Agis Anastasopoulos
4323a75ca3
Don't require a worker ID in reporter
...
Also improve the README
2020-07-05 14:10:24 +03:00
Agis Anastasopoulos
c5192303e2
Also read config from environment variables
...
Additionally:
- rename `--timings` to `--update-timings`
- don't communicate the default value of `--file-split-threshold`. We
handle this transparently (effectively disable it if it's not set) by
passing a very large value
Closes #4
2020-07-05 10:56:34 +03:00
Agis Anastasopoulos
cae1618582
Update README.md
2020-07-05 00:08:43 +03:00
Agis Anastasopoulos
df9faa8ec6
Improve CLI
...
- Improve descriptions
- Add shorthand version of flags
- Factor out defaults into constants
- Add checks for invalid flag combinations
- Add `--help` and `--version`
2020-07-05 00:01:27 +03:00
Agis Anastasopoulos
f735362e97
Require 'optparse' instead of 'optionparser'
...
optionparser just requires optparse anyway.
2020-07-05 00:01:27 +03:00
Agis Anastasopoulos
3890f67176
Update README.md
2020-06-29 20:58:42 +03:00
Agis Anastasopoulos
205a7a363a
Bump version
2020-06-26 14:09:03 +03:00
Agis Anastasopoulos
0225db5cda
Update README.md
2020-06-26 13:07:57 +03:00
Agis Anastasopoulos
b4dc43dd5c
Depend in redis
2020-06-26 12:33:09 +03:00
Agis Anastasopoulos
d96446c246
Add a Gemfile
2020-06-26 12:33:03 +03:00
Agis Anastasopoulos
bb1a21f90b
Add a .gitignore
2020-06-26 12:32:51 +03:00