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

refactor: Merge kernels.role into sessions.session_type #1587

Merged
merged 35 commits into from
Sep 20, 2024

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Sep 19, 2023

This PR resolves #1446 and supersedes #1455.

According to the predefined concept, the kernels.role field should be replaced by the sessions.session_type field. Also check if the image's ai.backend.role label is compatible with the session type when the label is defined.

ref) https://docs.backend.ai/en/latest/concepts/computing.html#session-types

This PR also fixes wrong cases to decrement the per-access-key session concurrency when force-terminating non-running sessions, by skipping decrements for TERMINATED and CANCELLED sessions.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version

📚 Documentation preview 📚: https://sorna--1587.org.readthedocs.build/en/1587/


📚 Documentation preview 📚: https://sorna-ko--1587.org.readthedocs.build/ko/1587/

@fregataa fregataa added this to the 23.09 milestone Sep 19, 2023
@fregataa fregataa self-assigned this Sep 19, 2023
@fregataa fregataa marked this pull request as draft September 19, 2023 16:49
@github-actions github-actions bot added comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:L 100~500 LoC labels Sep 19, 2023
@fregataa fregataa force-pushed the fix/replace-kernelrole-to-sessiontype branch from 7f7864f to 7b2839b Compare September 22, 2023 03:31
@fregataa fregataa marked this pull request as ready for review September 25, 2023 06:30
@github-actions github-actions bot added impact:invisible This change is invisible to users (internal changes). type:refactor Refactor codes or add tests. urgency:4 As soon as feasible, implementation is essential. labels Sep 25, 2023
Copy link
Member

@achimnol achimnol left a comment

Choose a reason for hiding this comment

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

Let's migrate the postgres enum to use the new manager.models.base.StrEnumType to avoid boilerplates when adding/removing enum items in the postgres schema. Refer #1936.

@fregataa fregataa modified the milestones: 23.09, 24.09 May 3, 2024
@fregataa fregataa modified the milestones: 23.03, 23.09 Aug 21, 2024
@fregataa fregataa marked this pull request as ready for review August 21, 2024 08:10
@fregataa fregataa requested a review from achimnol August 21, 2024 08:10
@fregataa fregataa modified the milestones: 23.09, 24.03 Sep 17, 2024
@achimnol
Copy link
Member

achimnol commented Sep 20, 2024

We need to do a follow-up fix for #2746 (comment) after merging this PR and the stack including #2848.

@achimnol achimnol added this pull request to the merge queue Sep 20, 2024
Merged via the queue into main with commit 4c2340a Sep 20, 2024
23 checks passed
@achimnol achimnol deleted the fix/replace-kernelrole-to-sessiontype branch September 20, 2024 17:03
lablup-octodog pushed a commit that referenced this pull request Sep 20, 2024
Co-authored-by: Joongi Kim <joongi@lablup.com>
Backported-from: main (24.09)
Backported-to: 24.03
Backport-of: 1587
github-merge-queue bot pushed a commit that referenced this pull request Sep 21, 2024
…2854)

Co-authored-by: Sanghun Lee <sanghun@lablup.com>
Co-authored-by: Joongi Kim <joongi@lablup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action:on hold Hold it. Wait for the restart. area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component impact:invisible This change is invisible to users (internal changes). require:db-migration Automatically set when alembic migrations are added or updated size:L 100~500 LoC type:refactor Refactor codes or add tests. urgency:4 As soon as feasible, implementation is essential.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename KernelRole to something else with clarification that it's for sessions
2 participants