-
Notifications
You must be signed in to change notification settings - Fork 49
Enable dispatcherd under feature flag 1st iteration - AAP-46009 #1308
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
base: main
Are you sure you want to change the base?
Conversation
3ddc037
to
83c78ab
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #1308 +/- ##
==========================================
- Coverage 94.56% 94.38% -0.18%
==========================================
Files 318 318
Lines 18606 18742 +136
==========================================
+ Hits 17594 17690 +96
- Misses 1012 1052 +40
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Address #1308 (comment) Signed-off-by: Alex <[email protected]>
dd15056
to
de748bf
Compare
Address #1308 (comment) Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> --------- Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> --------- Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> --------- Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> --------- Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Alex <[email protected]>
Update job uniqueness tests to mock proxy functions. Also moves import/sync project tasks from the job decorator to the direct calling, this for consistency and convenience at testing. (projects jobs continue working as expected, manually verified) Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> Signed-off-by: Alex <[email protected]>
As per discussion with @AlanCoding, rename hazmat module and remove "metrics" extra, which is not currently used and eventually won't be needed. Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Follow up #1312, add missing ref in conf Signed-off-by: Alex <[email protected]>
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> <!-- If applicable, provide a link to the issue that is being addressed --> <!-- What is being changed? --> <!-- Why is this change needed? --> <!-- How does this change address the issue? --> <!-- Does this change introduce any new dependencies, blockers or breaking changes? --> <!-- How it can be tested? --> Signed-off-by: Alex <[email protected]>
Address #1308 (comment) Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
Signed-off-by: Alex <[email protected]>
528f6d7
to
be870c4
Compare
|
@@ -35,12 +41,29 @@ def add_arguments(self, parser: CommandParser) -> None: | |||
|
|||
def handle(self, *args, **options) -> None: | |||
if features.DISPATCHERD: | |||
self.stderr.write( | |||
if "worker_class" not in options: |
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.
@Alex-Izquierdo Can this code block be moved into something like handle_dispatcherd
# DISPATCHERD SETTINGS | ||
# --------------------------------------------------------- | ||
|
||
DISPATCHERD_DEFAULT_CHANNEL = "default" |
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.
@Alex-Izquierdo Will this channel name have conflicts with other services like controller should we have a eda prefix for this?
@tasking.redis_connect_retry() | ||
def sync_project_rq(project_id: int): | ||
queue = django_rq.get_queue(name=PROJECT_TASKS_QUEUE) | ||
return queue.enqueue(_sync_project, project_id=project_id) |
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.
@Alex-Izquierdo can this return id to be consistent with sync_project_dispatcherd
return queue.enqueue(_sync_project, project_id=project_id).id
Initial minimal implementation of dispatcherd under the feature flag. Current rq deployment tested
Still missing tests for dispatcherd and proxies that we are going to address in later iterations as part of https://issues.redhat.com/browse/AAP-46008
Dispatcherd is widely tested as well but not guaranteed a this point.
WE NEED TO CONFIRM THE AVAILABILITY OF THE RPM PRIOR TO MERGE THIS, (tracked internally in https://issues.redhat.com/browse/AAP-45706)
Jira: https://issues.redhat.com/browse/AAP-46009