-
Notifications
You must be signed in to change notification settings - Fork 58
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
Scheduler extra models #3749
base: main
Are you sure you want to change the base?
Scheduler extra models #3749
Conversation
* main: Fix reports with organization tags (#3790) Update README.rst - Fix guidelines URLs (#3789) Exclude Report from ooi list (#3768) Update `croniter` (#3767) Fixes for dropdowns (#3732) Fix scheduled Aggregate Report naming (#3748) Make systemctl call for kat-rocky-worker conditional (#3782) Fix vulnerability chapters in Aggregate table of content (#3780) Fix auth token middleware with wrong format header (#3755) Add rocky REST API for report recipes (#3746) Add exception handling to the rest api (#3708) Refactor Multi Report to comply to the new report flow (#3705) Fix report names for scheduled reports (#3726) Fix Multi Report recursion error (#3714) Bump waitress from 3.0.0 to 3.0.1 in /octopoes (#3760) Docs/add muted findings (#3699) Edit report recipe (#3690) Add start date to report schedule (#3701) Add REST API to list report and download pdf report (#3689) Fixes in Report Overview (#3707)
mula/scheduler/server/models/task.py
Outdated
model_config = ConfigDict(from_attributes=True, use_enum_values=True) | ||
|
||
# FIXME: pushing the same item with the id will update the item on the | ||
# queue. Perhaps TaskCreate is not the right name for this and should | ||
# be TaskPush instead, or in both cases TaskUpdate | ||
id: uuid.UUID | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have the id present in the model, this is done to support the functionality of pushing the same task on the queue will update it. Meaning, pushing the same item with the id will update the item on the queue. Perhaps TaskCreate is not the right name for this and should be TaskPush instead, or in both cases TaskUpdate.
We can also opt for moving away from this functionality. Since it is a feature for queues in order to update the same item by pushing it on again this doesn't seem to be a feature that is used. Since it's inception we've moved away from an in-memory queue, and updating the task can be done from other avenues.
Quality Gate failedFailed conditions |
@@ -9,13 +9,13 @@ | |||
"handlers": { | |||
"console": { | |||
"class": "logging.StreamHandler", | |||
"level": "INFO", | |||
"level": "DEBUG", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
@@ -32,3 +32,9 @@ def test_toggle_expire(self): | |||
|
|||
with self.assertRaises(utils.ExpiredError): | |||
ed.get("a") | |||
|
|||
def test_key_error(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this pr, need to remove
Changes
Changes made the the rest API server, fall more in line with fastapi conventions
Issue link
Closes #3711 (comment)
QA notes
Please add some information for QA on how to test the newly created code.
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.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.