From 8c05e10e81fe36a1e76b8e7148c9642d1d20af07 Mon Sep 17 00:00:00 2001 From: CQ-OPS Date: Mon, 21 Sep 2020 00:07:46 +1000 Subject: [PATCH] feat(emr-runner): update resources stack before start cluster --- src/config.js | 5 ++++- src/emr_runner.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config.js b/src/config.js index 704a7f1..9afd8b1 100644 --- a/src/config.js +++ b/src/config.js @@ -40,7 +40,10 @@ class Config { // merge override configs lodash.forEach(this.overrideSettings, (value, key) => { lodash.set(configDoc, key, value) - console.log(`override settings: ${key}=${value}`) + + if(this.resources != null) { + console.log(`Override settings: ${key}=${value}`) + } }) this.config = configDoc diff --git a/src/emr_runner.js b/src/emr_runner.js index a223aca..55d3955 100644 --- a/src/emr_runner.js +++ b/src/emr_runner.js @@ -101,7 +101,7 @@ class EmrRunner { loadAwsSettings() { return Bluebird.props({ - resources: this.loadResources(), + resources: this.deployResources().then(() => this.loadResources()), accountId: this.stsClient.getAccount(), }) .then(({accountId, resources}) => this.config.reloadWithResources(accountId, resources))