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

feat(runtime/lava): Add priority for manual submits #2708

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions kernelci/runtime/lava.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
hierarchy.append(item)
return hierarchy

def _get_job_node_result(self, suite_nodes, job_result):

Check warning on line 201 in kernelci/runtime/lava.py

View workflow job for this annotation

GitHub Actions / Lint

Method could be a function
""" Calculate job node result
If all child test suites pass, the job will be marked as `pass`
If one of the test suites fails, the job will be marked as `fail`
Expand Down Expand Up @@ -293,6 +293,13 @@
prio_range = self.config.priority_max - self.config.priority_min
prio_min = self.config.priority_min
priority = int((priority * prio_range / 100) + prio_min)
# Increase the priority for jobs submitted by humans
node = job.node
submitter = node.get('submitter')
if submitter and submitter != 'service:pipeline':
priority = priority + 1
if priority > self.config.priority_max:
priority = self.config.priority_max
return priority

def get_params(self, job, api_config=None):
Expand Down
Loading