Support for update environments in ACSF

Created on 11 January 2024, about 1 year ago
Updated 20 March 2024, about 1 year ago

Problem/Motivation

Currently the Acquia Search environment detector uses the AH_SITE_ENVIRONMENT variable to figure out which core should be used in Search. Unfortunately this means when large ACSF instances update, the environment changes from say 01prod to 01update, causing search to go down.

Proposed resolution

For ACSF customers, when the gardens_site_settings variable is detected, use the values from that array instead of the AH_SITE_ENVIRONMENT variable.

πŸ› Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @japerry
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    82 pass
  • πŸ‡©πŸ‡ͺGermany Alan Evans

    I have to make a few assumptions about the context of surrounding code and calling code on this one, but it looks like:

    1. this section of code is trying to find an appropriate search core for the current "site" context
    2. it will make a prioritised list of cores to return
    3. top priority on that list will include the environment name and DB role name
    4. the default (prior) implementation uses a raw environment variable value as the environment name

    Given that (correct me if any of that's not right):

    • The environment var override should do what you wanted: it will leave you with a single "canonical" environment for each environment-pair that you may be operating in. It should always be set (if it is not set, then the site is probably not functional anyway), and should always contain the "lead" or "live" environment out of a pair, which I think is what you're looking for here: you are looking for a stable environment name for a site, rather than the literal environment name, which changes during code deployment operations
    • The DB role override might not be strictly needed (and I'm not sure I've seen anyone asking for it), but it should also be harmless, and it might even be a better source of data for the DB role .... ultimately, that bit of data comes from a very similar place in both prior and new versions, but via a very different route

    Looks good to me ... we should get this tested in a real world setup.

  • Pipeline finished with Skipped
    about 1 year ago
    #113155
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    Tested internally with success. Merged!

  • Status changed to Fixed about 1 year ago
    • japerry β†’ committed 1686b526 on 3.1.x
      Issue #3414133 by japerry: Support for update environments in ACSF
      
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024