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 logic to disable housekeeper #1673

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Fix logic to disable housekeeper #1673

merged 1 commit into from
Feb 7, 2023

Conversation

knolleary
Copy link
Member

Description

Team Trials added the ability to disable the housekeeper thread so that the tests can run without fear of the housekeeper running stuff unexpectedly. The logic was a little aggressive and needs this fix to ensure it only gets disabled when intended.

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@knolleary knolleary requested a review from Pezmc February 7, 2023 11:54
@@ -34,7 +34,7 @@ module.exports = fp(async function (app, _opts, next) {
// Allow the housekeeper to be disabled - this allows the tests
// to run without fear the housekeeper may fire off a task at the same
// time.
if (!app.config.housekeeper) {
if (app.config.housekeeper === false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This was my mistake, I thought we'd want app.config.housekeeper being null or undefined to trigger it being disabled too (since the previous logic was !== true).

@@ -34,7 +34,7 @@ module.exports = fp(async function (app, _opts, next) {
// Allow the housekeeper to be disabled - this allows the tests
// to run without fear the housekeeper may fire off a task at the same
// time.
if (!app.config.housekeeper) {
if (app.config.housekeeper === false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This was my mistake, I thought we'd want app.config.housekeeper being null or undefined to trigger it being disabled too (since the previous logic was !== true).

@knolleary knolleary merged commit ee601a7 into main Feb 7, 2023
@knolleary knolleary deleted the fix-housekeeper branch February 7, 2023 14:15
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.

2 participants