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 server module #3295

Merged
merged 10 commits into from
Aug 6, 2024
Merged

Conversation

jpbruinsslot
Copy link
Contributor

@jpbruinsslot jpbruinsslot commented Jul 24, 2024

Changes

This pr restructures the rest API endpoints of the scheduler server. Prior to this pr all the routes, and endpoint handlers were present in one large file. With this pr it has been broken up in their respective folders and files. Note that the restructuring of serializers/models are not yet changed to resemble conventions used in the fastapi this will be picked up in #3162

QA notes

Since mainly the rest API endpoint are updated, 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:33
@jpbruinsslot jpbruinsslot requested a review from a team as a code owner July 29, 2024 08:33
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. Only the return types seem to be incorrect for the __init__ method and endpoint methods.

Other suggestions and ideas have been discussed offline and will be picked up later

@jpbruinsslot
Copy link
Contributor Author

Looks good. Only the return types seem to be incorrect for the __init__ method and endpoint methods.

Other suggestions and ideas have been discussed offline and will be picked up later

I'll pick those up in #3162 as well, since I can remember something about that it was required to have the Any return type.

@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:

Added objects, tasks run and findings are created.

What doesn't work:

When clicking on one of the links in the Tasks list, the Katalogus page throws an error. This error doesn't occur on main.

Steps to reproduce:

  • On the tasks page clicking on either the boefje links such as "Dnssec" or the Input object "Hostname|internet|ns1.openprovider.nl" the error page on the Katalogus is shown.

image

The error thrown is shown below:
image

Bug or feature?:

n/a

@stephanie0x00 stephanie0x00 added the 😸 Review/QA feedback Review/QA feedback provided label Aug 5, 2024
jpbruinsslot and others added 4 commits August 5, 2024 14:58
Co-authored-by: ammar92 <[email protected]>
Co-authored-by: Jan Klopper <[email protected]>
Co-authored-by: LibreTranslate <[email protected]>
Co-authored-by: alster <[email protected]>
Co-authored-by: Weblate Translation Memory <[email protected]>
Co-authored-by: Wim Benes <[email protected]>
Co-authored-by: Jan Klopper <[email protected]>
Co-authored-by: Jan Klopper <[email protected]>
Co-authored-by: Jeroen Dekkers <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Aug 5, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
4 out of 5 committers have signed the CLA.

✅ jpbruinsslot
✅ stephanie0x00
✅ dekkers
✅ originalsouth
❌ weblate
You have signed the CLA already but the status is still pending? Let us recheck it.

* main:
  fix: Button height (#3316)
  Add user id to OOI (#3305)
  Translations update from Hosted Weblate (#3179)
  Restructure scheduler storage module (#3294)
@stephanie0x00
Copy link
Contributor

The bugs when clicking on the objects from the tasks list are fixed. You can now click on the links and they will go to the corresponding page without showing an error message.

@stephanie0x00 stephanie0x00 removed the 😸 Review/QA feedback Review/QA feedback provided label Aug 5, 2024
@dekkers dekkers merged commit a16cfc7 into main Aug 6, 2024
8 of 9 checks passed
@dekkers dekkers deleted the feature/mula/server-updates branch August 6, 2024 10:38
jpbruinsslot added a commit that referenced this pull request Aug 6, 2024
* main:
  Restructure scheduler server module (#3295)
jpbruinsslot added a commit that referenced this pull request Aug 6, 2024
* feature/mula/refactor-queue:
  Restructure scheduler server module (#3295)
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.

7 participants