Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
110 stars 72 forks source link

Remove all sagas #12453

Open framitdavid opened 4 months ago

framitdavid commented 4 months ago

We should review the remaining sagas in app-development and get rid of them... Here is an overview of the current sagas available:

function* root(): SagaIterator {
  yield fork(watchHandleFetchServiceSaga);
  yield fork(watchHandleFetchServiceNameSaga);
  yield fork(watchHandleSaveServiceNameSaga);
  yield fork(watchHandleFetchInitialCommitSaga);
  yield fork(watchHandleFetchServiceConfigSaga);
  yield fork(watchHandleSaveServiceConfigSaga);
  yield fork(applicationMetadataSagas);
  yield fork(appDeploymentSagas);
  yield fork(userSagas);
}

export const sagaMiddleware = createSagaMiddleware();

export const run = () => sagaMiddleware.run(root);
framitdavid commented 4 months ago

Today, we also have code that creates an application metadata file if it doesn't exist (getApplicationMetadataSaga). We should completely remove this type of code. We cannot guarantee the accuracy of the recreated file; it is retrieved from the app-template. For instance, if you have a v3 app and delete the application metadata, a new application metadata will be created, based on a v4 app.