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

[changelog][client] Add viewname to changelog client factory #1554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ZacAttack
Copy link
Contributor

[changelog][client] Add viewname to changelog client factory

This is to enable cases where we need to be able to consume different views for different stores.

Resolves #XXX

How was this PR tested?

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

…allows setting a view per consumer

This is to enable cases where we need to be able to consume different views for different stores.
String viewNameOverride) {
String adjustedConsumerId;
if (!StringUtils.isEmpty(viewNameOverride)) {
adjustedConsumerId = consumerId + "-" + viewNameOverride;
Copy link
Contributor

@xunyin8 xunyin8 Feb 26, 2025

Choose a reason for hiding this comment

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

If consumerId is null this concat will actually resolve to null-<viewNameOverride> which functionally I don't think it makes a difference in:

  private String suffixConsumerIdToStore(String storeName, String consumerId) {
    return StringUtils.isEmpty(consumerId) ? storeName : storeName + "-" + consumerId;
  }

and storeClientMap.computeIfAbsent but I think we should still fix it to avoid confusion and potential side effects in the future.

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