-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgrade rails to 6.0.3.2 #812
Conversation
config/environments/development.rb
Outdated
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker | ||
|
||
# Using polling file checker, requires VM time to be in sync with host | ||
config.file_watcher = ActiveSupport::FileUpdateChecker | ||
|
||
config.hosts << "content-data-admin.dev.gov.uk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've decided the best way to do this is
config.hosts += [
"content-data-admin.dev.gov.uk"
]
Also, is there a draft version of this app that needs to be added here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, i'll update to that 👍 .
Doesn't appear to be a draft version
e414a14
to
093c8b9
Compare
config/environments/production.rb
Outdated
# config.active_job.queue_name_prefix = "content-data-admin_#{Rails.env}" | ||
# config.active_job.queue_name_prefix = "content_data_admin_production" | ||
|
||
config.action_mailer.perform_caching = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're trying to avoid changing configuration in production.rb, just checking that you'd seen this and intended it 😄
62030f2
to
5770e2a
Compare
5770e2a
to
341a94e
Compare
filename = "#{basename}.csv" | ||
key = "#{timestamp}/#{filename}" | ||
|
||
# rubocop:disable Rails/SaveBang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need revisiting
@@ -62,7 +62,9 @@ | |||
aws_secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"], | |||
) | |||
connection.directories.each(&:destroy) | |||
# rubocop:disable Rails/SaveBang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
341a94e
to
e2b4d09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rather than deleting the configure_security_policy file we're adding config to it, as Andrew does here https://github.com/alphagov/travel-advice-publisher/blob/2bd66cfeed97cba949612bc19456bf21bcbcbd67/config/initializers/csp.rb
Also, can you remove bin/bundle
and bin/update
to make it more in line with Rails 6 config. For some reason rails app:update
doesn't do it for us :(
Use the Gemfile.lock to manage the versions instead which should make it easier to upgrade as it allows bundler a wider set of versions to resolve the dependencies. Keep the rails constraint so that the current version can be identified.
e2b4d09
to
63b8d08
Compare
@benbaumann95 Can you please enable the js_compressor option for Sprockets in # Compress JS using a preprocessor.
config.assets.js_compressor = :uglifier |
63b8d08
to
b160c8e
Compare
- Adds additional changes that come with Rails 6, including updated comments and minor config changes. - Uses config.load_defaults 6.0 Add zeitwork.rb to config/initializers to define CSV acronym in certain classes - https://edgeguides.rubyonrails.org/autoloading_and_reloading_constants.html#customizing-inflections - There is some inconsistency with uppercase "CSV" and lowercase "csv" in classnames within the app so these uppercase relevant classnames have been added to the zeitwork.rb file. - As a result of introducing config.load_defaults 6.0 in application.rb, using Concerns::ClassName etc has been modified to just ClassName and now we include just the ClassName Remove 'layout: true' from render file - This was raising an ArgumentError with the rails upgrade Remove bin/update in line with rails 6 changes
Inline with the suggestion in alphagov/govuk-rfcs#126 update the remaining minor dependencies when doing a framework upgrade.
b160c8e
to
aae2202
Compare
GOV.UK hadn't intended for this app to have the GOV.UK Content Security Policy yet, with us first planning to roll out this to frontend app. It looks like this was added as part of an outsourced Rails update [1], where the dev couldn't have known about our nuanced context. As this is an app that doesn't receive a lot of developer attention I'm disabling this as I don't want breaking changes to the CSP [2] to end up in this app. [1]: #812 [2]: alphagov/govuk_app_config#279
GOV.UK hadn't intended for this app to have the GOV.UK Content Security Policy yet, with us first planning to roll out this to frontend app. It looks like this was added as part of an outsourced Rails update [1], where the dev couldn't have known about our nuanced context. As this is an app that doesn't receive a lot of developer attention I'm disabling this as I don't want breaking changes to the CSP [2] to end up in this app. [1]: #812 [2]: alphagov/govuk_app_config#279
No description provided.