You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When disabling a repo, the id in the repos table is set to 0. However, existing CRON tasks defined in the repo are not altered in the crons table.
The server is trying to execute them normally and fails in the logs with
Whether or not the CRONs should be deleted is debatable (likely not so they continue to work in case the repo gets enabled again). Yet then they should gain a new column which indicates whether they are active or not.
The following DB query can temporarily clean up (= delete) CRON jobs of deactivated repos:
DELETEFROM crons
WHERE repo_id IN (
SELECT id
FROM repos
WHERE user_id ='0'
);
This could also be part of a daily "garbage collection" job.
Steps to reproduce
Define CRON
Disable a repo
Inspect server logs during execution
Expected behavior
CRONs are disabled/not run when a repo is disabled.
Component
server
Describe the bug
When disabling a repo, the
id
in the repos table is set to0
. However, existing CRON tasks defined in the repo are not altered in thecrons
table.The server is trying to execute them normally and fails in the logs with
Whether or not the CRONs should be deleted is debatable (likely not so they continue to work in case the repo gets enabled again). Yet then they should gain a new column which indicates whether they are active or not.
The following DB query can temporarily clean up (= delete) CRON jobs of deactivated repos:
This could also be part of a daily "garbage collection" job.
Steps to reproduce
Expected behavior
CRONs are disabled/not run when a repo is disabled.
System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: