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

Boefje scanning frequency support in scheduler #3406

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jpbruinsslot
Copy link
Contributor

@jpbruinsslot jpbruinsslot commented Aug 27, 2024

Pre-Review

Since this PR's is blocked by changes to the katalogus (see #3065) I'm setting this PR's in review to gather feedback on the changes that have been made, and that expectations are met. Please note the TODO in the code on the parts where those changes of the katalogus are expected and need to be implemented.

Changes

Based on the event of new or enabled boefjes a schedule is created when that boefje has a specified interval of execution (this is supplied by the boefje.json).

Before

In the BoefjeScheduler before we would only check for enabled and new boefjes. For an enabled boefje the scheduler will gather all the OOI's this boefje can run on and will create BoefjeTask objects for this (boefje * ooi = boefje tasks).

After

Now in addition to this we will check for enabled boefjes (check_new_boefjes) and create a Schedule for any boefje that has a interval specified.

Issue link

You have to create an issue to link to this PR. If this really is not possible, write a very detailed description here and add this PR to the project board directly.

Please add the link to the issue after "Closes".

Closes ...

Demo

Please add some proof in the form of screenshots or screen recordings to show (off) new functionality, if there are interesting new features for end-users.

QA notes

Please add some information for QA on how to test the newly created code.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

Just a few remarks; skeleton looks good

mula/scheduler/schedulers/boefje.py Show resolved Hide resolved
mula/scheduler/schedulers/boefje.py Outdated Show resolved Hide resolved
mula/scheduler/schedulers/boefje.py Show resolved Hide resolved
@jpbruinsslot jpbruinsslot added the mula Issues related to the scheduler label Sep 9, 2024
@jpbruinsslot
Copy link
Contributor Author

This PR is at the moment blocked because of #3065 and the implementation of the manifest for a boefje

@jpbruinsslot
Copy link
Contributor Author

This PR is put on hold and precedence is given to: #3529

This PR allows for an interval/schedule to be defined for a boefje that runs without an ooi to specifically run on. Meaning the BoefjeTask only references a Boefje not an input ooi. Meaning the task runner makes the decision on what to execute this boefje on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mula Issues related to the scheduler
Projects
Status: Blocked
Development

Successfully merging this pull request may close these issues.

1. Scanning frequencies can be scheduled (e.g. once, daily, weekly, monthly) or run ad-hoc
2 participants