Comments (4)
Hi @Pro777
KnapsackPro::Hooks::Queue.before_queue
won't be called when CI node got from Queue API an empty list of tests to run. For instance, CI node started work too late after other CI nodes already did run all test files from Queue API.
I don't know if this is the case here. You mentioned "By skipping that hook an important portion of the test setup is missing causing that most of the tests fail on that thread." so it looks like some tests are still executed on the CI node.
Can you provide more details like:
- link to the CI build in user dashboard.
- what are CI node indexes for CI nodes that did not run
KnapsackPro::Hooks::Queue.before_queue
- log output from nodes that did not run the hook
- Did you added hook in
spec/spec_helper.rb
orrails_helper.rb
Maybe some of your spec files don't require proper file and then hook is not called?
Here you can see how hook is called:
If you want you can also fork the repo and use it and add some code to debug this on your end
# Gemfile
gem 'knapsack_pro', github: 'KnapsackPro/knapsack_pro-ruby', branch: ‘master’
from knapsack_pro-ruby.
In our before_queue
block, we call a rake task which seeds are test data. All tests are being run, but on the nodes that fail, the rake task isn't run and so we have no test data and our rspec tests all fail.
I send over our private build information to your Twitter account.
We setup the KnapsackPro before_queue call once in our rails_helper.rb
.
from knapsack_pro-ruby.
I've checked your message on Twitter.
Do you require 'rails_helper.rb'
at the beginning of the file spec/models/generation_report_spec.rb
?
Can you send full txt output from CI node that did not run the hook. Can you also send output for CI node that did successfully run the hook.
Please send it to [email protected]
The more data I have the bigger chance I can make a better guess what's the root problem. I did not see such a problem before with hooks.
Can you also share your CI config? How do you run knapsack_pro command - once or many times on the Ci node? I'd like to see what's the command called on CI. Thanks.
from knapsack_pro-ruby.
Closing because of no activity in this thread.
from knapsack_pro-ruby.
Related Issues (20)
- Ability to set an exit code for RSpec failure HOT 4
- Include error messages from dry run json report in stdout when knapsack_pro:rspec_test_example_detector fails HOT 8
- rspec_junit_formatter still producing invalid XML after applying suggestion from #40 HOT 3
- Support for Github Actions job summaries HOT 5
- Queue mode causes rspec_junit_formatter to produce invalid XML when a node runs a spec with all examples commented out. HOT 5
- Thread.join causes knapsack to hang on circleCI HOT 13
- Enabled KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES and now get uninitialized constant at end of run HOT 10
- Regular mode (non-queue) rspec outputs all spec file names on startup HOT 4
- All examples skipped after exception in before: suite hook in queue mode HOT 2
- Memory leak HOT 2
- Lots of failures with rolify gem after 4.1 -> 5.0 bump HOT 12
- Docs need to specify ENV var to detect CI provider HOT 1
- Fail gracefully when there's no git HOT 8
- Running `git fetch --shallow-since` to fetch commit author log causes hang on Buildkite runners HOT 12
- rspec-core conflict HOT 4
- Running queue mode locally for troubleshooting with a small subset of tests, but with multiple batches HOT 6
- Does `rake knapsack_pro:rspec_test_example_detector` need to run if there aren't any slow specs? HOT 2
- Slow test analysis runs even when there's no slow tests HOT 2
- Disable example_status_persistence_file_path HOT 3
- Create a replication command on failed node HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knapsack_pro-ruby.