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

Restructure scheduler storage module #3294

Merged
merged 12 commits into from
Aug 5, 2024
Merged

Conversation

jpbruinsslot
Copy link
Contributor

@jpbruinsslot jpbruinsslot commented Jul 24, 2024

Changes

Minor changes to the storage module.

  • method name get_task change to fall in line with the other datastores and method naming
  • update DBConn.__init__ to use an attribute logging module instead of a 'global' one.

QA notes

Changes done to the datastores, the main QA points of attention would be that the scheduler would perform its normal procedures.


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.

@jpbruinsslot jpbruinsslot added the mula Issues related to the scheduler label Jul 24, 2024
@jpbruinsslot jpbruinsslot self-assigned this Jul 24, 2024
@jpbruinsslot jpbruinsslot marked this pull request as ready for review July 29, 2024 08:43
@jpbruinsslot jpbruinsslot requested a review from a team as a code owner July 29, 2024 08:43
@jpbruinsslot jpbruinsslot marked this pull request as draft July 29, 2024 08:45
@jpbruinsslot
Copy link
Contributor Author

jpbruinsslot commented Jul 29, 2024

Fixing mypy errors atm

Fixed

@jpbruinsslot jpbruinsslot marked this pull request as ready for review July 29, 2024 10:45
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.

Looks good to me 👍 I just have a few suggestions and notes to improve it even more

mula/scheduler/context/context.py Outdated Show resolved Hide resolved
mula/scheduler/context/context.py Outdated Show resolved Hide resolved
mula/scheduler/context/context.py Outdated Show resolved Hide resolved
mula/scheduler/storage/pq_store.py Show resolved Hide resolved
mula/scheduler/storage/storage.py Show resolved Hide resolved
mula/scheduler/storage/storage.py Outdated Show resolved Hide resolved
mula/scheduler/storage/storage.py Outdated Show resolved Hide resolved
@stephanie0x00
Copy link
Contributor

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.
  • I checked the logs for errors and/or warnings and made issues where necessary

What works:

Looks good. Added 2 organisations and performed scanning activities with both. The tasks seem to run and complete and corresponding findings are created.

Ready for merge.

What doesn't work:

n/a

Bug or feature?:

n/a

@underdarknl underdarknl merged commit 8d5f221 into main Aug 5, 2024
9 checks passed
@underdarknl underdarknl deleted the feature/mula/storage-updates branch August 5, 2024 11:21
jpbruinsslot added a commit that referenced this pull request Aug 5, 2024
Co-authored-by: ammar92 <[email protected]>
Co-authored-by: Jan Klopper <[email protected]>
jpbruinsslot added a commit that referenced this pull request Aug 5, 2024
* main:
  fix: Button height (#3316)
  Add user id to OOI (#3305)
  Translations update from Hosted Weblate (#3179)
  Restructure scheduler storage module (#3294)
jpbruinsslot added a commit that referenced this pull request Aug 5, 2024
* main:
  fix: Button height (#3316)
  Add user id to OOI (#3305)
  Translations update from Hosted Weblate (#3179)
  Restructure scheduler storage module (#3294)
  Fix CSRF error in API with token auth (#3313)
jpbruinsslot added a commit that referenced this pull request Aug 6, 2024
* main:
  Fix new boefjes issue for scheduler (#3297)
  Add audit logging to CRUD actions using Django signals (#3314)
  fix: Button height (#3316)
  Add user id to OOI (#3305)
  Translations update from Hosted Weblate (#3179)
  Restructure scheduler storage module (#3294)
  Fix CSRF error in API with token auth (#3313)
jpbruinsslot added a commit that referenced this pull request Aug 6, 2024
* feature/mula/refactor-queue:
  Fix new boefjes issue for scheduler (#3297)
  Add audit logging to CRUD actions using Django signals (#3314)
  fix: Button height (#3316)
  Add user id to OOI (#3305)
  Translations update from Hosted Weblate (#3179)
  Restructure scheduler storage module (#3294)
  Fix CSRF error in API with token auth (#3313)
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
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants