🇩🇪Germany @Alan Evans

Account created on 16 November 2004, about 20 years ago
  • Senior Software Engineer at Acquia 
#

Recent comments

🇩🇪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.

Production build 0.71.5 2024