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(app): surface message and status when pod is unschedulable #1088

Merged
merged 5 commits into from
Jun 10, 2022

Conversation

olevski
Copy link
Member

@olevski olevski commented May 31, 2022

Depends on SwissDataScienceCenter/amalthea#165

closes #1017

For now I have decided to use the "failed" status for unschedulable sessions. We can add a dedicated or different status in the future if this is confusing to users. IMO however it is nicer to keep the number of potential session statuses small and simple.

@olevski olevski requested a review from a team as a code owner May 31, 2022 15:17
@olevski olevski force-pushed the feat-surface-unschedulable-message branch from 7b0608f to 2965ec7 Compare May 31, 2022 15:18
Copy link
Member

@Panaetius Panaetius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one comment you can disregard if the method is needed

Comment on lines +240 to +249
@classmethod
def from_value(cls, val: str):
if not val:
return None
if not val.lower() in cls.list():
raise ValueError(
f"Value {val.lower()} cannot be found in list {cls.list()}"
)
return getattr(cls, val.capitalize())

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? You can already do e.g. ServerStatusEnum("running") (for value) or ServerStatusEnum["Running"] (for key)

And I don't see it used in the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will merge this but open another PR to remove this. I guess I thought I needed it and then figured out I can do what you suggest. This is not used at all.

@olevski olevski merged commit a6cf716 into master Jun 10, 2022
@olevski olevski deleted the feat-surface-unschedulable-message branch June 10, 2022 13:30
@olevski olevski restored the feat-surface-unschedulable-message branch November 30, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inform users when session cannot be scheduled because of insufficient resources
2 participants