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

Add availability_zone to the HELLO response #1487

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

rueian
Copy link
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
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.

src/networking.c Outdated Show resolved Hide resolved
@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
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
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
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
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>
Copy link

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
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.

Signed-off-by: Rueian <rueiancsie@gmail.com>
@madolson madolson added client-changes-needed Client changes are 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
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
50 checks passed
@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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-changes-needed Client changes are 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