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

Web console: more robust durable storage setting detection #16493

Merged
merged 2 commits into from
May 22, 2024

Conversation

vogievetsky
Copy link
Contributor

Right now the docs tell people to set "selectDestination": "DURABLESTORAGE" (which works) but the console check for durableStorage. Fix the docs and make the console check more robust.

@@ -89,6 +89,10 @@ export function addOrUpdate<T>(xs: readonly T[], x: T, keyFn: (x: T) => string |

// ----------------------------

export function caseInsensitiveEquals(str1: string | undefined, str2: string | undefined): boolean {
return str1?.toLowerCase() === str2?.toLowerCase();
Copy link
Contributor

Choose a reason for hiding this comment

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

This would throw a NPE if str1 or str2 are null, right? If yes, I think we should handle that as well since this is a utility function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no that is what the ? before the . is for. It is essentially doing (str1 ? str1.toLowerCase() : undefined) === (str2 ? str2.toLowerCase() : undefined). Added a test case so you can verify

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, thanks for the clarification!

Copy link
Contributor

@abhishekrb19 abhishekrb19 left a comment

Choose a reason for hiding this comment

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

🚀

@abhishekrb19 abhishekrb19 merged commit 10ea88e into apache:master May 22, 2024
12 checks passed
@vogievetsky vogievetsky deleted the fix_durable_storage_casing branch May 22, 2024 22:49
ektravel pushed a commit to ektravel/druid that referenced this pull request May 29, 2024
)

* more robust durable storage setting

* add test
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants