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

fix(BA-584): Remove foreign key constraint from EndpointRow.image column #3599

Merged

Conversation

jopemachine
Copy link
Member

@jopemachine jopemachine commented Feb 7, 2025

Resolves #3509 (BA-584).

This PR prevents issues like #3509 by removing the foreign key constraint on EndpointRow.image.
It also modifies the EndpointRow.image column to be conditionally nullable.
EndpointRow.image can only be null when in the "Destroyed" state.
This prevents the creation of a new session with an empty image when EndpointRow.replicas is modified.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue

@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:M 30~100 LoC labels Feb 7, 2025
@jopemachine jopemachine changed the title feat: Remove foreign key constraint from EndpointRow.image column feat(BA-584): Remove foreign key constraint from EndpointRow.image column Feb 7, 2025
@jopemachine jopemachine changed the title feat(BA-584): Remove foreign key constraint from EndpointRow.image column fix(BA-584): Remove foreign key constraint from EndpointRow.image column Feb 7, 2025
@jopemachine jopemachine added the type:bug Reports about that are not working label Feb 7, 2025
@jopemachine jopemachine added this to the 23.09 milestone Feb 7, 2025
@jopemachine jopemachine force-pushed the fix_image_deletion_not_working_due_to_endpoint_fk branch from 44d8c6a to 2b3e888 Compare February 7, 2025 05:28
@jopemachine jopemachine marked this pull request as ready for review February 7, 2025 05:55
@HyeockJinKim HyeockJinKim added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit a707d15 Feb 7, 2025
23 checks passed
@HyeockJinKim HyeockJinKim deleted the fix_image_deletion_not_working_due_to_endpoint_fk branch February 7, 2025 07:15
lablup-octodog pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599)

Backported-from: main (25.1)
Backported-to: 24.03
Backport-of: 3599
lablup-octodog pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599)

Backported-from: main (25.1)
Backported-to: 24.09
Backport-of: 3599
lablup-octodog pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599)

Backported-from: main (25.1)
Backported-to: 23.09
Backport-of: 3599
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599) (#3603)

Co-authored-by: Gyubong Lee <jopemachine@naver.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599) (#3602)

Co-authored-by: Gyubong Lee <jopemachine@naver.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 7, 2025
…olumn (#3599) (#3604)

Co-authored-by: Gyubong Lee <jopemachine@naver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:M 30~100 LoC type:bug Reports about that are not working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Foreign Key Error when deleting image referenced by EndpointRow
2 participants