dice icon indicating copy to clipboard operation
dice copied to clipboard

Inconsistency in cmd responses via http protocol

Open vinitparekh17 opened this issue 1 year ago • 4 comments

Why this issue should not be ignored?

  • Since DiceDB expects input in valid JSON format, so does the client. This ensures that both the client and server can properly communicate and understand the data being transmitted.
  • Using JSON as the standard format for responses allows for consistent data representation, making it easier to parse and process the information on both ends. This way developers will have freedom to use any programming lang.

Steps to reproduce

curl --location 'http://localhost:8082/get' \
--header 'Content-Type: application/json' \
--header 'Cache-Control: no-cache' \
--data '{
    "key": "foo"
}'
  • Issue is not limited to this cmd, it applies on all cmds ( probably )

Expected output

{
    "statusCode": "success",
    "value": null
}
// -------- or ------ 
{
    "statusCode": "success",
    "value": "bar"
}

In case error

{
    "statusCode": "argsError",
    "message": "ERR wrong number of arguments for 'get' command"
}

Observed output

"(nil)"

Expectations for resolution

This issue will be considered resolved when the following things are done

  1. changes in the dice code to meet the expected behavior
  2. addition of relevant test case to ensure we catch the regression

You can find the tests under the tests directory of the dice repository and the steps to run are in the README file. Refer to the following links to set up DiceDB and Redis 7.2.5 locally

vinitparekh17 avatar Sep 27 '24 05:09 vinitparekh17

@lucifercr07 I assume you might have other things to focus on so should I take this one if you haven’t made any progress? Let me know

vinitparekh17 avatar Oct 02 '24 04:10 vinitparekh17

@vinitparekh17 sure please go ahead.

lucifercr07 avatar Oct 02 '24 16:10 lucifercr07

Hello @vinitparekh17,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Oct 09 '24 02:10 arpitbbhayani

Hello @vinitparekh17,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

thank you for reminder @arpitbbhayani Hopefully my PR will resolve this issue, waiting for review.

vinitparekh17 avatar Oct 09 '24 05:10 vinitparekh17