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(server): Immediatly set global config to watch contents. #2505

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

TBS1996
Copy link
Contributor

@TBS1996 TBS1996 commented Sep 12, 2023

Envelopeprocessorservice updated the global config only when the watch changed, however, if we use static config then the watch won't change after we first set its contents to the static config. If we subscribe after it was first set, we wouldn't ever get to use the static config in the envelope processor service.

to fix this, we immediatly update the global config in envelope processor service to the contents of the watch.

#skip-changelog

@TBS1996 TBS1996 marked this pull request as ready for review September 12, 2023 09:01
@TBS1996 TBS1996 requested a review from a team September 12, 2023 09:01
@jan-auer
Copy link
Member

Please update the docs on Subscribe to mention this and add an example that shows correct usage. See this comment for inspiration on the examples:

#2458 (comment)

Comment on lines +91 to +93
/// fails. Subscribers should use the initial value when they get the watch
/// rather than only waiting for the watch to update, in case a global config
/// is only updated once, such as is the case with the static config file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a code example?

@TBS1996 TBS1996 merged commit 856a9a3 into master Sep 12, 2023
@TBS1996 TBS1996 deleted the tor/fix_static_watch branch September 12, 2023 12:24
jan-auer added a commit that referenced this pull request Sep 13, 2023
* master:
  fix(server): Immediatly set global config to watch contents. (#2505)
  feat(server): Use global config from file if provided (#2458)
  ref(metrics): Remove deprecated `Metric` type and improve docs (#2503)
  ref(projconfig): Unsupport v4 in the endpoint (#2500)
  docs(dashboard): Add instructions for required WASM target (#2502)
  release: 0.8.30
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.

Watch might miss out on static global config file if subscribed after watch was updated
4 participants