Skip to content

Commit

Permalink
fix: initial attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
olensmar committed Dec 5, 2023
1 parent cb79303 commit 8c216e9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/redux/thunks/updateFileEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {HELM_CHART_ENTRY_FILE} from '@constants/constants';
import {UpdateFileEntryPayload} from '@redux/reducers/main';
import {getLocalResourceMetasForPath} from '@redux/services/fileEntry';
import {reprocessHelm} from '@redux/services/helm';
import {isKustomizationFile} from '@redux/services/kustomize';
import {deleteResource, extractK8sResources, splitK8sResource} from '@redux/services/resource';

import {getFileStats, getFileTimestamp} from '@utils/files';
Expand Down Expand Up @@ -101,6 +102,18 @@ export const updateFileEntry = createAsyncThunk<
},
});
});

// did we just replace a kustomization being dry-run? -> update the kustomizationId to the new one
// and restart the dry-run
if (
isKustomizationFile(fileEntry, mainState.resourceMetaMapByStorage.local) &&
mainState.preview?.type === 'kustomize' &&
mainState.preview.kustomizationId === fileSideEffect.affectedResourceIds[0]
) {
// mainState.preview.kustomizationId = fileSideEffect.affectedResourceIds[1];
// thunkAPI.dispatch(stopPreview());
}

mainState.highlights = newHighlights;
}
}
Expand Down

0 comments on commit 8c216e9

Please sign in to comment.