Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Don't reload skill if a mod time is in the future #2659

Merged

Conversation

forslund
Copy link
Collaborator

Description

This stops a skill from being reloaded repeatedly if a file gets a bad
modification time. Should resolves #2656

It also logs the offending files in the error message.

How to test

Modify the modtime of a file in a skill to a future time

for example
touch -d "now + 30 minutes" __init__.py

Make sure that the skill isn't reloaded and that the Error message is shown exactly once specifying the correct file.

then set the change time to a valid time

touch __init__.py

and make sure the file is reloaded.

Contributor license agreement signed?

CLA [ Yes ]

@devops-mycroft devops-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Aug 12, 2020
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@forslund forslund force-pushed the feature/detect-bad-modification-times branch from 20b7b0b to 305fc88 Compare August 13, 2020 06:48
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@forslund forslund force-pushed the feature/detect-bad-modification-times branch from 305fc88 to bb144d4 Compare August 14, 2020 06:23
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund forslund force-pushed the feature/detect-bad-modification-times branch from bb144d4 to 35b2291 Compare August 18, 2020 07:52
This stops a skill from being reloaded repeatedly if a file gets a bad
modification time.

It also logs the offending files in the error message.
@forslund forslund force-pushed the feature/detect-bad-modification-times branch from 35b2291 to 10092c3 Compare August 18, 2020 07:53
@forslund
Copy link
Collaborator Author

Rebased and conflicts from #2662 has been resloved.

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

Copy link
Contributor

@krisgesling krisgesling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working beautifully!

@krisgesling krisgesling merged commit 571e6d3 into MycroftAI:dev Sep 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

skill keep reloading indefinitely if there are files with a future date
3 participants