Giter VIP home page Giter VIP logo

Comments (4)

ArturT avatar ArturT commented on May 23, 2024

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 or rails_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:

KnapsackPro::Hooks::Queue.call_before_queue

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.

Pro777 avatar Pro777 commented on May 23, 2024

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.

ArturT avatar ArturT commented on May 23, 2024

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.

ArturT avatar ArturT commented on May 23, 2024

Closing because of no activity in this thread.

from knapsack_pro-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.