Skip to content

Commit

Permalink
Pass configuration account (#112)
Browse files Browse the repository at this point in the history
* fix: pass configuration account into setup canary stage context

* fix: properly retrieve accounts from context
  • Loading branch information
danielpeach committed Oct 26, 2017
1 parent a8e3dc8 commit befbac7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public long getDynamicBackoffPeriod(Duration taskDuration) {

@Override
public TaskResult execute(Stage stage) {
StageContext context = new StageContext(stage);
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Map<String, Object> canaryConfigMap = (Map<String, Object>)context.get("canaryConfig");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public long getTimeout() {

@Override
public TaskResult execute(Stage stage) {
StageContext context = new StageContext(stage);
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Map<String, Object> canaryConfigMap = (Map<String, Object>)context.get("canaryConfig");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public long getTimeout() {

@Override
public TaskResult execute(Stage stage) {
StageContext context = new StageContext(stage);
Map<String, Object> context = stage.getContext();
String metricsAccountName = (String)context.get("metricsAccountName");
String storageAccountName = (String)context.get("storageAccountName");
Map<String, Object> canaryConfigMap = (Map<String, Object>)context.get("canaryConfig");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public String initiateCanary(@RequestParam(required = false) final String metric
.put("refId", "1")
.put("user", "[anonymous]")
.put("canaryConfigId", canaryConfigId)
.put("configurationAccountName", resolvedConfigurationAccountName)
.build());

Map<String, Object> fetchControlContext =
Expand Down

0 comments on commit befbac7

Please sign in to comment.