Skip to content

Commit d87c16b

Browse files
Merge branch 'main' into DOC-535
2 parents cff5650 + 8e3d746 commit d87c16b

File tree

129 files changed

+9442
-862
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+9442
-862
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: redis_modules_docs_sync
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # run every day at midnight UTC time
6+
workflow_dispatch: # or run on manual trigger
7+
8+
jobs:
9+
redis_modules_docs_sync:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
actions: write
15+
steps:
16+
- name: 'Checkout'
17+
uses: 'actions/checkout@v3'
18+
19+
- name: 'Fetch commands json files from modules'
20+
env:
21+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: |
23+
branch="redis_modules_docs_sync"
24+
modules_list=("redisjson" "redisbloom" "redistimeseries" "redisearch")
25+
module_change=false
26+
27+
# check if remote branch already exists
28+
git fetch --all
29+
set +e
30+
git ls-remote --exit-code --heads origin "refs/heads/${branch}"
31+
if [ "$?" -eq 0 ]; then
32+
set -e
33+
# if it does, create local branch off existing remote branch
34+
git checkout -b "${branch}" "origin/${branch}"
35+
git branch --set-upstream-to="origin/${branch}" "${branch}"
36+
git pull
37+
else
38+
set -e
39+
# otherwise, create local branch from main
40+
git checkout -b "${branch}"
41+
fi
42+
43+
for module in "${modules_list[@]}"; do
44+
# Find latest version
45+
module_version=$(
46+
curl -Ls \
47+
-H "Accept: application/vnd.github+json" \
48+
-H "Authorization: Bearer ${GH_TOKEN}" \
49+
-H "X-GitHub-Api-Version: 2022-11-28" \
50+
"https://api.github.com/repos/${module}/${module}/releases/latest" \
51+
| jq -r '.tag_name'
52+
)
53+
54+
# Fetch release
55+
gh release download "$module_version" -R "${module}/${module}" -A zip -O "${module}.zip"
56+
unzip "${module}.zip" -d "${module}"
57+
cp ${module}/*/commands.json "data/commands_${module}.json"
58+
59+
modules_commands_is_different=$(git diff "data/commands_${module}.json")
60+
if [[ ! -z $modules_commands_is_different ]]; then
61+
module_change=true
62+
63+
git add "data/commands_${module}.json"
64+
git config user.email "177626021+redisdocsapp[bot]@users.noreply.github.com"
65+
git config user.name "redisdocsapp[bot]"
66+
git commit -m "Update data/commands_${module}.json for release ${module_version}"
67+
fi
68+
done
69+
70+
if [ "$module_change" = true ] ; then
71+
git push origin "${branch}"
72+
73+
# If a pr is not already open, create one
74+
set +e
75+
gh search prs -R redis/docs --state open --match title "redis modules docs sync" | grep -q "redis modules docs sync"
76+
if [ "$?" -eq 1 ]; then
77+
set -e
78+
gh pr create \
79+
--body "redis modules docs sync" \
80+
--title "redis modules docs sync" \
81+
--head "$branch" \
82+
--base "main"
83+
fi
84+
fi

assets/css/index.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,4 +969,103 @@ code {
969969
/* no-click turns off border and click event on small icons */
970970
a[href*="#no-click"], img[src*="#no-click"] {
971971
@apply border-none cursor-default pointer-events-none no-underline;
972+
}
973+
974+
/* Version selector in side menu */
975+
.menu__version-selector {
976+
float: right;
977+
left: 18px;
978+
padding: 0 22px 0;
979+
position: relative;
980+
top: -28px;
981+
z-index: 1;
982+
border: 1px solid #dfdfdf;
983+
}
984+
985+
.menu__version-selector button {
986+
background: transparent;
987+
border: none;
988+
font-size: 13px;
989+
outline: none;
990+
}
991+
992+
.menu__version-selector button span.menu__version-selector__toggler {
993+
display: none;
994+
font-size: 8px;
995+
transform: translateY(-1px) translateX(2px);
996+
}
997+
998+
.menu__version-selector span.menu__version-selector__toggler.opener {
999+
display: inline-block;
1000+
}
1001+
1002+
.menu__version-selector span.menu__version-selector__toggler.closer {
1003+
display: none;
1004+
}
1005+
1006+
.menu__version-selector .menu__version-selector__list {
1007+
background: #f7f7f7;
1008+
border: 1px solid #dfdfdf;
1009+
border-top: none;
1010+
display: none;
1011+
font-size: 13px;
1012+
left: -1px;
1013+
position: absolute;
1014+
width: calc(100% + 2px);
1015+
z-index: 1;
1016+
}
1017+
1018+
.menu__version-selector .menu__version-selector__list a {
1019+
color: #868484;
1020+
display: block;
1021+
padding-left: 10px;
1022+
width: 100%;
1023+
}
1024+
1025+
.menu__version-selector .menu__version-selector__list a:hover {
1026+
color: #000;
1027+
}
1028+
1029+
.menu__version-selector .menu__version-selector__list a.selected-version {
1030+
display: none;
1031+
}
1032+
1033+
.menu__version-selector.open {
1034+
border: 1px solid #dfdfdf;
1035+
}
1036+
1037+
.menu__version-selector.open .menu__version-selector__toggler.opener {
1038+
display: none;
1039+
}
1040+
1041+
.menu__version-selector.open .menu__version-selector__toggler.closer {
1042+
display: inline-block;
1043+
}
1044+
1045+
.menu__version-selector.open .menu__version-selector__list {
1046+
display: block;
1047+
}
1048+
1049+
.menu__version-selector > li .menu-divider {
1050+
border-top: 1px solid #5d6876;
1051+
height: 1px;
1052+
left: 20px;
1053+
margin-left: 0 !important;
1054+
position: absolute;
1055+
top: 10px;
1056+
width: calc(100% - 20px);
1057+
}
1058+
1059+
.menu__version-selector > li > .children {
1060+
display: none;
1061+
}
1062+
1063+
.menu__version-selector > li.parent > .children {
1064+
display: flex;
1065+
position: relative;
1066+
padding-top: 60px;
1067+
}
1068+
1069+
.dd-item .highlight:hover {
1070+
color: #5961ff;
9721071
}

