Write the git-ignored profiles.toml pointing at the prod sandbox. The password is taken from $MATERIALIZE_PROD_SANDBOX_APP_PASSWORD at connect time via the `${VAR}` form. The default sslmode for a non-loopback host is `require`, which is what the cloud sandbox serves.
()
| 146 | |
| 147 | |
| 148 | def write_profiles() -> None: |
| 149 | """Write the git-ignored profiles.toml pointing at the prod sandbox. |
| 150 | |
| 151 | The password is taken from $MATERIALIZE_PROD_SANDBOX_APP_PASSWORD at |
| 152 | connect time via the `${VAR}` form. The default sslmode for a non-loopback |
| 153 | host is `require`, which is what the cloud sandbox serves. |
| 154 | """ |
| 155 | assert MATERIALIZE_PROD_SANDBOX_HOSTNAME is not None |
| 156 | assert MATERIALIZE_PROD_SANDBOX_USERNAME is not None |
| 157 | assert loader.composition_path is not None |
| 158 | with open(loader.composition_path / "profiles.toml", "w") as f: |
| 159 | f.write( |
| 160 | "[prod]\n" |
| 161 | f'host = "{MATERIALIZE_PROD_SANDBOX_HOSTNAME}"\n' |
| 162 | "port = 6875\n" |
| 163 | f'username = "{MATERIALIZE_PROD_SANDBOX_USERNAME}"\n' |
| 164 | 'password = "${MATERIALIZE_PROD_SANDBOX_APP_PASSWORD}"\n' |
| 165 | ) |
| 166 | |
| 167 | |
| 168 | def write_project_toml() -> None: |
no test coverage detected