Giter Club home page Giter Club logo

Comments (5)

Hirurg103 avatar Hirurg103 commented on July 23, 2024

Just an assumption regarding this issue:

Maybe when Gitlab CI job clones the project the order of cucumber files in the filesystem is different on different CI nodes and knapsack calculates tests for current CI node based on the order of files in the filesystem that's why I encounter this issue

from knapsack.

ArturT avatar ArturT commented on July 23, 2024

Different file systems could return test files in a different order. I fixed that a while ago
#8
https://github.com/ArturT/knapsack/blob/fdf10119a7707110dfe1525326d4b28fb5055778/CHANGELOG.md#102

I need to think about what's wrong here. :/

In the meantime, you can also check knapsack_pro queue mode for Cucumber (I added support for Queue Mode in Cucumber recently). Here is GitLab CI example https://docs.knapsackpro.com/2019/how-to-run-parallel-jobs-for-rspec-tests-on-gitlab-ci-pipeline-and-speed-up-ruby-javascript-testing

from knapsack.

Hirurg103 avatar Hirurg103 commented on July 23, 2024

Hi @ArturT ,

I need to think about what's wrong here. :/

I've just found out that this problem is caused by jobs concurrency in my Gitlab CI configuration:

  1. Job 1 downloads knapsack_cucumber_report.json
  2. Job 1 runs tests
  3. Job 1 updates knapsack_cucumber_report.json
  4. Job 2 downloads knapsack_cucumber_report.json
  5. Job 2 runs tests with changed knapsack_cucumber_report.json

Because Job 1 and Job 2 run tests with different knapsack_cucumber_report.json that's why knapsack runs duplicate cucumber files in these jobs

I will need to change my Gitlab CI configuration to prepare knapsack_cucumber_report.json before test stage and update it after test stage. For now I prepare and update knapsack_cucumber_report.json in the test stage

In the meantime, you can also check knapsack_pro queue mode for Cucumber (I added support for Queue Mode in Cucumber recently). Here is GitLab CI example https://docs.knapsackpro.com/2019/how-to-run-parallel-jobs-for-rspec-tests-on-gitlab-ci-pipeline-and-speed-up-ruby-javascript-testing

Thank you! For now we have our project in the maintenance state and do not run builds quite often. If we switch to active development we might need to enable Knapsack PRO for the project

from knapsack.

ArturT avatar ArturT commented on July 23, 2024

@Hirurg103 If this will help you I can set for you free plan for knapsack pro for the time of maintenance state so you don't have to waste time on fixing the problem. Feel free to sign up https://knapsackpro.com/

from knapsack.

Hirurg103 avatar Hirurg103 commented on July 23, 2024

@ArturT for now knapsack gem fully meets our needs. Thank you for making this gem!

from knapsack.

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.