Open
Conversation
DanNiESh
requested changes
Apr 3, 2026
Collaborator
DanNiESh
left a comment
There was a problem hiding this comment.
Looks good! Just some minor issues
| return set(group.get("users") or []) | ||
| except Exception as e: | ||
| LOG.error("Failed to get users for group %s: %s", group_name, e) | ||
| sys.exit(1) |
Collaborator
There was a problem hiding this comment.
If one group lookup fails, it will exit without processing other classes. Can you just log the error and skip it?
| "annotations": {"kubeflow-resource-stopped": now_utc} | ||
| } | ||
| } | ||
| oc.invoke("patch", ["notebook", nb_name, "-n", namespace, "--type=merge", "-p", json.dumps(patch_obj)]) |
Collaborator
There was a problem hiding this comment.
Can you add error handling around this instead of return true?
| COPY requirements.txt ./requirements.txt | ||
| RUN pip3 install -r requirements.txt | ||
|
|
||
| # Install the group-sync application |
Collaborator
There was a problem hiding this comment.
minor issue: it should be install the scaled-nb-culler
| @@ -0,0 +1 @@ | |||
| openshift-client | |||
Collaborator
There was a problem hiding this comment.
can you add the specific openshift-client version?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As classes running in the academic cluster scale, we need a faster and more dynamic way to shut down notebooks for the classes, as previously everything was hard coded. This allows the admin to provide a json dict of the class, type of class, and the cutoff time. It then creates a user map, and chooses the longer time if a student is in multiple classes, and shuts down/deletes when necessary