KnapsackPro / knapsack_pro-ruby

Knapsack Pro gem splits tests across parallel CI nodes and makes sure that tests run in optimal time
https://knapsackpro.com
MIT License
132 stars 27 forks source link

NoMethodError: undefined method `keys' for nil #242

Closed Alagaesia93 closed 6 months ago

Alagaesia93 commented 8 months ago

Hello!

After bumping version to 7.0 my whole RSpec CI fails with this error NoMethodError: undefined method 'keys' for nil

It must be something connected with dotenv and some env variables, but it started failing only after 7.0 version. I tried to check online, but no luck.

If you need anything else, happy to help!

Full error stack ``` NoMethodError: undefined method `keys' for nil # /vendor/bundle/ruby/3.3.0/gems/dotenv-3.0.2/lib/dotenv/diff.rb:25:in `added' # /vendor/bundle/ruby/3.3.0/gems/dotenv-3.0.2/lib/dotenv/diff.rb:47:in `any?' # /vendor/bundle/ruby/3.3.0/gems/dotenv-3.0.2/lib/dotenv.rb:78:in `restore' # /vendor/bundle/ruby/3.3.0/gems/dotenv-3.0.2/lib/dotenv/autorestore.rb:9:in `block (2 levels) in
' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:372:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:529:in `block in run_owned_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:528:in `each' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:528:in `run_owned_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:615:in `block in run_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:614:in `each' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:614:in `run_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:485:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:518:in `run_after_example' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:283:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call' # /vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.1.1/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in ' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/adapters/rspec_adapter.rb:103:in `block (2 levels) in ensure_no_focus!' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call' # /vendor/bundle/ruby/3.3.0/gems/webmock-3.22.0/lib/webmock/rspec.rb:39:in `block (2 levels) in
' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `with_around_example_hooks' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:259:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:646:in `block in run_examples' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `map' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `run_examples' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:607:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:98:in `block (4 levels) in knapsack__run_specs' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:96:in `map' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:96:in `block (3 levels) in knapsack__run_specs' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:82:in `block in with_batch' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:70:in `with_batch' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:93:in `block (2 levels) in knapsack__run_specs' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:92:in `block in knapsack__run_specs' # /vendor/bundle/ruby/3.3.0/gems/rspec-core-3.12.2/lib/rspec/core/reporter.rb:74:in `report' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:91:in `knapsack__run_specs' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:50:in `run' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:20:in `run' # /vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/tasks/queue/rspec.rake:19:in `block (3 levels) in
' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `block in execute' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `each' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `execute' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:83:in `block in run' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling' # /vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:80:in `run' ```
ArturT commented 8 months ago

Hi @Alagaesia93 Thank for reporting this.

What Knapsack Pro command do you call? Do you pass any custom options?

Can you share the full txt output from the CI node? You can share it with support at https://knapsackpro.com/contact for confidentiality.

Have you tried upgrading the dotenv gem and rspec-core to the latest version?

Do you have any specific dotenv configuration?

Do you use config.dotenv.autorestore = true (it's a default)?

Alagaesia93 commented 8 months ago

Thank you @ArturT for jumping in so quickly!

ci.yml

  rspec:
    env:
      RAILS_ENV: test
      RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
    runs-on: ubuntu-22.04
    timeout-minutes: 20
    needs: [bundle]
    services:
      postgres:
        image: postgres:16
        env:
          POSTGRES_USER: ${{ env.PGUSER }}
          POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
          POSTGRES_DB: test_sky_pilot
        ports:
          - 5432/tcp
      redis:
        image: redis
        ports:
          - 6379/tcp
    strategy:
      fail-fast: false
      matrix:
        # Set N number of parallel jobs you want to run tests on.
        # Use higher number if you have slow tests to split them on more parallel jobs.
        # Remember to update ci_node_index below to 0..N-1
        ci_node_total: [3]
        # set N-1 indexes for parallel jobs
        # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
        ci_node_index: [0, 1, 2]
    steps:
      - uses: actions/checkout@v4
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - name: Build DB
        env:
          PGPORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
        run: bin/rails db:schema:load
      - name: Run Rspec Tests
        env:
          PGPORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
          KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
          KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
          KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
          KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
          REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/1
        run: bin/rake knapsack_pro:queue:rspec

not sure what else to add from the CI node, we have hundreds of thousands of tests so it's a gigantic file with the same error repeated for each test :)

I have dotenv (not dotenv-rails) 3.0.2, released few days ago. I see that there is 3.0.3 with some fixes, I'll run CI again rspec-rails latest version, rspec-core just 3.12.2 instead of 3.12.3

No specific dotenv config, yes autorestore because it's default

The interesting part is knapsack 6.x works perfectly, knapsack 7.0 breaks everything.

EDIT: just tried with dotenv 3.0.3, same error. Please note that bundle exec rspec works perfectly

ArturT commented 8 months ago

Could you update rspec-core to 3.13?

Please replace:

run: bin/rake knapsack_pro:queue:rspec

to

bundle exec rake knapsack_pro:queue:rspec

Does it help?

You can also try this:

bundle exec rake knapsack_pro:queue:rspec_go

The interesting part is knapsack 6.x works perfectly, knapsack 7.0 breaks everything.

We did a big refactor for RSpec in Queue Mode. I see the error is coming from the following line. We directly call the RSpec example_group.run(reporter) internal method.

       # <filtered>/vendor/bundle/ruby/3.3.0/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:98:in `block (4 levels) in knapsack__run_specs'
tmtrademarked commented 8 months ago

I am seeing the same behavior with v7, FWIW. We're using rspec-core 3.13, dotenv 3.0.3, and knapsack-pro 7.0.0. All of our specs fail with the following error:

 2) Spree::Order#phone when ship address is present returns the ship address phone
     Failure/Error: example.run

     NoMethodError:
       undefined method `keys' for nil
     # /usr/local/bundle/gems/dotenv-3.0.3/lib/dotenv/diff.rb:25:in `added'
     # /usr/local/bundle/gems/dotenv-3.0.3/lib/dotenv/diff.rb:47:in `any?'
     # /usr/local/bundle/gems/dotenv-3.0.3/lib/dotenv.rb:78:in `restore'
     # /usr/local/bundle/gems/dotenv-3.0.3/lib/dotenv/autorestore.rb:9:in `block (2 levels) in <top (required)>'
     # ./spec/support/database_cleaner.rb:14:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/adapters/rspec_adapter.rb:103:in `block (2 levels) in ensure_no_focus!'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:98:in `block (4 levels) in knapsack__run_specs'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:96:in `map'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:96:in `block (3 levels) in knapsack__run_specs'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:82:in `block in with_batch'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:70:in `with_batch'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:93:in `block (2 levels) in knapsack__run_specs'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:92:in `block in knapsack__run_specs'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/extensions/rspec_extension.rb:91:in `knapsack__run_specs'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:50:in `run'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/knapsack_pro/runners/queue/rspec_runner.rb:20:in `run'
     # /usr/local/bundle/gems/knapsack_pro-7.0.0/lib/tasks/queue/rspec.rake:19:in `block (3 levels) in <main>'

We're running our tests as follows: bundle exec rake "knapsack_pro:queue:rspec[--format Fuubar --format RspecJunitFormatter --out ${REPORT_DIR}/junit-report-${TEST_NODE_INDEX}.xml]"

ArturT commented 8 months ago

Thank you, @tmtrademarked, for the details.

We will get back to you. Please share any further information you find about the root issue.

--

I have created an internal ticket for the issue.

irphilli commented 8 months ago

I ran into the same thing. Similar gems to what @tmtrademarked mentioned above. Though, we do have this bit of code in our spec_helper:

config.around do |example|
  # Some setup
  example.run
ensure
  # Some cleanup
end

We get the failure at example.run. Just mentioning it in case it helps with the debugging!

Alagaesia93 commented 8 months ago

rspec-core updated ✅ ci.yml bundle exec replaced ✅

error gone ❌ Sorry, still having the same issue!

ArturT commented 8 months ago

Thanks for the details. I'll get back to you.

tmtrademarked commented 8 months ago

For more context, I also tried with dotenv 3.1.0 - same results, unfortunately.

Pacyfik commented 8 months ago

Hi @Alagaesia93 @tmtrademarked @irphilli I'm Mat and I work with Artur at Knapsack. Thanks for taking the time to report this and for sending us all the info. I've identified the issue and I'm currently working on a fix. In the meantime, could you please try running the knapsack_pro RSpec command on your CI with an additional argument, i.e. change bundle exec rake knapsack_pro:queue:rspec to bundle exec rake "knapsack_pro:queue:rspec[--require rails_helper]" See if this helps and let me know the result, please.

