Skip to content

Document the commands JSON files#403

Merged
zuiderkwast merged 5 commits into
valkey-io:unstablefrom
zuiderkwast:document-commands-json
May 2, 2024
Merged

Document the commands JSON files#403
zuiderkwast merged 5 commits into
valkey-io:unstablefrom
zuiderkwast:document-commands-json

Conversation

@zuiderkwast

Copy link
Copy Markdown
Contributor

These JSON files were originally not intended to be used directly, since they
contain internals and some fiels like "acl_categories" that are not the final
ACL categories. (Valkey will apply some implicit rules to compute the final ACL
categories.) However, people see JSON files and use them directly anyway.

So it's better to document them.

In a later PR, we can get rid of all implicit ACL categories and instead populate them explicitly in the JSON files. Then, we'll add a validation (e.g. in generate-command-code.py) that the implied categories are set.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@codecov

codecov Bot commented Apr 29, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.36%. Comparing base (68ca258) to head (d647a68).

❗ Current head d647a68 differs from pull request most recent head 257e46c. Consider uploading reports for the commit 257e46c to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #403      +/-   ##
============================================
- Coverage     68.43%   68.36%   -0.08%     
============================================
  Files           109      108       -1     
  Lines         61671    61563     -108     
============================================
- Hits          42207    42085     -122     
- Misses        19464    19478      +14     

see 14 files with indirect coverage changes

Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Comment thread src/commands/README.md Outdated
Thanks Binbin!

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>

Co-authored-by: Binbin <binloveplay1314@qq.com>

@stockholmux stockholmux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great to see this. A couple of small issues.

Comment thread src/commands/README.md
Comment thread src/commands/README.md
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@zuiderkwast zuiderkwast merged commit d1de349 into valkey-io:unstable May 2, 2024
@zuiderkwast zuiderkwast deleted the document-commands-json branch May 2, 2024 15:02
PingXie pushed a commit to PingXie/valkey that referenced this pull request May 2, 2024
These JSON files were originally not intended to be used directly, since
they contain internals and some fiels like "acl_categories" that are not
the final ACL categories. (Valkey will apply some implicit rules to
compute the final ACL categories.) However, people see JSON files
and use them directly anyway.

So it's better to document them.

In a later PR, we can get rid of all implicit ACL categories and instead
populate them explicitly in the JSON files. Then, we'll add a validation
(e.g. in generate-command-code.py) that the implied categories are set.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Binbin <binloveplay1314@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants