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

Code maintenance/46647 bump rails to 7.1 #14440

Merged
merged 97 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
f67aee5
[#46647] Bump Rails to 7.1
dombesz Apr 3, 2023
aec8707
Update the rest of the config files from bin/rails app:update.
dombesz Dec 16, 2023
ba16112
Use Rails.application instead of OpenProject::Application
dombesz Dec 16, 2023
f60bfb9
Upgrade Paper trail
dombesz Dec 16, 2023
739223b
Remove serializer deprecation warning.
dombesz Dec 18, 2023
e1cd660
Add storage test configuration
dombesz Dec 18, 2023
c4e4aad
Fix rails bug of using url_helpers outside of controller context
dombesz Dec 18, 2023
7b5be94
Fix deprecation warning
dombesz Dec 18, 2023
0963a10
Fix merge(rewhere:true) deprecation warnings
dombesz Dec 18, 2023
8ffa313
Fix deprecation warnings
dombesz Dec 18, 2023
49395b1
Change ActiveRecord::SchemaMigration.table_name to AR::Base.connectio…
dombesz Dec 18, 2023
38b660a
Define custom migration classes for Project and Bim::IfcModels::IfcMo…
dombesz Dec 21, 2023
974d4ee
Rename secrets.yml to credentials.yml
dombesz Jan 8, 2024
d9d6ba0
Fix typo
dombesz Jan 8, 2024
f1e4c2a
Remove warning suppress config
dombesz Jan 8, 2024
a382e82
Replace deprecated fixture_path with fixure_paths
dombesz Jan 8, 2024
3752706
Demodulize controller name for default breadcrumb, to avoid translati…
dombesz Jan 8, 2024
6b72125
Use Rails.application.secret_key_base
dombesz Jan 8, 2024
b945f0f
Remove unused before_action
dombesz Jan 8, 2024
7182d46
Add our custom deprecator to the Rails deprecators in order to inheri…
dombesz Jan 8, 2024
2f97b6e
Fix settings_helper_specs.rb
dombesz Jan 9, 2024
4398586
Fix homescreen_controller_spec.rb
dombesz Jan 9, 2024
2d96ddf
Fix repositories_controller_spec.rb
dombesz Jan 9, 2024
092323e
Remove unused ProjectsController patch from Costs module.
dombesz Jan 9, 2024
17296b3
Redefine rails application methods to use Rails.application
dombesz Jan 9, 2024
a6bacb0
Change expectation for endless range.
dombesz Jan 9, 2024
6326631
Add missing status_blocked translation.
dombesz Jan 9, 2024
72c0b93
Fix tabular form builder specs, also scope the localized label infere…
dombesz Jan 9, 2024
512be06
Fix auth source translation missing.
dombesz Jan 9, 2024
be53da5
Fix custom field cache translation
dombesz Jan 9, 2024
b39d1dd
Fix meeting aaj spec
dombesz Jan 9, 2024
4a64077
Fix project enabled modules contract spec
dombesz Jan 9, 2024
a3c7712
Simplify fix for settings helper spec
dombesz Jan 9, 2024
fd715cb
Add label_identifier translation key
dombesz Jan 9, 2024
af6716e
Fix wiki controller specs
dombesz Jan 9, 2024
90e3341
Fix double render errors in permission specs
dombesz Jan 10, 2024
71e9878
Add unknown_storage translation key
dombesz Jan 10, 2024
efb5e31
Assert redirect against `response.location` for provider_callback
aaron-contreras Jan 10, 2024
8e5d56e
Assert redirect against `response.location` for ensure_connection_flow
aaron-contreras Jan 10, 2024
18f0755
Fix query schema representer spec
dombesz Jan 10, 2024
65f5f87
Fix the super call on the initializer of the RelationOfTypeColumn class
dombesz Jan 10, 2024
87abc1e
Adding a string to an sql literal implicitly is no longer possible, c…
dombesz Jan 10, 2024
4bab7c4
Use new mailer config preview path syntax
dombesz Jan 11, 2024
9cf3cd8
Add missing breadcrumb translations
dombesz Jan 11, 2024
96df6f2
Add missing translation keys
dombesz Jan 11, 2024
464253c
Remove inexistent action from before filter on StoragesController
dombesz Jan 11, 2024
85d2102
Fix Meeting specs
dombesz Jan 11, 2024
fcdce72
Stop raising pending connection errors in ferrum
dombesz Jan 11, 2024
53ff372
Add missing translation keys
dombesz Jan 12, 2024
50df606
Wait for the filters dropdown to be loaded before selecting a filter.
dombesz Jan 15, 2024
5eac52f
Fix toaster dismission not being registered
dombesz Jan 16, 2024
f5f74e7
Fix Board spec timing issue
dombesz Jan 17, 2024
73658fe
Improve Filter dropdown loading expectation to cover more cases
dombesz Jan 17, 2024
b44e41e
Fix update_cost_report_specs by waiting for page reload to finish
dombesz Jan 17, 2024
5baff99
Improve team planner spec wait_for_loaded method
dombesz Jan 17, 2024
986427c
Remove loading indicator wait because there is not indicator on the s…
dombesz Jan 17, 2024
801f445
Increase wait time for team planner to reload
dombesz Jan 17, 2024
7debe60
Skip waiting for filter loading when the filters are embedded in a mo…
dombesz Jan 17, 2024
47f6264
Increase retry interval for subproject board spec save
dombesz Jan 17, 2024
d8b03f8
More fixes on boards
dombesz Jan 18, 2024
4804473
Wait longer for project include component
dombesz Jan 18, 2024
a6586e2
Don't move the card by index, but by name
oliverguenther Jan 18, 2024
4580c2e
Set show_exceptions to :none to match previous behavior
oliverguenther Jan 18, 2024
ad47e71
Change auth_stages feature specs to verify the missing http status co…
dombesz Jan 18, 2024
3322ed6
Enable actioncontroller caching in test config.
dombesz Jan 18, 2024
48b17e5
Fix update budget specs.
dombesz Jan 18, 2024
adee405
Wait before saving budget specs
dombesz Jan 18, 2024
dac7f00
Revert "Change auth_stages feature specs to verify the missing http s…
dombesz Jan 19, 2024
8824a6d
Add edit budget page calculated cost expectations.
dombesz Jan 19, 2024
5c35b42
Fix move work package specs by fixing the context menu opening
dombesz Jan 19, 2024
7d8a9a6
Fix the my spent time widget spec by waiting for the calendar to be d…
dombesz Jan 19, 2024
7af333c
Wait for ajax query in the project status specs
dombesz Jan 19, 2024
24d5ed2
Remove old allow_concurrency = false setting in the test config
dombesz Jan 25, 2024
2f10bd4
flaky-fix: Wait for ng-select list to refresh after entering text
cbliard Jan 25, 2024
4ca1d09
Cache classes and remove null cache store config.
dombesz Jan 26, 2024
c9d7735
Lock the rails version to 7.1.3
dombesz Jan 29, 2024
2468cc9
Correct the config.enable_reloading setting in the test environment
dombesz Jan 29, 2024
f2fb7f6
Cache Principal.default scope to reduce the number of queries on the …
dombesz Jan 29, 2024
c354528
Cache principal query directly in the capabilities scope
dombesz Jan 29, 2024
79c0466
Fix and simplify the update_cost_repor_spec
dombesz Jan 30, 2024
0f8f9f1
Use the filter loaded expectation on hidden elements for mobile view.
dombesz Jan 30, 2024
ceac4eb
Re-use work package filter loaded expectation
dombesz Jan 30, 2024
08e4fce
Revert "Fix move work package specs by fixing the context menu opening"
dombesz Jan 30, 2024
10c5d2f
Make the WorkPacakge::Filters#expect_loaded method to work for mobile…
dombesz Jan 30, 2024
1f39137
Address CR comments
dombesz Jan 30, 2024
49b314e
Change Board page expect_card to wait for reloading the board column
dombesz Jan 30, 2024
fa1d124
Attempt to wait a bit longer for flaky spec
dombesz Jan 30, 2024
7830645
Lock rails version to 7.1.x that is above 7.1.3
dombesz Jan 31, 2024
ac98e83
Fix typos
dombesz Jan 31, 2024
8e63311
Use the expect_and_dismiss_toaster method in work package table specs.
dombesz Jan 31, 2024
bf15e20
Remove typo comment
dombesz Jan 31, 2024
fb77503
Lock rails version to ~>7.1.3
dombesz Jan 31, 2024
b84d7a1
Use RequestStore fetch, fix typos in Gemfile.
dombesz Jan 31, 2024
8555eb6
Remove unnecessary path loading config. Fix module naming for Constra…
dombesz Feb 1, 2024
eb7fa7f
Revert create user api to use authSource for backwards compatibility.
dombesz Feb 1, 2024
9865cc7
Simplify default_breadcrumb method
dombesz Feb 1, 2024
41cef95
Use DIR instead of FileUtils in bin/setup script
dombesz Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gem 'activemodel-serializers-xml', '~> 1.0.1'
gem 'activerecord-import', '~> 1.5.0'
gem 'activerecord-session_store', '~> 2.1.0'
gem 'ox'
gem 'rails', '~> 7.0', '>= 7.0.3.1'
gem 'rails', '~> 7.1.3'
gem 'responders', '~> 3.0'

gem 'ffi', '~> 1.15'
Expand Down Expand Up @@ -71,7 +71,7 @@ gem 'typed_dag', '~> 2.0.2', require: false
gem 'addressable', '~> 2.8.0'

# Remove whitespace from model input
gem "auto_strip_attributes", "~> 2.5"
gem 'auto_strip_attributes', '~> 2.5'

# Provide timezone info for TZInfo used by AR
gem 'tzinfo-data', '~> 1.2023.1'
Expand Down Expand Up @@ -163,7 +163,7 @@ gem 'matrix', '~> 0.4.2'

gem 'meta-tags', '~> 2.20.0'

gem "paper_trail", "~> 12.3"
gem 'paper_trail', '~> 15.1.0'

group :production do
# we use dalli as standard memcache client
Expand All @@ -180,7 +180,7 @@ gem 'sprockets-rails', '~> 3.4.2'

gem 'puma', '~> 6.4'
gem 'puma-plugin-statsd', '~> 2.0'
gem 'rack-timeout', '~> 0.6.3', require: "rack/timeout/base"
gem 'rack-timeout', '~> 0.6.3', require: 'rack/timeout/base'

gem 'nokogiri', '~> 1.16.0'

Expand All @@ -203,13 +203,13 @@ gem 'mini_magick', '~> 4.12.0', require: false
gem 'validate_url'

# Storages support code
gem "dry-container"
gem 'dry-container'

# ActiveRecord extension which adds typecasting to store accessors
gem "store_attribute", "~> 1.0"
gem 'store_attribute', '~> 1.0'

# Appsignal integration
gem "appsignal", "~> 3.0", require: false
gem 'appsignal', '~> 3.0', require: false

gem 'view_component'
# Lookbook
Expand All @@ -220,7 +220,7 @@ gem 'factory_bot', '~> 6.4.0', require: false
# require factory_bot_rails for convenience in core development
gem 'factory_bot_rails', '~> 6.4.0', require: false

gem 'turbo-rails', "~> 1.1"
gem 'turbo-rails', '~> 1.1'

gem 'httpx'

Expand All @@ -232,11 +232,11 @@ group :test do
# Test prof provides factories from code
# and other niceties
gem 'test-prof', '~> 1.3.0'
gem 'turbo_tests', github: "crohr/turbo_tests", ref: "fix/runtime-info"
gem 'turbo_tests', github: 'crohr/turbo_tests', ref: 'fix/runtime-info'

gem 'rack_session_access'
gem 'rspec', '~> 3.12.0'
# also add to development group, so "spec" rake task gets loaded
# also add to development group, so 'spec' rake task gets loaded
gem 'rspec-rails', '~> 6.1.0', group: :development

# Retry failures within the same environment
Expand Down Expand Up @@ -328,8 +328,8 @@ group :development, :test do
gem 'rubocop-rspec', require: false

# erb linting
gem "erb_lint", require: false
gem "erblint-github", require: false
gem 'erb_lint', require: false
gem 'erblint-github', require: false

# Brakeman scanner
gem 'brakeman', '~> 6.1.0'
Expand Down Expand Up @@ -380,6 +380,6 @@ gemfiles.each do |file|
send(:eval_gemfile, file) if File.readable?(file)
end

gem "openproject-octicons", '~>19.8.0'
gem "openproject-octicons_helper", '~>19.8.0'
gem "openproject-primer_view_components", '~>0.20.0'
gem 'openproject-octicons', '~>19.8.0'
gem 'openproject-octicons_helper', '~>19.8.0'
gem 'openproject-primer_view_components', '~>0.20.0'
156 changes: 87 additions & 69 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -238,66 +238,71 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
zeitwerk (~> 2.6)
actionmailbox (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
actionmailer (7.1.3)
actionpack (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activesupport (= 7.1.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.3)
actionview (= 7.1.3)
activesupport (= 7.1.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionpack-xml_parser (2.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
actiontext (7.1.3)
actionpack (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
actionview (7.1.3)
activesupport (= 7.1.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3)
activesupport (= 7.1.3)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activemodel (7.1.3)
activesupport (= 7.1.3)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activerecord (7.1.3)
activemodel (= 7.1.3)
activesupport (= 7.1.3)
timeout (>= 0.4.0)
activerecord-import (1.5.1)
activerecord (>= 4.2)
activerecord-nulldb-adapter (1.0.1)
Expand All @@ -309,17 +314,21 @@ GEM
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activesupport (= 7.1.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
acts_as_list (1.1.0)
activerecord (>= 4.2)
Expand Down Expand Up @@ -466,6 +475,8 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
drb (2.2.0)
ruby2_keywords
dry-container (0.11.0)
concurrent-ruby (~> 1.0)
dry-core (1.0.1)
Expand Down Expand Up @@ -704,6 +715,7 @@ GEM
ruby2_keywords (~> 0.0.1)
mustermann-grape (1.0.2)
mustermann (>= 1.0.0)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-imap (0.4.9.1)
Expand Down Expand Up @@ -753,9 +765,9 @@ GEM
activemodel
os (1.1.4)
ox (2.14.17)
paper_trail (12.3.0)
activerecord (>= 5.2)
request_store (~> 1.1)
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.24.0)
parallel_tests (4.4.0)
parallel
Expand Down Expand Up @@ -831,26 +843,31 @@ GEM
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rack-timeout (0.6.3)
rack_session_access (0.2.0)
builder (>= 2.0.0)
rack (>= 1.0.0)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3)
actioncable (= 7.1.3)
actionmailbox (= 7.1.3)
actionmailer (= 7.1.3)
actionpack (= 7.1.3)
actiontext (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activemodel (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
bundler (>= 1.15.0)
railties (= 7.0.8)
railties (= 7.1.3)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -865,13 +882,14 @@ GEM
rails-i18n (7.0.8)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.1.0)
rb-fsevent (0.11.2)
Expand Down Expand Up @@ -1220,7 +1238,7 @@ DEPENDENCIES
openproject-xls_export!
overviews!
ox
paper_trail (~> 12.3)
paper_trail (~> 15.1.0)
parallel_tests (~> 4.0)
pdf-inspector (~> 1.2)
pg (~> 1.5.0)
Expand All @@ -1240,7 +1258,7 @@ DEPENDENCIES
rack-test (~> 2.1.0)
rack-timeout (~> 0.6.3)
rack_session_access
rails (~> 7.0, >= 7.0.3.1)
rails (~> 7.1.3)
rails-controller-testing (~> 1.0.2)
rails-i18n (~> 7.0.0)
rdoc (>= 2.4.2)
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

require File.expand_path('config/application', __dir__)

OpenProject::Application.load_rake_tasks
Rails.application.load_rake_tasks

Rake::Task[:default].clear
task default: 'test:suite:run'
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def pick_layout(*args)
end

def default_breadcrumb
label = "label_#{self.class.name.gsub('Controller', '').underscore.singularize}"
label = "label_#{controller_name.singularize}"

I18n.t(label + '_plural',
default: label.to_sym)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RepositoriesController < ApplicationController

before_action :find_project_by_project_id
before_action :authorize
before_action :find_repository, except: %i[edit update create destroy destroy_info]
before_action :find_repository, except: %i[update create destroy destroy_info]
dombesz marked this conversation as resolved.
Show resolved Hide resolved
dombesz marked this conversation as resolved.
Show resolved Hide resolved
accept_key_auth :revisions

rescue_from OpenProject::SCM::Exceptions::SCMError, with: :show_error_command_failed
Expand Down
Loading
Loading