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

Imapsync: cron files are not deleted #7036

Open
stephdl opened this issue Sep 25, 2024 · 3 comments
Open

Imapsync: cron files are not deleted #7036

stephdl opened this issue Sep 25, 2024 · 3 comments
Assignees
Labels
bug A defect of the software testing Packages are available from testing repositories

Comments

@stephdl
Copy link

stephdl commented Sep 25, 2024

When deleting a task, the cron files associated with imapsync are not automatically removed. Additionally, the current cron UI is not ideal, offering limited settings for scheduling synchronization times. A more flexible approach, such as implementing a slider or input box, would allow system administrators to configure synchronization times more easily.

Furthermore, we discovered that some users have modified the default synchronization settings in getmail, using values not originally available in its UI. Although these custom settings are successfully migrated to ns8-imapsync, the list-tasks feature fails to display the available tasks due to a strict JSON validator. As a result, while the tasks are still functional, the ns8-imapsync UI appears broken.

Steps to reproduce

After installing ns8-imapsync with the mail and account provider:

  • Create a task.
  • Set up a cron job.
  • Everything works as expected.
  • Delete the task.

Expected behavior

I expect the task, along with all associated files required for its creation, to be fully removed.

Actual behavior

When a task is deleted, the task files are successfully removed, but the associated cron files remain. These cron files can still be found using the command:
find /home/imapsync1 -iname *idOfTheTask.cron.

Additionally, the current UI for configuring cron settings is not user-friendly. The limited options make it difficult to customize sync times effectively. Introducing a slider or more intuitive input could significantly improve the user experience for configuring these settings.

Components
ns8-imapsync 1.0.3

See also

https://community.nethserver.org/t/in-imapsync-it-fails-to-show-me-tasks/24572/8


thank Nick Sardelianos

@stephdl stephdl added the bug A defect of the software label Sep 25, 2024
@stephdl stephdl self-assigned this Sep 25, 2024
stephdl added a commit to NethServer/ns8-imapsync that referenced this issue Sep 26, 2024
Refactor cron values in Tasks and fix the cron file deletion NethServer/dev#7036
@stephdl
Copy link
Author

stephdl commented Sep 26, 2024

QA

test1

  • install a mail and imapsync with account provider
  • configure mail and create some tasks with cron enabled
  • save somewhere the different settings you did on the cron to verify after the upgrade it will be the same
  • upgrade to ghcr.io/nethserver/imapsync:1.0.4-dev.1
    api-cli run update-module --data '{"module_url":"ghcr.io/nethserver/imapsync:1.0.4-dev.1","instances":["imapsync1"],"force":true}'
  • once upgraded, verify you can open the task and the cron settings are relevant with the settings you had before the upgrade
  • verify you can save again the same task
  • verify you can create another task with cron enabled

test 2

  • on the same module of test 1
  • note the ID of the task for example here : 7r0wtx
  • delete the task
  • verify the files with the ID does not exist anymore : find / -iname *7r0wtx*

@stephdl stephdl added the testing Packages are available from testing repositories label Sep 26, 2024
@stephdl
Copy link
Author

stephdl commented Sep 26, 2024

help for the verification asked there to the community

@stephdl
Copy link
Author

stephdl commented Oct 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect of the software testing Packages are available from testing repositories
Projects
Status: In progress
Development

No branches or pull requests

1 participant