Skip to content

Commit

Permalink
remove overwriteConfig
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
sumengwang committed Jul 19, 2023
1 parent 89250f7 commit 0682de3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ConfigModelessActionButtons = ({ ...props }: IConfigModelessActionB
setSaveLoading(true);
let observable;
if (lifecycleManagementEditEnabled) {
observable = updatePreferences(lifecycleManagementEditEnabled);
observable = updatePreferences();
} else {
observable = Observable.forkJoin(updatePipeline(), updatePreferences());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,14 @@ const getMacrosResolvedByPrefs = (resolvedPrefs = {}, macrosMap = {}) => {
return resolvedMacros;
};

const updatePreferences = (lifecycleManagementEditEnabled = false) => {
const updatePreferences = () => {
const { runtimeArgs } = PipelineConfigurationsStore.getState();
let filteredRuntimeArgs = cloneDeep(runtimeArgs);
filteredRuntimeArgs.pairs = filteredRuntimeArgs.pairs.filter(
(runtimeArg) => !runtimeArg.provided
);
let appId = PipelineDetailStore.getState().name;
let prefObj = convertKeyValuePairsObjToMap(runtimeArgs);
if (lifecycleManagementEditEnabled) {
prefObj = { ...prefObj, 'app.pipeline.overwriteConfig': 'true' };
}

return MyPreferenceApi.setAppPreferences(
{
Expand Down
1 change: 0 additions & 1 deletion app/cdap/services/global-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ const GENERATED_RUNTIMEARGS = {
SYSTEM_DRIVER_RESOURCES_CORES: 'task.driver.system.resources.cores',
SYSTEM_EXECUTOR_RESOURCES_MEMORY: 'task.executor.system.resources.memory',
SYSTEM_EXECUTOR_RESOURCES_CORES: 'task.executor.system.resources.cores',
PIPELINE_CONFIG_OVERWRITE: 'app.pipeline.overwriteConfig',
}

const SCOPES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ public void checkRuntimeArgsEmpty() {
.map(element -> element.findElement(By.tagName("input")).getAttribute("value"))
.collect(Collectors.toList());
Assert.assertTrue(stringKeys.size() == 1);
Assert.assertTrue(!stringKeys.contains("app.pipeline.overwriteConfig"));
Assert.assertTrue(!stringKeys.contains("app.pipeline.instrumentation"));
ElementHelper.clickOnElement(Helper.locateElementByTestId("pipeline-modeless-close-btn"));
}
Expand All @@ -220,7 +219,6 @@ public void checkRuntimeArgsNotEmpty() {
.map(element -> element.findElement(By.tagName("input")).getAttribute("value"))
.collect(Collectors.toList());
Assert.assertTrue(stringKeys.size() > 1);
Assert.assertTrue(stringKeys.contains("app.pipeline.overwriteConfig"));
Assert.assertTrue(stringKeys.contains("app.pipeline.instrumentation"));
ElementHelper.clickOnElement(Helper.locateElementByTestId("pipeline-modeless-close-btn"));
}
Expand Down

0 comments on commit 0682de3

Please sign in to comment.