@@ -158,7 +158,7 @@ class EnvironmentConfigLoader(
158158 * environment configuration for the repository is not read from the source code, but passed when triggering the
159159 * run.
160160 */
161- fun resolve (config : EnvironmentConfig , hierarchy : Hierarchy ): ResolvedEnvironmentConfig {
161+ suspend fun resolve (config : EnvironmentConfig , hierarchy : Hierarchy ): ResolvedEnvironmentConfig {
162162 val repositoryConfig = RepositoryEnvironmentConfig (
163163 infrastructureServices = config.infrastructureServices.map { it.toRepositoryService() },
164164 environmentDefinitions = config.environmentDefinitions,
@@ -173,7 +173,7 @@ class EnvironmentConfigLoader(
173173 * Resolve the declarations in the given [config] using the provided [hierarchy]. Handle references that cannot be
174174 * resolved according to the `strict` flag in the configuration.
175175 */
176- private fun resolveRepositoryEnvironmentConfig (
176+ private suspend fun resolveRepositoryEnvironmentConfig (
177177 config : RepositoryEnvironmentConfig ,
178178 hierarchy : Hierarchy
179179 ): ResolvedEnvironmentConfig {
@@ -216,7 +216,7 @@ class EnvironmentConfigLoader(
216216 * repository. Return a [Map] with the resolved secrets keyed by their names. Depending on the strict flag, fail
217217 * if secrets cannot be resolved.
218218 */
219- private fun resolveSecrets (config : RepositoryEnvironmentConfig , hierarchy : Hierarchy ): Map <String , Secret > {
219+ private suspend fun resolveSecrets (config : RepositoryEnvironmentConfig , hierarchy : Hierarchy ): Map <String , Secret > {
220220 val allSecretsNames = mutableSetOf<String >()
221221 allSecretsNames + = config.environmentVariables.mapNotNull { it.secretName }
222222 config.infrastructureServices.forEach { service ->
@@ -225,7 +225,7 @@ class EnvironmentConfigLoader(
225225 }
226226
227227 val resolvedSecrets = if (allSecretsNames.isNotEmpty()) {
228- runBlocking { secretService.listForHierarchy(hierarchy) } .associateBy(Secret ::name)
228+ secretService.listForHierarchy(hierarchy).associateBy(Secret ::name)
229229 } else {
230230 emptyMap()
231231 }
0 commit comments