build/components/example.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@
1111
GO_OUTPUT = 'Output:'
1212
TEST_MARKER = {
1313
'java': '@Test',
14-
'c#': '\[Fact\]'
14+
'c#': '\[Fact\]|\[SkipIfRedis\(.*\)\]'
1515
}
1616
PREFIXES = {
1717
'python': '#',
1818
'node.js': '//',
1919
'java': '//',
2020
'go': '//',
2121
'c#': '//',
22-
'redisvl': '#'
22+
'redisvl': '#',
23+
'php': '//'
2324
}
2425

26+
2527
class Example(object):
2628
language = None
2729
path = None

content/apis/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ Redis Cloud is a fully managed Database as a Service offering and the fastest wa
4545

4646
- [Redis Cloud REST API introduction]({{< relref "/operate/rc/api/" >}})
4747
- [Redis Cloud REST API examples]({{< relref "/operate/rc/api/examples/" >}})
48-
- [Redis Cloud REST API reference]({{< relref "/operate/rs/references/rest-api/" >}})
48+
- [Redis Cloud REST API reference](https://api.redislabs.com/v1/swagger-ui.html)
4949

5050

5151
### Redis Enterprise Software API
5252
If you have installed Redis Enterprise Software, you can automate operations with the Redis Enterprise REST API.
5353

54-
- [Redis Enterprise Software REST API introduction]({{< relref "/operate/rc/api/" >}})
54+
- [Redis Enterprise Software REST API introduction]({{< relref "/operate/rs/references/rest-api/" >}})
5555
- [Redis Enterprise Software REST API requests]({{< relref "/operate/rs/references/rest-api/requests/" >}})
5656
- [Redis Enterprise Software REST API objects]({{< relref "/operate/rs/references/rest-api/objects/" >}})
5757

content/commands/flushall/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ It is possible to use one of the following modifiers to dictate the flushing mod
6262
* `ASYNC`: flushes the databases asynchronously
6363
* `SYNC`: flushes the databases synchronously
6464

65-
Note: an asynchronous `FLUSHALL` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
65+
## Notes
66+
67+
* An asynchronous `FLUSHALL` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
68+
* This command does not delete functions.
6669

6770
## Behavior change history
6871

69-
* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive.
72+
* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive.

content/commands/flushdb/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ It is possible to use one of the following modifiers to dictate the flushing mod
6262
* `ASYNC`: flushes the database asynchronously
6363
* `SYNC`: flushes the database synchronously
6464

65-
Note: an asynchronous `FLUSHDB` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
65+
## Notes
66+
67+
* An asynchronous `FLUSHDB` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
68+
* This command does not delete functions.
6669

6770
## Behavior change history
6871

69-
* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive.
72+
* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive.

content/commands/ft.config-set/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Set the value of a RediSearch configuration parameter.
3535

3636
Values set using `FT.CONFIG SET` are not persisted after server restart.
3737

38-
RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/administration" >}}).
38+
RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}).
3939

