Skip to content

Commit

Permalink
Add more detail to message when research group is not found (#234)
Browse files Browse the repository at this point in the history
add more detailed message specifically for if a research group id was not found

Co-authored-by: Daniel Perrefort <[email protected]>
  • Loading branch information
Comeani and djperrefort authored May 15, 2024
1 parent 44de83c commit 9d8a752
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/crc_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ def app_logic(self, args: Namespace) -> None:

# Gather AllocationRequests from Keystone
keystone_group_id = get_researchgroup_id(KEYSTONE_URL, args.account, auth_header)
if not keystone_group_id:
print(f"No Slurm Account found in the accounting system for '{args.account}'. \n"
f"Please submit a ticket to the CRC team to ensure your allocation was properly configured")
exit()

alloc_requests = get_active_requests(KEYSTONE_URL, keystone_group_id, auth_header)
if not (keystone_group_id and alloc_requests):
print(f"No active allocation data found in the accounting system for '{args.account}'")
Expand Down

0 comments on commit 9d8a752

Please sign in to comment.