tmtrademarked commented 8 months ago

@Pacyfik - thanks! From testing on our CI, it seems like adding --require rails_helper makes 7.0 work for us.

Pacyfik commented 8 months ago

@Pacyfik - thanks! From testing on our CI, it seems like adding --require rails_helper makes 7.0 work for us.

That's great to hear @tmtrademarked Thanks for checking it out 🙌 I'll let you know when the fix is out so you can update knapsack_pro and remove the temporary fix.

hoshy commented 7 months ago

... In the meantime, could you please try running the knapsack_pro RSpec command on your CI with an additional argument, i.e. change bundle exec rake knapsack_pro:queue:rspec to bundle exec rake "knapsack_pro:queue:rspec[--require rails_helper]" See if this helps and let me know the result, please.

@Pacyfik unfortunately, that didn't help us.

Pacyfik commented 7 months ago

Hey @Alagaesia93 @tmtrademarked @irphilli We've just published version 7.0.1 of the gem. Could you please update and let me know if your issue still persists? If you used the workaround I mentioned in my previous comment, you can revert that. Here's the changelog if you're interested.

Hi @hoshy I'm sorry to hear that. I'd appreciate it if you could also update your gem to 7.0.1 and check if that helps. If not, let me know and we'll investigate further and see what we can do about it.

irphilli commented 7 months ago

@Pacyfik The workaround (and subsequently, 7.0.1) solved the issue for me. Thank you!

Alagaesia93 commented 7 months ago

Hi @Pacyfik! Sorry for delay, I was off

With 7.0.1 it doesn't work for me, but it works if I do bundle exec rake "knapsack_pro:queue:rspec[--require spec_helper]"

The app I'm managing is quite old so we have that file, not sure if you want to add that as an option. I'm also fine with keeping the bundle exec rake "knapsack_pro:queue:rspec[--require spec_helper]", maybe add to readme?

Pacyfik commented 7 months ago

Hey @Alagaesia93 Thanks for letting me know. I'm happy you managed to find a solution to your issue. If you can continue using it for now, that would be great. If you can spare a few minutes, I'd be interested to know a few specifics about your app, if you can disclose them of course. Based on the ci.yml contents you shared I assume it's a Rails application. Could you e.g. tell me whether you have an .rspec file in your root directory (if you do, does it have a --require spec_helper line in it?), do you have a spec/rails_helper.rb file, do you require spec_helper in each of your spec files, do you use Rails engines? I'm wondering how your RSpec is configured and how it runs without knapsack, so e.g. locally in dev env. I'm hoping this information might help us inform our design choices and defaults for knapsack_pro.

hoshy commented 7 months ago

Hi @hoshy I'm sorry to hear that. I'd appreciate it if you could also update your gem to 7.0.1 and check if that helps. If not, let me know and we'll investigate further and see what we can do about it.

Hi @Pacyfik it's working on our side! Problem was that we haven't excluded some tags which causes the failures. Adding --tag ~someTag to .rspec solved the issues

Alagaesia93 commented 7 months ago

Based on the ci.yml contents you shared I assume it's a Rails application

yes

Could you e.g. tell me whether you have an .rspec file in your root directory (if you do, does it have a --require spec_helper line in it?)

I don't have it

do you have a spec/rails_helper.rb file

nope

do you require spec_helper in each of your spec files

yes

do you use Rails engines?

not sure what you mean here

I'm wondering how your RSpec is configured and how it runs without knapsack, so e.g. locally in dev env. I'm hoping this information might help us inform our design choices and defaults for knapsack_pro.

in local, bundle exec rspec, easy as that

I hope it helps!

Pacyfik commented 6 months ago

Thanks @Alagaesia93 It seems your app has a slightly less common RSpec setup which might be explained by the age of your project. At the moment, knapsack_pro has all the current RSpec defaults covered. We will have to consider what changes to introduce to cover a wider range of custom RSpec configurations.

For now, seeing as all the people who reported the original issue with their apps, have been able to fix it, I would consider the issue resolved. I'm always happy to continue the conversation if needed or offer any help.