File tree Expand file tree Collapse file tree
crates/stackable-operator/src/databases Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ impl SQLAlchemyDatabaseConnection for PostgresqlConnection {
106106 "postgresql+psycopg2://${{env:{username_env_name}}}:${{env:{password_env_name}}}@{host}:{port}/{database}{parameters}" ,
107107 ) ,
108108 TemplatingMechanism :: BashEnvSubstitution => format ! (
109- "postgresql+psycopg2://${username_env_name}:${password_env_name}@{host}:{port}/{database}{parameters}" ,
109+ "postgresql+psycopg2://${{{ username_env_name}}} :${{{ password_env_name}} }@{host}:{port}/{database}{parameters}" ,
110110 ) ,
111111 } ;
112112 SQLAlchemyDatabaseConnectionDetails {
@@ -142,7 +142,7 @@ impl CeleryDatabaseConnection for PostgresqlConnection {
142142 "db+postgresql://${{env:{username_env_name}}}:${{env:{password_env_name}}}@{host}:{port}/{database}{parameters}" ,
143143 ) ,
144144 TemplatingMechanism :: BashEnvSubstitution => format ! (
145- "db+postgresql://${username_env_name}:${password_env_name}@{host}:{port}/{database}{parameters}" ,
145+ "db+postgresql://${{{ username_env_name}}} :${{{ password_env_name}} }@{host}:{port}/{database}{parameters}" ,
146146 ) ,
147147 } ;
148148 CeleryDatabaseConnectionDetails {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl CeleryDatabaseConnection for RedisConnection {
6161 "redis://${{env:{username_env_name}}}:${{env:{password_env_name}}}@{host}:{port}/{database_id}" ,
6262 ) ,
6363 TemplatingMechanism :: BashEnvSubstitution => format ! (
64- "redis://${username_env_name}:${password_env_name}@{host}:{port}/{database_id}" ,
64+ "redis://${{{ username_env_name}}} :${{{ password_env_name}} }@{host}:{port}/{database_id}" ,
6565 ) ,
6666 } ;
6767 CeleryDatabaseConnectionDetails {
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl CeleryDatabaseConnection for GenericCeleryDatabaseConnection {
8181 let uri_env_var = env_var_from_secret ( & uri_env_name, & self . uri_secret , "uri" ) ;
8282 let uri_template = match templating_mechanism {
8383 TemplatingMechanism :: ConfigUtils => format ! ( "${{env:{uri_env_name}}}" ) ,
84- TemplatingMechanism :: BashEnvSubstitution => format ! ( "${uri_env_name}" ) ,
84+ TemplatingMechanism :: BashEnvSubstitution => format ! ( "${{{ uri_env_name}} }" ) ,
8585 } ;
8686
8787 CeleryDatabaseConnectionDetails {
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl SQLAlchemyDatabaseConnection for GenericSQLAlchemyDatabaseConnection {
8181 let uri_env_var = env_var_from_secret ( & uri_env_name, & self . uri_secret , "uri" ) ;
8282 let uri_template = match templating_mechanism {
8383 TemplatingMechanism :: ConfigUtils => format ! ( "${{env:{uri_env_name}}}" ) ,
84- TemplatingMechanism :: BashEnvSubstitution => format ! ( "${uri_env_name}" ) ,
84+ TemplatingMechanism :: BashEnvSubstitution => format ! ( "${{{ uri_env_name}} }" ) ,
8585 } ;
8686
8787 SQLAlchemyDatabaseConnectionDetails {
Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ pub enum TemplatingMechanism {
2828 #[ default]
2929 ConfigUtils ,
3030
31- /// Let `bash` substitute the env variable, e.g. `$EXAMPLE_USERNAME`.
32- ///
33- /// Please note that we use `$VAR` over `${VAR}`, as for *some* reason Airflow correctly expands
34- /// the first while failing to expand the latter.
31+ /// Let `bash` substitute the env variable, e.g. `${EXAMPLE_USERNAME}`.
3532 BashEnvSubstitution ,
3633}
You can’t perform that action at this time.
0 commit comments