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

Delete public DB if private DB does not exist on scheduler start #6070

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Apr 17, 2024

On scheduler start, it tries to load workflow template variables from the public database. However, if the user has deleted the private database, it is not a restart, so it shouldn't try to load the public DB either.

The simple solution to this is to delete the public DB file (if it exists) immediately after checking and finding the private DB does not exist.

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 included (or explain why tests are not needed).
  • No changelog entry needed as minor/niche
  • No docs needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added the bug? Not sure if this is a bug or not label Apr 17, 2024
@MetRonnie MetRonnie added this to the cylc-8.3.0 milestone Apr 17, 2024
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.

Makes sense to me. Maybe add a comment to the code to explain it, as per your issue description.

@oliver-sanders oliver-sanders merged commit 9abced9 into cylc:master Apr 19, 2024
@MetRonnie MetRonnie deleted the restart-pub-db branch April 19, 2024 13:52
@MetRonnie MetRonnie self-assigned this Apr 19, 2024
wxtim added a commit to wxtim/cylc that referenced this pull request Apr 22, 2024
* upstream/master: (25 commits)
  Delete public DB if private DB does not exist on scheduler start (cylc#6070)
  Include xtrigger function signatures in `cylc config` (cylc#6071)
  Add Nano syntax highlighter (cylc#6072)
  Play should have no cylc rose options (cylc#6068)
  tests/integration: address urwid deprecation warning (cylc#6063)
  Bump dev version
  Prepare release 8.2.5
  add mailmap entry
  Tutorials: avoid validation errors due to implicit tasks
  Update CONTRIBUTING.md
  Update xtrigger_mgr.py documentation
  Another small tweak.
  Tweak previous.
  Tutorials: increase sleep and don't sleep in CI
  Fix bad doctests
  tutorial: make the tutorial workflow run a little slower
  Style tweaks.
  Simply workflow-state code a bit.
  Add unit tests for workflow-state.
  Add to doc string.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Not sure if this is a bug or not small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants