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

[BUGFIX] Call and await destroyDataSourceForWorkspace to avoid killing poor pod #10364

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

prastoin
Copy link
Contributor

@prastoin prastoin commented Feb 20, 2025

Motivations

Upgrade migration is not possible atm in production because running over all workspaces cause cpu raise leading to pod termination

@prastoin prastoin marked this pull request as ready for review February 20, 2025 15:31
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds critical fixes to database connection cleanup across multiple upgrade commands by properly awaiting the destroyDataSourceForWorkspace calls.

  • Added await to destroyDataSourceForWorkspace calls in six upgrade command files to prevent premature database connection termination
  • Ensures proper cleanup of database resources after workspace processing in 0-42-limit-amount-of-view-field.ts
  • Fixes potential memory leaks and resource exhaustion in 0-42-fix-body-v2-view-field-position.command.ts
  • Maintains connection cleanup even during error scenarios in 0-41-remove-duplicate-mcmas.ts
  • Prevents pod termination issues by properly closing connections in 0-41-seed-workflow-views.command.ts

6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM

@prastoin prastoin merged commit 68cb94f into main Feb 20, 2025
32 checks passed
@prastoin prastoin deleted the fix-commands-prod-0.42.7 branch February 20, 2025 15:45
Copy link
Contributor

Thanks @prastoin for your contribution!
This marks your 43rd PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

prastoin added a commit that referenced this pull request Feb 20, 2025
…ing poor pod (#10364)

# Motivations
Upgrade migration is not possible atm in production because running over
all workspaces cause cpu raise leading to pod termination
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.

3 participants