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

feature/APPEALS-28925-33581 - Update to Rails 6.1 & Replace 'multiverse' with standard Rails multi-DB configuration #21736

Commits on May 14, 2024

  1. 🔥 Remove deprecated config setting `config.active_record.sqlite3.repr…

    …esent_boolean_as_integer`
    
    This will have no implications for Caseflow, since we are only using the `sqlite3`
    adapter nominally for the `demo_vacols` database, which is not actually being used
    in our demo environments (demo environments are deployed as `development` envs).
    jcroteau committed May 14, 2024
    Configuration menu
    Copy the full SHA
    c24194d View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. ⬆️ Update caseflow-commons to resolve sub-dependency conflicts

    Removes unneeded gems `bourbon` and `neat`, which were causing
    a sub-dependency conflict on `thor`.
    jcroteau committed May 15, 2024
    Configuration menu
    Copy the full SHA
    4596d29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a351e11 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c752f17 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fcbc037 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. 🔧 Assume default for config.active_record.has_many_inversing

    The default value is safe to assume here. There is a possible edge-case
    for recursive associations having the same name as the model, but
    we do not have any such associations in Caseflow.
    
    For more background, see
    https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#9072
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    61e9503 View commit details
    Browse the repository at this point in the history
  2. 🔧 Assume default for config.active_storage.track_variants

    We're not currently using ActiveStorage in Caseflow, so it
    is safe to just assume the default here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    719bd1a View commit details
    Browse the repository at this point in the history
  3. 🔧 Override default for config.active_job.retry_jitter

    The default jitter is probably safe, however, I'm not 100% sure that we
    don't have any jobs that need to be requeued with exact wait times. So
    we let's override this for now to stay on the safe side.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    6121503 View commit details
    Browse the repository at this point in the history
  4. 🔧 Assume default for `config.active_job.skip_after_callbacks_if_termi…

    …nated`
    
    We're not currently using `throw :abort` within any `before_enqueue`/`before_perform` 
    callbacks on existing Caseflow jobs, so the default should be fine here.
    
    For more background, see
    https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#4c60
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    a4ac181 View commit details
    Browse the repository at this point in the history
  5. 🔧 Assume default for `config.action_dispatch.cookies_same_site_protec…

    …tion`
    
    This setting controls the `SameSite` optional attribute for the
    `Set-Cookie` header.
    
    `SameSite=Lax` means that the cookie is not sent on cross-site requests,
    such as on requests to load images or frames, but is sent when a user is
    navigating to the origin site from an external site (for example, when
    following a link). This is the default behavior if the SameSite attribute
    is not specified.
    
    `Lax` is currently the default assumed by both Chrome and Edge browsers
    when this attribute is left unspecified, so assuming this value
    should be sensible. It allows us to have our cake (blocking CSRF attacks)
    and eat it too (providing a logged-in experience when users navigate to
    Caseflow  across origins).
    
    For more background, see
    - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
    - https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#1f15
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    b82a517 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cdde9b6 View commit details
    Browse the repository at this point in the history
  7. 🔧 Assume default for `ActiveSupport.utc_to_local_returns_utc_offset_t…

    …imes`
    
    We're not using `ActiveSupport::TimeZone.utc_to_local` anywhere,
    so the default is safe to assume here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    3e40619 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1383a2c View commit details
    Browse the repository at this point in the history
  9. 🔧 Assume default for config.active_record.legacy_connection_handling

    The default should be safe to assume here, as we do not do any
    role or shard switching on database connections.
    
    For more background, see
    https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#8007
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    5b05f55 View commit details
    Browse the repository at this point in the history
  10. 🔧 Assume default for `config.action_view.form_with_generates_remote_f…

    …orms`
    
    We don't use the `form_with` helper anywhere, so this behavior change is
    inconsequential for us, and we can safely assume the new default.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    3bb27a0 View commit details
    Browse the repository at this point in the history
  11. 🔧 Assume default for config.active_storage.queues.analysis

    We do not use ActiveStorage, so the default is safe to assume here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    090b1ee View commit details
    Browse the repository at this point in the history
  12. 🔧 Assume default for config.active_storage.queues.purge

    We do not use ActiveStorage, so the default is safe to assume here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    51a515e View commit details
    Browse the repository at this point in the history
  13. 🔧 Assume default for config.action_mailbox.queues.incineration

    We don't use ActionMailbox, so the new default is safe to assume here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    fef5031 View commit details
    Browse the repository at this point in the history
  14. 🔧 Assume default for config.action_mailbox.queues.routing

    We do not use ActionMailbox, so the default is safe to assume here.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    ea29b0b View commit details
    Browse the repository at this point in the history
  15. 🔧 Assume default for config.action_mailer.deliver_later_queue_name

    We're not using `ActionMailer::MessageDelivery #deliver_later` anywhere,
    so the default is safe to assume.
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    43d4b0d View commit details
    Browse the repository at this point in the history
  16. 🔧 Assume default for config.action_view.preload_links_header

    This flag can be safely uncommented. Browsers that support Link
    headers will get a performance boost. Browsers that don’t will
    ignore them.
    
    We override in `development` environments to avoid an edge case
    leading to an HTTP response header overflow.
    
    For more background, see
    https://lilyreile.medium.com/rails-6-1-new-framework-defaults-what-they-do-and-how-to-safely-uncomment-them-c546b70f0c5e#3679
    jcroteau committed May 16, 2024
    Configuration menu
    Copy the full SHA
    e898eff View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    542ee80 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    7bf11ad View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. ♻️ Extract constant

    jcroteau committed May 17, 2024
    Configuration menu
    Copy the full SHA
    9ac6b0e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee5f680 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cbb9cec View commit details
    Browse the repository at this point in the history
  4. 🩹 Add forgotten disallowed deprecation warning

    This deprecation warning was addressed by the following
    PR, but we forgot to add it to the list of disallowed
    deprecation warnings:
    
    #21614
    jcroteau committed May 17, 2024
    Configuration menu
    Copy the full SHA
    0506fdf View commit details
    Browse the repository at this point in the history
  5. 💡 Update comment

    Task `rake routes` has been replaced with `rails routes`
    jcroteau committed May 17, 2024
    Configuration menu
    Copy the full SHA
    a0d6103 View commit details
    Browse the repository at this point in the history
  6. ✅ Update test to account for change to `ActionDispatch::Response#cont…

    …ent_type` 
    
    `ActionDispatch::Response#content_type` now returns the full Content-Type header
    jcroteau committed May 17, 2024
    Configuration menu
    Copy the full SHA
    b1ca3da View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    043a7d7 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Configuration menu
    Copy the full SHA
    9c670c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00c19f1 View commit details
    Browse the repository at this point in the history
  3. ♻️ Arrange 'database.yml' configs by environment

    Group DB configs by environment in anticipation of
    reformatting for Rails 6+ multi-DB configuration.
    jcroteau committed May 20, 2024
    Configuration menu
    Copy the full SHA
    8844a78 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0df5bac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a02b952 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9a1cc75 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. ♻️ Use new database-specific rake tasks

    After migrating to the Rails 6+ native multi-database configuration,
    the behavior of some DB management tasks, such as `rake db:migrate`
    changed such that they now act on ALL databases and not just the
    primary database. So we must replace the invocations of these
    tasks with their new, database-specific counterparts.
    jcroteau committed May 21, 2024
    Configuration menu
    Copy the full SHA
    1ed3db7 View commit details
    Browse the repository at this point in the history
  2. ➖ Remove 'multiverse' gem

    Now that we have fiully transitioned to Rails-native
    multi-database support, we are no longer reliant on
    the 'multiverse' gem and can remove it.
    jcroteau committed May 21, 2024
    Configuration menu
    Copy the full SHA
    6bb34c2 View commit details
    Browse the repository at this point in the history
  3. 🗃️ Prohibit execution of non-DB-specific rake tasks

    After transitioning to Rails-native multi-DB support,
    the behavior of some DB tasks changed such that they will now
    act on ALL databases and not just the primary database
    (ex. `rake db:migrate` will now migrate ALL databases).
    
    To avoid accidents, we re-define these tasks here to no-op
    and output a helpful message to redirect developers toward
    using their new database-specific counterparts instead.
    jcroteau committed May 21, 2024
    Configuration menu
    Copy the full SHA
    b505f3e View commit details
    Browse the repository at this point in the history
  4. 🗃️ Prevent execution of vacols DB-specific rake tasks

    Explicitly clear any generated database tasks for the vacols DB.
    
    Once on Rails 7+, we can instead add the `database_tasks: false`
    option to the `database.yml` to permit connection to the vacols
    database without generating database tasks for it:
    
    https://github.com/rails/rails/blob/984c3ef2775781d47efa9f541ce570daa2434a80/guides/source/active_record_multiple_databases.md?plain=1#L203-L219
    jcroteau committed May 21, 2024
    Configuration menu
    Copy the full SHA
    a366478 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. ♻️ Create new environment for GH workflow 'Make-docs-to-webpage'

    Instead of performing a bunch of hard-to-maintain `sed` gymnastics
    to modify the existing 'test' environment, let's create a new
    'make_docs' environment (based off of 'test') and configure it
    appropriately for use by the 'Make-docs-to-webpage' GH workflow.
    jcroteau committed May 23, 2024
    Configuration menu
    Copy the full SHA
    38efb92 View commit details
    Browse the repository at this point in the history