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

Bug: Control samples show up as 'Express' in Trailblazer #3889

Open
Karl-Svard opened this issue Oct 24, 2024 · 1 comment
Open

Bug: Control samples show up as 'Express' in Trailblazer #3889

Karl-Svard opened this issue Oct 24, 2024 · 1 comment

Comments

@Karl-Svard
Copy link
Contributor

Describe the bug
Control cases show up as 'Express' priority in Trailblazer, no matter the level set in StatusDB. This is after a recent update that increased the priorities of the jobs on Hasta. See #3816

Screenshot 2024-10-24 at 14 44 33

To Reproduce
Steps to reproduce the behavior:

  1. Run any internal control case in prod or stage

Expected behavior
The priority of the TB analysis should be the same as the case in StatusDB. Another alternative is to add a brand new value like 'Control', but that might be better kept as a separate feature request.

Additional context

@Vince-janv
Copy link
Contributor

Vince-janv commented Nov 14, 2024

Technical refinement

  • Change the parameter slurm_quality_of_service in cg.apps.tb.api.TrailblazerAPI.add_pending_analysis to priority
  • Create method called get_trailblazer_priority(case_id) which returns the priority to send to TB
    def get_trailblazer_priority(self, case_id: str) -> str:
        """Get Quality of service (SLURM QOS) for the case."""
        case: Case = self.status_db.get_case_by_internal_id(internal_id=case_id)
        priority: int = case.priority or Priority.research
        return map_to_trailblazer_priority(priority)
  • Create a class TrailblazerPriority which is the same as the QOS one except it does not have maintenance
  • Create a utils class that translate the int to the correct member of TrailblazerPriority
  • Use get_trailblazer_priority in cg.apps.tb.api.TrailblazerAPI.add_pending_analysis to get the correct priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants