Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Data folder must be refreshed during update #1255

Closed
CiliaFred opened this issue Feb 28, 2024 · 6 comments
Closed

[BUG] Data folder must be refreshed during update #1255

CiliaFred opened this issue Feb 28, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@CiliaFred
Copy link

Checklist

Describe the bug
In case of update in an apps data folder, the update file are not copied to app-data folder.
This is due to the following code in file worker/src/services/app/app.executors.ts:

this.logger.info(`Copying data dir for app ${appId}`);
 if (!(await pathExists(`${appDataDirPath}/data`))) {
    await copyDataDir(appId);
}

If the content of data change, the data directory is not updated.

To Reproduce
Steps to reproduce the behavior:

  1. Install an application in version 1
  2. Add a data folder in a new version of the application
  3. Update the application in version 2
  4. The data folder content in application is not copied to app-data folder
@CiliaFred CiliaFred added the bug Something isn't working label Feb 28, 2024
@meienberger
Copy link
Collaborator

Thanks for opening the issue, I agree with you however how do we prevent this from overwriting customer user changes? Let's say you customize a config file in your app-data directory and update the app. Enabling this will destroy your changes

@CiliaFred
Copy link
Author

I know, that's why i don't fix it directly.

It probably needs some refactoring.

Copy link

github-actions bot commented Apr 2, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Apr 2, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@meienberger meienberger reopened this Apr 17, 2024
@github-actions github-actions bot removed the stale label Apr 18, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@steveiliop56
Copy link
Collaborator

Hello,

The data folder is being used to copy initial configuration files. For example a default file needed for the app to start. We cannot copy the data folder again since it would overwrite the user data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants