-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stageExecution): reduce execution context size (#4781)
- there are a lot of fields that are duplicated in the stage context and stage outputs. This commit removes some of the duplication. - use a config class(TaskConfigurationProperties) instead of dynamic config service.This helps in loading configs of type list more easily, without having to resort to reading them as strings and then splitting them on a delimiter
- Loading branch information
1 parent
7068d30
commit b06b8c8
Showing
19 changed files
with
3,938 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
.../main/java/com/netflix/spinnaker/orca/clouddriver/config/TaskConfigurationProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright 2021 Salesforce.com, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.orca.clouddriver.config; | ||
|
||
import com.netflix.spinnaker.orca.clouddriver.tasks.job.WaitOnJobCompletion; | ||
import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.PromoteManifestKatoOutputsTask; | ||
import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.ResolveDeploySourceManifestTask; | ||
import java.util.Set; | ||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Data | ||
@ConfigurationProperties("tasks.clouddriver") | ||
/** configuration properties for various Orca tasks that are in the orca-clouddriver module */ | ||
public class TaskConfigurationProperties { | ||
|
||
/** properties that pertain to {@link WaitOnJobCompletion} task. */ | ||
private WaitOnJobCompletionTaskConfig waitOnJobCompletionTask = | ||
new WaitOnJobCompletionTaskConfig(); | ||
|
||
/** properties that pertain to {@link PromoteManifestKatoOutputsTask} task */ | ||
private PromoteManifestKatoOutputsTaskConfig promoteManifestKatoOutputsTask = | ||
new PromoteManifestKatoOutputsTaskConfig(); | ||
|
||
/** properties that pertain to {@link ResolveDeploySourceManifestTask} task */ | ||
private ResolveDeploySourceManifestTaskConfig resolveDeploySourceManifestTask = | ||
new ResolveDeploySourceManifestTaskConfig(); | ||
|
||
@Data | ||
public static class WaitOnJobCompletionTaskConfig { | ||
/** | ||
* set of keys that will be excluded from the "outputs" key in the stage execution context. | ||
* Default or empty set means that no keys will be excluded. | ||
*/ | ||
private Set<String> excludeKeysFromOutputs = Set.of(); | ||
} | ||
|
||
@Data | ||
public static class PromoteManifestKatoOutputsTaskConfig { | ||
/** | ||
* set of keys that will be excluded from the "outputs" key in the stage execution context. | ||
* Default or empty set means that no keys will be excluded. | ||
*/ | ||
private Set<String> excludeKeysFromOutputs = Set.of(); | ||
} | ||
|
||
@Data | ||
public static class ResolveDeploySourceManifestTaskConfig { | ||
/** | ||
* set of keys that will be excluded from the "outputs" key in the stage execution context. | ||
* Default or empty set means that no keys will be excluded. | ||
*/ | ||
private Set<String> excludeKeysFromOutputs = Set.of(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.