WPB-24072 mount galley.yaml into background-worker#5180
Conversation
There was a problem hiding this comment.
Pull request overview
Moves Galley option/key handling into wire-subsystems and updates background-worker to load and reuse galley.yaml (plus related K8s config/secrets), removing duplicated Galley-related settings from background-worker configuration.
Changes:
- Rename
Galley.Options/Galley.KeystoWire.Options.Galley/Wire.Options.Keysand update imports/usages across Galley + tests. - Update background-worker to accept/load a separate Galley config file and derive Cassandra/Postgres/federation-domain settings from it.
- Update Helm chart/templates and integration harness to mount/pass Galley config/secrets to background-worker; remove redundant background-worker values.
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| services/galley/test/integration/TestSetup.hs | Switch test imports from Galley.Options to Wire.Options.Galley. |
| services/galley/test/integration/TestHelpers.hs | Switch test imports from Galley.Options to Wire.Options.Galley. |
| services/galley/test/integration/Run.hs | Switch integration runner imports to Wire.Options.Galley. |
| services/galley/test/integration/Federation.hs | Switch imports to Wire.Options.Galley. |
| services/galley/test/integration/API/Util/TeamFeature.hs | Switch imports to Wire.Options.Galley. |
| services/galley/test/integration/API/Util.hs | Switch qualified options import to Wire.Options.Galley. |
| services/galley/test/integration/API/Teams/LegalHold/Util.hs | Switch imports to Wire.Options.Galley. |
| services/galley/test/integration/API/Teams.hs | Switch imports to Wire.Options.Galley. |
| services/galley/test/integration/API/SQS.hs | Switch imports to Wire.Options.Galley. |
| services/galley/test/integration/API/MLS/Util.hs | Switch imports from Galley.Options/Keys to Wire.Options.*. |
| services/galley/test/integration/API.hs | Switch imports to Wire.Options.Galley. |
| services/galley/src/Galley/Run.hs | Switch runtime options import to Wire.Options.Galley. |
| services/galley/src/Galley/Env.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/App.hs | Switch options/keys imports to Wire.Options.*. |
| services/galley/src/Galley/API/Update.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/API/Teams/Features.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/API/Teams.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/API/Message.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/API/LegalHold/Conflicts.hs | Switch options import to Wire.Options.Galley. |
| services/galley/src/Galley/API/Internal.hs | Switch options import and update lens chain to Wire.Options.Galley. |
| services/galley/src/Galley/API/Federation/Handlers.hs | Switch options import to Wire.Options.Galley. |
| services/galley/galley.cabal | Drop Galley.Options/Keys modules and crypto deps now housed in wire-subsystems. |
| services/galley/default.nix | Align Nix deps with moved options/keys implementation. |
| services/background-worker/src/Wire/BackgroundWorker/Options.hs | Remove duplicated Galley/Postgres/federation fields from background-worker options. |
| services/background-worker/src/Wire/BackgroundWorker/Env.hs | Build env using Galley opts for Cassandra/Postgres/federation-domain. |
| services/background-worker/src/Wire/BackgroundWorker.hs | Thread Galley opts through run. |
| services/background-worker/exec/Main.hs | Add CLI flag and config loading for a separate Galley config file. |
| services/background-worker/default.nix | Add optparse-applicative to executable deps. |
| services/background-worker/background-worker.integration.yaml | Remove duplicated Galley/Postgres/federation settings from sample integration config. |
| services/background-worker/background-worker.cabal | Add optparse-applicative dependency for the executable. |
| libs/wire-subsystems/wire-subsystems.cabal | Add deps + expose new Wire.Options.* modules. |
| libs/wire-subsystems/src/Wire/Options/Keys.hs | Rename module to Wire.Options.Keys. |
| libs/wire-subsystems/src/Wire/Options/Galley.hs | Rename module to Wire.Options.Galley and depend on Wire.Options.Keys. |
| libs/wire-subsystems/default.nix | Add deps for the moved keys/options modules. |
| libs/types-common/src/Util/Options.hs | Factor out decodeConfigFile helper and reuse it from getOptions. |
| integration/test/Testlib/ModService.hs | Start background-worker with both its config and a generated Galley config; clean up multiple temp paths. |
| hack/helmfile.yaml.gotmpl | Remove background-worker federationDomain value injection (now sourced from Galley). |
| hack/helm_vars/wire-server/values.yaml.gotmpl | Remove redundant background-worker Postgres/Galley Cassandra/federationDomain values. |
| charts/wire-server/values.yaml | Remove redundant background-worker Postgres/Galley Cassandra/federationDomain values and docs. |
| charts/wire-server/templates/background-worker/deployment.yaml | Mount Galley config/secret into background-worker pod; add checksums. |
| charts/wire-server/templates/background-worker/configmap.yaml | Remove Galley/Postgres/federationDomain config emission; adjust RabbitMQ CA cert path logic. |
| charts/wire-server/templates/background-worker/cassandra-secret.yaml | Remove background-worker Galley Cassandra secret (now sourced from Galley). |
| charts/wire-server/templates/_helpers.tpl | Remove background-worker-specific Galley TLS helper; add galley.tlsSecretRef. |
| changelog.d/0-release-notes/WPB-24072 | Release note describing the config unification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akshaymankar
left a comment
There was a problem hiding this comment.
I think we should keep the flexibility of configuring the hasql pool differently for the bcakground-worker. Other comments are nits.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ed6a476 to
4b31436
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4b31436 to
690c3f8
Compare
Checklist
changelog.d