-
Notifications
You must be signed in to change notification settings - Fork 8
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 application to Rails 6.0 #919
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pixeltrix
force-pushed
the
upgrade-to-rails-6
branch
from
July 13, 2020 19:33
baea7f2
to
fa5339f
Compare
pixeltrix
force-pushed
the
upgrade-to-rails-6
branch
from
July 16, 2020 07:12
57806ef
to
77afe53
Compare
thomasleese
approved these changes
Jul 23, 2020
Three specs were failing with the following error: Mongo::Error::OperationFailure: uuid must be a 16-byte binary field with UUID (4) subtype (207)
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.
PhantomJS doesn't work with /etc/ssl/openssl.cnf on Debian Buster.
Rails 4.0 and later disable rack-cache by default.
This helps when upgrading the standard Rails config files.
The application doesn't use form_with so there's no need to change it.
Run the rake app:update command to update all the config files.
Rails detects when config.eager_load is nil and displays a warning and when Sidekiq.server? isn't true it returns nil which is a valid falsey value in Ruby but unfortunately not what we need.
The response methods `success?` and `missing?` are deprecated.
In Rails 4.0 the lib directory was remove from the auto/eager load paths because it resulted in a lot of junk being eager loaded in production without the developer often being aware of this. The recommend pattern now is to add an app/lib directory for non-specific application code.
Using a sass css compressor causes a scss file to be processed twice (once to build, once to compress) which breaks the usage of "unquote" to use CSS that has same function names as SCSS such as max.
Rails 6.0 adds a host authentication middleware that limits access by default to 0.0.0.0/0, ::/0 and localhost. This commit adds the dev.gov.uk hosts for the application to that list. There's no need to add the hosts in production since the middleware is primarily to prevent DNS rebinding attacks against a Rails application running locally.
Once the app is configured to load the latest defaults there is no need for the new defaults initializer as it only serves as a guide whilst upgrading the application.
Use a block to render content in the govspeak publishing component that isn't marked as HTML safe.
The Rails secrets feature has been deprecated and will be removed in an upcoming release. Rails 6.0 will generate a secret_key_base file in the tmp directory in development and test environments and use the SECRET_KEY_BASE environment variable in production.
Inline with the suggestion in alphagov/govuk-rfcs#126 update the remaining minor dependencies when doing a framework upgrade.
pixeltrix
force-pushed
the
upgrade-to-rails-6
branch
from
July 23, 2020 10:20
b8e4de3
to
2bd66cf
Compare
kevindew
added a commit
that referenced
this pull request
Jan 24, 2023
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]: #919 [2]: alphagov/govuk_app_config#279
kevindew
added a commit
that referenced
this pull request
Jan 24, 2023
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]: #919 [2]: alphagov/govuk_app_config#279
kevindew
added a commit
that referenced
this pull request
Jan 25, 2023
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]: #919 [2]: alphagov/govuk_app_config#279
kevindew
added a commit
that referenced
this pull request
Jan 25, 2023
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]: #919 [2]: alphagov/govuk_app_config#279
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.