4040
{{% alert title="Note" color="warning" %}}
4141
As detailed in the link above, not all RediSearch configuration parameters can be set at runtime.

content/commands/info/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,3 +515,24 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on
515515
**A note about the word slave used in this man page**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated.
516516

517517
**Modules generated sections**: Starting with Redis 6, modules can inject their information into the `INFO` command. These are excluded by default even when the `all` argument is provided (it will include a list of loaded modules but not their generated info fields). To get these you must use either the `modules` argument or `everything`.
518+
519+
## Redis Software and Redis Cloud compatibility
520+
521+
| Redis<br />Enterprise | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
522+
|:----------------------|:-----------------|:------|
523+
| <span title="Supported">&#x2705; Standard</span><br /><span title="Supported"><nobr>&#x2705; Active-Active</nobr></span> | <span title="Supported">&#x2705; Standard</span><br /><span title="Supported"><nobr>&#x2705; Active-Active</nobr></span> | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.<br />Not supported for [scripts]({{<relref "/develop/interact/programmability">}}). |
524+
525+
Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
526+
527+
Additionally, for JSON keys, Redis implements a “shared string” mechanism to save memory when the same JSON field names or field values of type string are used more than once (either inter-key or intra-key).
528+
In such cases, instead of storing the field names or values many times, Redis stores them only once. This mechanism is not in place for active-active databases.
529+
530+
On non-active-active databases, `INFO` (Memory > used_memory) reports that the shared memory is counted, but only once for all keys. On active-active databases, there is no shared memory, so if strings are repeated, they are stored multiple times.
531+
532+
**Example**
533+
534+
Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB of shared content.
535+
536+
For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. The last term, "+ 5KB", is the size of the shared content.
537+
538+
For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key.

content/commands/memory-usage/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,11 @@ OK
8787
> MEMORY USAGE foo3
8888
(integer) 160
8989
```
90+
91+
## Redis Software and Redis Cloud compatibility
92+
93+
| Redis<br />Enterprise | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
94+
|:----------------------|:-----------------|:------|
95+
|<span title="Supported">&#x2705; Standard</span><br /><span title="Supported"><nobr>&#x2705; Active-Active</nobr></span> | <span title="Supported">&#x2705; Standard</span><br /><span title="Supported"><nobr>&#x2705; Active-Active</nobr></span> | Not supported for [scripts]({{<relref "/develop/interact/programmability">}}) in Redis versions earlier than 7. |
96+
97+
Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.

content/develop/connect/clients/_index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ Redis does not support directly:
3939
| Language | Client name | Github | Docs |
4040
| :-- | :-- | :-- | :-- |
4141
| C | hiredis | https://github.com/redis/hiredis | https://github.com/redis/hiredis |
42-
| [PHP](https://www.php.net/) | predis | https://github.com/predis/predis | https://github.com/predis/predis/wiki |
42+
| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md |
43+
| [PHP](https://www.php.net/) | Predis library | https://github.com/predis/predis | https://github.com/predis/predis/wiki |
4344
| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis |
44-
| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ |
45+
| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ |
46+
| [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Boost.Redis | https://github.com/boostorg/redis | https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html |
4547

4648
## Requirements
4749

@@ -52,4 +54,4 @@ To interact with a Redis server without writing code, use the
5254
[Redis CLI]({{< relref "/develop/connect/cli" >}}) and
5355
[Redis Insight]({{< relref "/develop/connect/insight" >}}) tools.
5456

55-
## Client library guides
57+
## Client library guides

0 commit comments

Comments
 (0)