-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
load product catalog periodically #1919
base: main
Are you sure you want to change the base?
load product catalog periodically #1919
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.
lgtm overall
@@ -26,7 +26,7 @@ | |||
}, | |||
{ | |||
"id": "1YMWWN1N4O", | |||
"name": "Eclipsmart Travel Refractor Telescope", | |||
"name": "THIS IS MY PRODUCT NAME", |
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.
Left over?
ticker := time.NewTicker(time.Duration(interval) * time.Second) | ||
|
||
go func() { | ||
for { |
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.
It would be best to have the programs' context here so it can be properly shutdown, but it seems it would require a major refactor to the codebase (all other init functions as well). We can keep it for a future improvement.
@@ -399,6 +399,7 @@ services: | |||
environment: | |||
- FLAGD_HOST | |||
- PRODUCT_CATALOG_PORT | |||
- PRODUCT_CATALOG_RELOAD_INTERVAL |
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.
Should we mount the products to the container?
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Changes
Fixes #1892
PRODUCT_CATALOG_RELOAD_INTERVAL
This allows the user to change the products without rebuilding the product-catalog service. The products can also be updated after the demo is running. The change also paves the way for reloading the product catalog on a period timer, allowing the product list to be backed by more dynamic sources such as a database.
Finally, this change will require some updates to the Helm chart to load and mount the product list via a ConfigMap.
Merge Requirements
For new features contributions, please make sure you have completed the following
essential items:
CHANGELOG.md
updated to document new feature additionsMaintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.