-
Notifications
You must be signed in to change notification settings - Fork 403
RI-6658: fallback to HELLO command when INFO is disabled via ACL #4377
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
937b69a
RI-6849: fallback to hello command when connecting to db
KrumTy 3dcffeb
RI-6849: refactor and test convertArrayOfKeyValuePairsToObject
KrumTy 2ae9be0
RI-6849: expose getRedisInfo method
KrumTy c5bb1e2
RI-6849: refactor getInfo method, expose from client
KrumTy 5f4230f
remove convertArrayOfKeyValuePairsToObject
KrumTy 819e2a4
fix failing unit test
KrumTy e1c4e1b
update test
KrumTy 7032266
add default redis info
KrumTy 9e842b9
update static value
KrumTy af075db
update default info
KrumTy 021f24b
update default info
KrumTy aa17555
refactor getInfo
KrumTy 6ee35d6
fix failing test
KrumTy 62dbbe7
RI-6844: hide db overview metrics when data is not available (#4383)
KrumTy cc96937
RI-6848: add info_command_is_disabled to analytics when INFO is disab…
KrumTy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
export enum TransformGroup { | ||
Secure = 'security', | ||
} | ||
|
||
export const UNKNOWN_REDIS_INFO = { | ||
server: { | ||
redis_version: 'unknown', | ||
redis_mode: 'standalone', | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ import { | |
calculateRedisHitRatio, | ||
catchAclError, | ||
convertIntToSemanticVersion, | ||
convertRedisInfoReplyToObject, | ||
} from 'src/utils'; | ||
import { AdditionalRedisModule } from 'src/modules/database/models/additional.redis.module'; | ||
import { REDIS_MODULES_COMMANDS, SUPPORTED_REDIS_MODULES } from 'src/constants'; | ||
|
@@ -76,10 +75,7 @@ export class DatabaseInfoProvider { | |
*/ | ||
public async determineDatabaseServer(client: RedisClient): Promise<string> { | ||
try { | ||
const reply = convertRedisInfoReplyToObject(await client.call( | ||
['info', 'server'], | ||
{ replyEncoding: 'utf8' }, | ||
) as string); | ||
const reply = await client.getInfo(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. like here |
||
return reply['server']?.redis_version; | ||
} catch (e) { | ||
// continue regardless of error | ||
|
@@ -135,10 +131,7 @@ export class DatabaseInfoProvider { | |
client: RedisClient, | ||
): Promise<RedisDatabaseInfoResponse> { | ||
try { | ||
const info = convertRedisInfoReplyToObject(await client.sendCommand( | ||
['info'], | ||
{ replyEncoding: 'utf8' }, | ||
) as string); | ||
const info = await client.getInfo(); | ||
const serverInfo = info['server']; | ||
const memoryInfo = info['memory']; | ||
const keyspaceInfo = info['keyspace']; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.