You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read the connection URI from the environment. (#325)
### What
The connection URI can now be provided from the environment, using
`"uri": {"variable": "..."}`.
This means that we can use the same configuration in development and
production, and enables the CLI or Cloud build infrastructure to fill it
in with e.g. a region-specific URL.
### How
We replace the `ResolvedSecret` from the NDC SDK (which has also been
removed from the SDK) with our own `Secret` type, which can be `Plain`
or `FromEnvironment`. We then handle the case appropriately, whereas
before, we would panic if we ever received a non-resolved secret.
I have introduced the `Environment` trait to supply environment
variables. During normal execution, this is a wrapper around
`sys::env::var`. In tests, however, we can use `EmptyEnvironment`, or a
`HashMap` containing test data.
This also simplified a couple of pieces of test infrastructure.
* We no longer need to template the Aurora configuration (we just
provide the appropriate value as an environment variable).
* Generating configuration becomes a single call to `ndc-postgres-cli
update`.
* The benchmarks no longer need a generated configuration file.
0 commit comments