Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knapsack_pro 7.6.1 fails with RSpec #263

Closed
lucasmazza opened this issue Jun 20, 2024 · 3 comments
Closed

knapsack_pro 7.6.1 fails with RSpec #263

lucasmazza opened this issue Jun 20, 2024 · 3 comments
Labels
bug planned It’s planned to be done

Comments

@lucasmazza
Copy link

Dependabot created a PR on our repo to bump knapsack_pro from 7.6.0 to 7.6.1 and our build fails inside KnapsackPro internals, probably due a require that was missed on #262. This is the backtrace we get 👇

/bundle/ruby/3.3.0/gems/knapsack_pro-7.6.1/lib/knapsack_pro/formatters/time_tracker.rb:148:in `now': uninitialized constant KnapsackPro::Utils (NameError)
        KnapsackPro::Utils.time_now
                   ^^^^^^^
	from /bundle/ruby/3.3.0/gems/knapsack_pro-7.6.1/lib/knapsack_pro/formatters/time_tracker.rb:23:in `initialize'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/formatters.rb:157:in `new'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/formatters.rb:157:in `add'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/configuration.rb:997:in `add_formatter'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/configuration_options.rb:122:in `block in load_formatters_into'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/configuration_options.rb:122:in `each'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/configuration_options.rb:122:in `load_formatters_into'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/configuration_options.rb:24:in `configure'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:132:in `configure'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:99:in `setup'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:86:in `run'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:71:in `run'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'
	from /bundle/ruby/3.3.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<main>'
@ArturT ArturT added the bug label Jun 20, 2024
@ArturT
Copy link
Member

ArturT commented Jun 20, 2024

What does the knapsack pro command look like that you use to run tests? I'm wondering why our integration tests did not catch this issue.

Please could you use 7.6.0 before we fix this issue.

@lucasmazza
Copy link
Author

Our pipeline runs KNAPSACK_PRO_LOG_LEVEL=info bin/rake knapsack_pro:rspec

@ArturT ArturT added the planned It’s planned to be done label Jun 25, 2024
ArturT added a commit that referenced this issue Jun 26, 2024
…which means rails_helper is not loaded and knapsack_pro lib is also not loaded. This verifies if the custom KnapsackPro::Formatters::TimeTracker formatter from knapsack_pro can be used before knapsack_pro is loaded

#263
ArturT added a commit that referenced this issue Jun 27, 2024
… in RSpec when using Knapsack Pro Regular Mode and the `.rspec` file is not present. (#265)

* update(CI tests): reproduce an issue when the .rspec file is not set which means rails_helper is not loaded and knapsack_pro lib is also not loaded. This verifies if the custom KnapsackPro::Formatters::TimeTracker formatter from knapsack_pro can be used before knapsack_pro is loaded

#263

* fix(KnapsackPro::Formatters::TimeTracker): require utils to fix failing tests on CI

* Update CHANGELOG.md

* run only spec that explicitly requires spec_helper. This is needed when the .rspec file is not loaded with --require spec_helper

* reproduce the issue on CI
@ArturT
Copy link
Member

ArturT commented Jun 27, 2024

We've released the knapsack_pro 7.6.2 version that fixes the problem. Please update it.

@ArturT ArturT closed this as completed Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug planned It’s planned to be done
Projects
None yet
Development

No branches or pull requests

2 participants