-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add switch to turn collectors on/off #590
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small consideration, otherwise LGTM!
docker-compose.yml
Outdated
BZ_COLLECTOR_ENABLED: ${BZ_COLLECTOR_ENABLED} | ||
ERRATA_COLLECTOR_ENABLED: ${ERRATA_COLLECTOR_ENABLED} | ||
JIRA_COLLECTOR_ENABLED: ${JIRA_COLLECTOR_ENABLED} | ||
NVD_COLLECTOR_ENABLED: ${NVD_COLLECTOR_ENABLED} | ||
OSV_COLLECTOR_ENABLED: ${OSV_COLLECTOR_ENABLED} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consideration: Do we want to add these here and to the ops repo env variables reference files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe even into docker-compose.test.yml
to disable collectors on localhost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jobselko AFAIK docker-compose.test.yml
only defines the test pods, and the celery pods are defined in docker-compose.yml
so adding the env vars there should be enough to be able to enable/disable them in localhost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also thinking about the OPS repo. As most of the case we want the collectors on and they are on by default we do not have to add them there. The only case I would be for adding is to disable the UAT flaw collector. When it is enable but the BBSync is disabled it results in weird situations when something may be created internally in the DB and then synced from Bugzilla once more (eg. Assembler collector duplicates).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
274698b
to
b189310
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a higher granularity - on collector level, not module level. Otherwise the mechanism looks great, this is exactly what we need.
docker-compose.yml
Outdated
BZ_COLLECTOR_ENABLED: ${BZ_COLLECTOR_ENABLED} | ||
ERRATA_COLLECTOR_ENABLED: ${ERRATA_COLLECTOR_ENABLED} | ||
JIRA_COLLECTOR_ENABLED: ${JIRA_COLLECTOR_ENABLED} | ||
NVD_COLLECTOR_ENABLED: ${NVD_COLLECTOR_ENABLED} | ||
OSV_COLLECTOR_ENABLED: ${OSV_COLLECTOR_ENABLED} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also thinking about the OPS repo. As most of the case we want the collectors on and they are on by default we do not have to add them there. The only case I would be for adding is to disable the UAT flaw collector. When it is enable but the BBSync is disabled it results in weird situations when something may be created internally in the DB and then synced from Bugzilla once more (eg. Assembler collector duplicates).
This commit implements a way to turn off each collector using an environment variable. Turning it off means it won't be caught by celery, and therefore it won't be run automatically, although the collectors can still be run manually from a shell even if they have been turned off. There is an environment variable for each of the collector groups: Bugzilla, Jira, Errata Tool, NVD and OSV. This means they can each be turned on/off individually. The collectors are turned on by default. Closes OSIDB-2884.
b189310
to
91a1d17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit implements a way to turn off each collector using an environment variable. Turning it off means it won't be caught by celery, and therefore it won't be run automatically, although the collectors can still be run manually from a shell even if they have been turned off.
There is an environment variable for each of the collector groups: Bugzilla, Jira, Errata Tool, NVD and OSV. This means they can each be turned on/off individually.
The collectors are turned on by default.
Closes OSIDB-2884.