aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Add WithRedisInsight

Open Alirexaa opened this issue 1 year ago • 2 comments

Description

In this PR, I Added Redis Insight, a Developer GUI for Redis, by Redis.

by using WithRedisInsight the RedisInsight instance starts and imports the Redis connection to this instance via HTTP call.

only some unit tests need to include this PR.

Fixes #5165

Checklist

  • Is this feature complete?
    • [X] Yes. Ready to ship.
    • [ ] No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • [x] Yes
    • [ ] No
  • Did you add public API?
    • [X] Yes
      • If yes, did you have an API Review for it?
        • [X] Yes
        • [ ] No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • [ ] Yes
        • [X] No
    • [ ] No
  • Does the change make any security assumptions or guarantees?
    • [ ] Yes
      • If yes, have you done a threat model and had a security review?
        • [ ] Yes
        • [ ] No
    • [X] No
  • Does the change require an update in our Aspire docs?
    • [X] Yes
      • Link to aspire-docs issue: https://github.com/dotnet/docs-aspire/issues/1474
    • [ ] No
Microsoft Reviewers: Open in CodeFlow

Alirexaa avatar Aug 08 '24 08:08 Alirexaa

To pass all tests we need to import docker.io/redis/redisinsight:2.54 to netaspireci.azurecr.io

Alirexaa avatar Aug 08 '24 12:08 Alirexaa

@eerhardt could you please import docker.io/redis/redisinsight:2.54 to make ci green?

Alirexaa avatar Aug 09 '24 18:08 Alirexaa

Should this be added to the TestShop playground app too like RedisCommander?

https://github.com/dotnet/aspire/blob/6f0e998edc1bec5828b74cf63a86b67acd898505/playground/TestShop/TestShop.AppHost/Program.cs#L12-L15

radical avatar Aug 15 '24 20:08 radical

@eerhardt could you please import docker.io/redis/redisinsight:2.54 to make ci green?

@eerhardt

Alirexaa avatar Aug 16 '24 09:08 Alirexaa

@eerhardt could you please import docker.io/redis/redisinsight:2.54 to make ci green?

I have pushed the image to the netaspireci.azurecr.io registry, but I don't believe the test will pass because we don't have Docker Desktop installed on the CI machines.

eerhardt avatar Aug 16 '24 16:08 eerhardt

@eerhardt could you please import docker.io/redis/redisinsight:2.54 to make ci green?

I have pushed the image to the netaspireci.azurecr.io registry, but I don't believe the test will pass because we don't have Docker Desktop installed on the CI machines.

What can I do for that?

Alirexaa avatar Aug 16 '24 16:08 Alirexaa

/azp run

radical avatar Aug 16 '24 18:08 radical

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 16 '24 18:08 azure-pipelines[bot]

@Alirexaa are you going to get back to this one?

davidfowl avatar Sep 14 '24 06:09 davidfowl

@Alirexaa are you going to get back to this one?

Yes. I will work on this.

Alirexaa avatar Sep 14 '24 06:09 Alirexaa

I cloned and played with this a bit:

These logs show up when you use redis insight since you're using the HttpClient factory.

info: System.Net.Http.HttpClient.Default.LogicalHandler[100]
      Start processing HTTP request POST http://localhost:33802/api/databases/import
info: System.Net.Http.HttpClient.Default.ClientHandler[100]
      Sending HTTP request POST http://localhost:33802/api/databases/import

Another thing that's kind of annoying is accepting the eula on every launch:

image

davidfowl avatar Sep 15 '24 16:09 davidfowl

I cloned and played with this a bit:

These logs show up when you use redis insight since you're using the HttpClient factory.

info: System.Net.Http.HttpClient.Default.LogicalHandler[100]
      Start processing HTTP request POST http://localhost:33802/api/databases/import
info: System.Net.Http.HttpClient.Default.ClientHandler[100]
      Sending HTTP request POST http://localhost:33802/api/databases/import

Do you want us to use WaitForText for these logs?

Another thing that's kind of annoying is accepting the eula on every launch:

image

There is another API to accept the eula: https://github.com/RedisInsight/RedisInsight/issues/3267#issuecomment-2058623351

curl -XPATCH 'http://localhost:5540/api/settings' \
  -H 'Content-Type: application/json' \
  --data-raw '{"agreements":{"eula":true,"analytics":true,"notifications":true,"encryption":false}}

I will use this API to accept the eula.

Alirexaa avatar Sep 15 '24 17:09 Alirexaa