Compare commits

...
This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.

5 Commits

Author SHA1 Message Date
Martin Brennan
6f149d5370
DEV: Try use execute instead of perform for jobs
This seems to alleviate execute_immediately issues but
is not ideal
2023-01-03 13:39:26 +10:00
Martin Brennan
aebcdc6266
Revert "DEV: Remove Jobs.run_immediately! for all system specs"
This reverts commit ed35ff0a7c.
2023-01-03 13:39:06 +10:00
Martin Brennan
ed35ff0a7c
DEV: Remove Jobs.run_immediately! for all system specs
See if this fixes the thread issues
2023-01-03 13:15:40 +10:00
Martin Brennan
b47505e44a
DEV: Add --fail-fast=10 for plugin system specs
If there are 10 failing, everything is probably broken,
and we don't want to wait for the whole thing to have
to finish.
2023-01-03 12:15:36 +10:00
Martin Brennan
109835403d
DEV: Partial revert of threadsafe mode for capybara
This reverts `Capybara.threadsafe = true` from commit b8100ad.

This was causing many issues in CI, including AR connections
not being expired because of threading issues, which was also
causing rails_helper to raise an error because we had busy
connections at the end of spec runs.

```
Cannot expire connection, it is owned by a different thread:
/__w/discourse/discourse/vendor/bundle/ruby/3.1.0/gems/puma-6.0.1/lib/puma/thread_pool.rb:106
sleep_forever>. Current thread: #<Thread:0x00007f541966fcc8 run>.
```

And:

```
Failure/Error: raise ActiveRecord::Base.connection_pool.stat.inspect

RuntimeError:
  {:size=>5, :connections=>2, :busy=>2, :dead=>0, :idle=>0, :waiting=>0, :checkout_timeout=>5.0}
```

See https://github.com/discourse/discourse/actions/runs/3825882529/jobs/6509204143
for examples.
2023-01-03 11:45:36 +10:00
3 changed files with 2 additions and 3 deletions

View File

@ -177,7 +177,7 @@ jobs:
- name: Plugin System Tests
if: matrix.build_type == 'system' && matrix.target == 'plugins'
run: LOAD_PLUGINS=1 bin/rspec plugins/*/spec/system --format documentation --profile
run: LOAD_PLUGINS=1 bin/rspec plugins/*/spec/system --format documentation --profile --fail-fast=10
- name: Upload failed system test screenshots
uses: actions/upload-artifact@v3

View File

@ -360,7 +360,7 @@ module Jobs
begin
until queue.empty?
queued_klass, queued_opts = queue.pop(true)
queued_klass.new.perform(queued_opts)
queued_klass.new.execute(queued_opts)
end
ensure
Thread.current[:discourse_nested_job_queue] = nil

View File

@ -245,7 +245,6 @@ RSpec.configure do |config|
allow: [Webdrivers::Chromedriver.base_url]
)
Capybara.threadsafe = true
Capybara.disable_animation = true
Capybara.configure do |capybara_config|