Skip to content

Add availability_zone to the HELLO response#1487

Merged
zuiderkwast merged 4 commits intovalkey-io:unstablefrom
rueian:hello-az
Jan 7, 2025
Merged

Add availability_zone to the HELLO response#1487
zuiderkwast merged 4 commits intovalkey-io:unstablefrom
rueian:hello-az

Conversation

@rueian
Copy link
Copy Markdown
Contributor

@rueian rueian commented Dec 25, 2024

It's inconvenient for client implementations to extract the availability_zone information from the INFO response. The INFO response contains a lot of information that a client implementation typically doesn't need.

This PR adds the availability zone to the HELLO response. Clients usually already use the HELLO command for protocol negotiation and also get the server version and role from its response. To keep the HELLO response small, the field is only added if availability zone is configured.

Copy link
Copy Markdown
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

I like the idea but i think we should only include it if it's configured.

Comment thread src/networking.c Outdated
@zuiderkwast zuiderkwast added the major-decision-pending Major decision pending by TSC team label Dec 25, 2024
Signed-off-by: Rueian <rueiancsie@gmail.com>
Copy link
Copy Markdown
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

@valkey-io/core-team please approve if you agree.

Copy link
Copy Markdown
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

LGTM, please also add a test, i think it can be fit in protocol.tcl

Signed-off-by: Rueian <rueiancsie@gmail.com>
@rueian
Copy link
Copy Markdown
Contributor Author

rueian commented Dec 26, 2024

LGTM, please also add a test, i think it can be fit in protocol.tcl

Thanks for the direction but how about we add the test in the tracking.tcl? That is the only place I found that has tests for the HELLO command.

@enjoy-binbin
Copy link
Copy Markdown
Member

tracking.tcl seem odd, the test does not do anything close to tracking, i suggest we also move HELLO without protover to protocol.tcl.

Signed-off-by: Rueian <rueiancsie@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.85%. Comparing base (9f4503c) to head (d4210c0).
Report is 22 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1487      +/-   ##
============================================
- Coverage     70.86%   70.85%   -0.02%     
============================================
  Files           119      119              
  Lines         64859    64863       +4     
============================================
- Hits          45963    45959       -4     
- Misses        18896    18904       +8     
Files with missing lines Coverage Δ
src/networking.c 88.69% <100.00%> (+0.34%) ⬆️

... and 12 files with indirect coverage changes

@rueian
Copy link
Copy Markdown
Contributor Author

rueian commented Dec 27, 2024

tracking.tcl seem odd, the test does not do anything close to tracking, i suggest we also move HELLO without protover to protocol.tcl.

Updated.

Comment thread tests/unit/protocol.tcl
Signed-off-by: Rueian <rueiancsie@gmail.com>
Comment thread src/networking.c
@madolson madolson added client-changes-needed Client changes may be required for this feature needs-doc-pr This change needs to update a documentation page. Remove label once doc PR is open. labels Jan 2, 2025
@madolson madolson added major-decision-approved Major decision approved by TSC team and removed major-decision-pending Major decision pending by TSC team labels Jan 3, 2025
rueian added a commit to rueian/valkey-doc that referenced this pull request Jan 7, 2025
This PR is for valkey-io/valkey#1487.

Signed-off-by: Rueian <rueiancsie@gmail.com>
@rueian
Copy link
Copy Markdown
Contributor Author

rueian commented Jan 7, 2025

Thanks for all the reviewing. Here is the PR for doc changes: valkey-io/valkey-doc#207.

@zuiderkwast zuiderkwast added the release-notes This issue should get a line item in the release notes label Jan 7, 2025
@zuiderkwast zuiderkwast merged commit 3b52186 into valkey-io:unstable Jan 7, 2025
@madolson madolson removed the needs-doc-pr This change needs to update a documentation page. Remove label once doc PR is open. label Jan 7, 2025
enjoy-binbin added a commit that referenced this pull request Jan 8, 2025
This PR is a followup for #1487.

Signed-off-by: Rueian <rueiancsie@gmail.com>
Co-authored-by: Binbin <binloveplay1314@qq.com>
zuiderkwast pushed a commit to valkey-io/valkey-doc that referenced this pull request Jan 8, 2025
Documentation for valkey-io/valkey#1487.

It includes the `availability_zone` field in the examples and has a note
saying that the field will only be present when it is set in configs.

Signed-off-by: Rueian <rueiancsie@gmail.com>
Comment thread tests/unit/protocol.tcl
kronwerk pushed a commit to kronwerk/valkey that referenced this pull request Jan 27, 2025
It's inconvenient for client implementations to extract the
`availability_zone` information from the `INFO` response. The `INFO`
response contains a lot of information that a client implementation
typically doesn't need.

This PR adds the availability zone to the `HELLO` response. Clients
usually already use the `HELLO` command for protocol negotiation and
also get the server `version` and `role` from its response. To keep the
`HELLO` response small, the field is only added if availability zone is
configured.

---------

Signed-off-by: Rueian <rueiancsie@gmail.com>
kronwerk pushed a commit to kronwerk/valkey that referenced this pull request Jan 27, 2025
This PR is a followup for valkey-io#1487.

Signed-off-by: Rueian <rueiancsie@gmail.com>
Co-authored-by: Binbin <binloveplay1314@qq.com>
zuiderkwast added a commit that referenced this pull request Feb 10, 2025
We add it to HELLO response in #1487.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
xbasel pushed a commit to xbasel/valkey that referenced this pull request Mar 27, 2025
…y-io#1695)

We add it to HELLO response in valkey-io#1487.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
xbasel pushed a commit to xbasel/valkey that referenced this pull request Mar 27, 2025
…y-io#1695)

We add it to HELLO response in valkey-io#1487.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
murphyjacob4 pushed a commit to enjoy-binbin/valkey that referenced this pull request Apr 13, 2025
…y-io#1695)

We add it to HELLO response in valkey-io#1487.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
enjoy-binbin added a commit to enjoy-binbin/valkey that referenced this pull request Mar 11, 2026
…t commands

`availability_zone` was added to the HELLO command in valkey-io#1487, and
it was missing the reply schema and the test was wrongly marked
with `logreqres:skip`.

`availability-zone` was added to CLUSTER SHARDS and CLUSTER SLOTS
commands in valkey-io#3156, and it was missing the reply schema.

Signed-off-by: Binbin <binloveplay1314@qq.com>
zuiderkwast pushed a commit that referenced this pull request Mar 11, 2026
…3352)

`availability_zone` was added to the HELLO command in #1487, and
it was missing the reply schema and the test was wrongly marked
with `logreqres:skip`.

`availability-zone` was added to CLUSTER SHARDS and CLUSTER SLOTS
commands in #3156, and it was missing the reply schema.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
JimB123 pushed a commit that referenced this pull request Mar 19, 2026
…3352)

`availability_zone` was added to the HELLO command in #1487, and
it was missing the reply schema and the test was wrongly marked
with `logreqres:skip`.

`availability-zone` was added to CLUSTER SHARDS and CLUSTER SLOTS
commands in #3156, and it was missing the reply schema.

---------

Signed-off-by: Binbin <binloveplay1314@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-changes-needed Client changes may be required for this feature major-decision-approved Major decision approved by TSC team release-notes This issue should get a line item in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants