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 run mode restart check to avoid unclosed DB connection #6038

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Mar 26, 2024

I recently set up a new development environment in Python 3.11 on NFS. For some reason it is susceptible to an issue where the DB connection is not closed on restart causing integration test teardown to fail.

I traced this unclosed DB connection to #5789

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • No dependency changes
  • Tests are already existing
  • No CHANGES.md entry included as unlikely to be a problem for real workflows
  • No docs needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added the could be better Not exactly a bug, but not ideal. label Mar 26, 2024
@MetRonnie MetRonnie added this to the cylc-8.2.5 milestone Mar 26, 2024
@MetRonnie MetRonnie requested a review from wxtim March 26, 2024 16:46
@MetRonnie MetRonnie self-assigned this Mar 26, 2024
Comment on lines -442 to -443
og_run_mode = self.workflow_db_mgr.get_pri_dao(
).select_workflow_params_run_mode() or 'live'
Copy link
Member Author

Choose a reason for hiding this comment

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

This was causing the unclosed DB connection

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

👍

@wxtim wxtim merged commit 4feb7bb into cylc:8.2.x Mar 27, 2024
25 checks passed
@MetRonnie MetRonnie deleted the run-mode-db branch March 27, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants