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-461): Filter vfolder deletion info by vfolder status #3446

Merged
merged 10 commits into from
Jan 17, 2025

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Jan 14, 2025

BA-461
resolves #3394

Filter vfolders by status before calling initiate_vfolder_deletion(), rather than checking the status within the function. This approach ensures consistent vfolder status throughout the transaction.

Checklist: (if applicable)

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

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


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

@fregataa fregataa added this to the 24.03 milestone Jan 14, 2025
@fregataa fregataa requested a review from HyeockJinKim January 14, 2025 06:25
@fregataa fregataa self-assigned this Jan 14, 2025
@github-actions github-actions bot added comp:manager Related to Manager component size:M 30~100 LoC labels Jan 14, 2025
@github-actions github-actions bot added area:docs Documentations size:L 100~500 LoC and removed size:M 30~100 LoC labels Jan 15, 2025
@github-actions github-actions bot added size:M 30~100 LoC and removed size:L 100~500 LoC labels Jan 15, 2025
@github-actions github-actions bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels Jan 15, 2025
@fregataa fregataa added action:on hold Hold it. Wait for the restart. and removed action:on hold Hold it. Wait for the restart. labels Jan 15, 2025
@github-actions github-actions bot added size:M 30~100 LoC and removed size:L 100~500 LoC labels Jan 17, 2025
Comment on lines -806 to -810
async with engine.begin_session() as db_conn:
result = await db_conn.execute(query)
target_vfs = result.fetchall()
delete_query = sa.delete(vfolders).where(vfolders.c.group == group_id)
result = await db_conn.execute(delete_query)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can I know the existing code history?

vfolder_permissions.delete().where(vfolder_permissions.c.user == user_uuid),
)
result = await conn.execute(
sa.select([vfolders.c.id, vfolders.c.host, vfolders.c.quota_scope_id])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the existing condition be removed?

Copy link
Collaborator

@HyeockJinKim HyeockJinKim left a comment

Choose a reason for hiding this comment

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

lgtm

@HyeockJinKim HyeockJinKim added this pull request to the merge queue Jan 17, 2025
Merged via the queue into main with commit 6336b48 Jan 17, 2025
24 checks passed
@HyeockJinKim HyeockJinKim deleted the fix/filter-vfolder-deletion-by-status branch January 17, 2025 10:36
lablup-octodog added a commit that referenced this pull request Jan 17, 2025
Co-authored-by: octodog <[email protected]>
Backported-from: main (24.12)
Backported-to: 24.09
Backport-of: 3446
lablup-octodog added a commit that referenced this pull request Jan 17, 2025
Co-authored-by: octodog <[email protected]>
Backported-from: main (24.12)
Backported-to: 24.03
Backport-of: 3446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Documentations comp:manager Related to Manager component size:M 30~100 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VFolder name continuously appends timestamp when purging user or group
2 participants