Skip to content

Commit 7efb974

Browse files
Fix merge conflict with image
2 parents d9ebe6d + 0d697ed commit 7efb974

File tree

161 files changed

+46986
-150
lines changed

Some content is hidden

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

161 files changed

+46986
-150
lines changed

.github/workflows/main-staging.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ jobs:
6565
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6666
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6767
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
68+
redisvl_versions=($(find content/develop/ai/redisvl/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6869
6970
printf "%s\n" "${kubernetes_versions[@]}" > kubernetes-versions
7071
printf "%s\n" "${rs_versions[@]}" > rs-versions
7172
printf "%s\n" "${rdi_versions[@]}" > rdi-versions
73+
printf "%s\n" "${redisvl_versions[@]}" > redisvl-versions
7274
7375
# build latest
7476
for version in "${kubernetes_versions[@]}"; do
@@ -80,6 +82,9 @@ jobs:
8082
for version in "${rdi_versions[@]}"; do
8183
rm -r "content/integrate/redis-data-integration/${version}"
8284
done
85+
for version in "${redisvl_versions[@]}"; do
86+
rm -r "content/develop/ai/redisvl/${version}"
87+
done
8388
make all
8489
8590
git checkout .
@@ -166,6 +171,33 @@ jobs:
166171
git checkout .
167172
done
168173
174+
for version in "${redisvl_versions[@]}"; do
175+
176+
setBaseUrl
177+
178+
# for each version, remove all other versions before building
179+
versions_to_remove=($(echo "${redisvl_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
180+
for version_to_remove in "${versions_to_remove[@]}"; do
181+
rm -r "content/develop/ai/redisvl/${version_to_remove}"
182+
done
183+
184+
# relrefs should not include version
185+
find "content/develop/ai/redisvl/${version}" -type f | while read file; do
186+
awk '{gsub(/\(\{\{< ?relref "\/develop\/ai\/redisvl\/'${version}'/, "({{< relref \"/develop/ai/redisvl") }1' "$file" > tmpfile && mv tmpfile "$file"
187+
done
188+
189+
rsync -a --delete-after "content/develop/ai/redisvl/${version}"/ content/develop/ai/redisvl/
190+
sed -i 's/id="versionSelectorRedisvlValue" class="version-selector-control">latest/id="versionSelectorRedisvlValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
191+
sed -i 's/linkTitle: '"${version}"'/linkTitle: RedisVL/' content/develop/ai/redisvl/_index.md
192+
193+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
194+
sed -i "12i \{\{ \$gh_path = replaceRE \`\^develop\/ai\/redisvl\/\` \"develop\/ai\/redisvl\/$version\/\" \$gh_path }}" layouts/partials/meta-links.html
195+
196+
hugo -d "redisvl-${version}"
197+
198+
git checkout .
199+
done
200+
169201
- name: List client examples
170202
run: ls "${{ github.workspace }}/examples"
171203
- name: List files to be published
@@ -205,6 +237,8 @@ jobs:
205237
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
206238
if [[ "${product}" == "redis-data-integration" ]]; then
207239
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/integrate/${product}"
240+
elif [[ "${product}" == "redisvl" ]]; then
241+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/develop/ai/${product}"
208242
else
209243
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
210244
fi

.github/workflows/main.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ jobs:
6565
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6666
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6767
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
68+
redisvl_versions=($(find content/develop/ai/redisvl/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6869
6970
printf "%s\n" "${kubernetes_versions[@]}" > kubernetes-versions
7071
printf "%s\n" "${rs_versions[@]}" > rs-versions
7172
printf "%s\n" "${rdi_versions[@]}" > rdi-versions
73+
printf "%s\n" "${redisvl_versions[@]}" > redisvl-versions
7274
7375
# build latest
7476
for version in "${kubernetes_versions[@]}"; do
@@ -80,6 +82,9 @@ jobs:
8082
for version in "${rdi_versions[@]}"; do
8183
rm -r "content/integrate/redis-data-integration/${version}"
8284
done
85+
for version in "${redisvl_versions[@]}"; do
86+
rm -r "content/develop/ai/redisvl/${version}"
87+
done
8388
make all
8489
8590
git checkout .
@@ -166,6 +171,33 @@ jobs:
166171
git checkout .
167172
done
168173
174+
for version in "${redisvl_versions[@]}"; do
175+
176+
setBaseUrl
177+
178+
# for each version, remove all other versions before building
179+
versions_to_remove=($(echo "${redisvl_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
180+
for version_to_remove in "${versions_to_remove[@]}"; do
181+
rm -r "content/develop/ai/redisvl/${version_to_remove}"
182+
done
183+
184+
# relrefs should not include version
185+
find "content/develop/ai/redisvl/${version}" -type f | while read file; do
186+
awk '{gsub(/\(\{\{< ?relref "\/develop\/ai\/redisvl\/'${version}'/, "({{< relref \"/develop/ai/redisvl") }1' "$file" > tmpfile && mv tmpfile "$file"
187+
done
188+
189+
rsync -a --delete-after "content/develop/ai/redisvl/${version}"/ content/develop/ai/redisvl/
190+
sed -i 's/id="versionSelectorRedisvlValue" class="version-selector-control">latest/id="versionSelectorRedisvlValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
191+
sed -i 's/linkTitle: '"${version}"'/linkTitle: RedisVL/' content/develop/ai/redisvl/_index.md
192+
193+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
194+
sed -i "12i \{\{ \$gh_path = replaceRE \`\^develop\/ai\/redisvl\/\` \"develop\/ai\/redisvl\/$version\/\" \$gh_path }}" layouts/partials/meta-links.html
195+
196+
hugo -d "redisvl-${version}"
197+
198+
git checkout .
199+
done
200+
169201
- name: List client examples
170202
run: ls "${{ github.workspace }}/examples"
171203
- name: List files to be published
@@ -211,6 +243,9 @@ jobs:
211243
if [[ "${product}" == "redis-data-integration" ]]; then
212244
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
213245
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/integrate/${product}/${version}"
246+
elif [[ "${product}" == "redisvl" ]]; then
247+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}" "gs://${BUCKET}/${versioned_build}/develop/ai/${product}"
248+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/develop/ai/${product}/${version}"
214249
else
215250
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
216251
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/${version}" "gs://${BUCKET}/docs/$bucket_path/operate/${product}/${version}"
@@ -235,6 +270,9 @@ jobs:
235270
if [[ "${product}" == "redis-data-integration" ]]; then
236271
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/integrate/${product}"
237272
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/integrate/${product}/${version}"
273+
elif [[ "${product}" == "redisvl" ]]; then
274+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/develop/ai/${product}"
275+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/develop/ai/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/develop/ai/${product}/${version}"
238276
else
239277
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
240278
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}/${version}" "gs://${BUCKET}/docs/${bucket_path}/operate/${product}/${version}"

.github/workflows/redisvl_docs_sync.yaml

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,30 @@ on:
66
workflow_dispatch: # or run on manual trigger
77

88
jobs:
9+
define-version-matrix:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
matrix: ${{ steps.set-matrix.outputs.matrix }}
13+
steps:
14+
- id: set-matrix
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
OLDEST_SUPPORTED_VERSION="0.6.0"
19+
versions=$(gh release -R redis/redis-vl-python list --json name,isLatest \
20+
| jq -r '.[] | [.name, .isLatest] | @tsv' \
21+
| sed "/${OLDEST_SUPPORTED_VERSION}/q" \
22+
| jq -Rnc '{include: [inputs | split("\t") | {version: .[0], isLatest: .[1]}]}')
23+
24+
echo "${versions}"
25+
echo "matrix=${versions}" >> "$GITHUB_OUTPUT"
26+
927
redisvl_docs_sync:
1028
runs-on: ubuntu-latest
29+
needs: define-version-matrix
30+
strategy:
31+
matrix: ${{ fromJSON(needs['define-version-matrix'].outputs.matrix) }}
32+
fail-fast: false
1133
permissions:
1234
contents: write
1335
pull-requests: write
@@ -30,20 +52,25 @@ jobs:
3052
env:
3153
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3254
run: |
33-
pushd redis-vl-python
55+
version="${{ matrix.version }}"
56+
isLatest="${{ matrix.isLatest }}"
3457
35-
# Get latest release
36-
latest_release=$(gh release -R redis/redis-vl-python list --json name,isLatest --jq '.[] | select(.isLatest)|.name')
37-
git checkout "tags/${latest_release}" || git checkout "tags/v${latest_release}"
58+
pushd redis-vl-python
59+
git checkout "tags/${version}" || git checkout "tags/v${version}"
3860
pip3 install -e .
39-
4061
popd
41-
sphinx-build -M markdown ./redis-vl-python/docs ./build
42-
43-
echo "release=${latest_release}" >> "$GITHUB_OUTPUT"
62+
63+
if [ ${isLatest} = true ]; then
64+
sphinx-build -M markdown ./redis-vl-python/docs ./build-latest
65+
else
66+
sphinx-build -M markdown ./redis-vl-python/docs ./build-${version}
67+
fi
4468
4569
- name: 'Format markdown files for hugo compatibility'
4670
run: |
71+
version="${{ matrix.version }}"
72+
isLatest="${{ matrix.isLatest }}"
73+
4774
#!/bin/bash
4875
mkdir -p redis_vl_hugo/user_guide/
4976
mkdir redis_vl_hugo/overview/
@@ -65,13 +92,22 @@ jobs:
6592
alias=$(echo ${src} | sed -E 's|./redis_vl_hugo/|/integrate/redisvl/| ; s|\.md$|| ; s|\/_index$||')
6693
6794
# Inject frontmatter in destination file
95+
if [ ${isLatest} = true ]; then
6896
cat >_tmp <<EOL
6997
---
7098
linkTitle: ${linkTitle}
7199
title: ${title}
72100
aliases:
73101
- ${alias}
74102
EOL
103+
else
104+
cat >_tmp <<EOL
105+
---
106+
linkTitle: ${linkTitle}
107+
title: ${title}
108+
EOL
109+
fi
110+
75111
76112
# Inject weight property for index pages to preserve order
77113
case "${title}" in
@@ -110,12 +146,13 @@ jobs:
110146
}
111147
112148
# Convert jupyter notebooks to markdown
113-
jupyter nbconvert --to markdown build/jupyter_execute/user_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/ 2>/dev/null
114-
jupyter nbconvert --to markdown build/jupyter_execute/overview/cli.ipynb --output-dir redis_vl_hugo/overview/ 2>/dev/null
149+
build_folder=$(echo build-*)
150+
jupyter nbconvert --to markdown ${build_folder}/jupyter_execute/user_guide/*.ipynb --output-dir redis_vl_hugo/user_guide/ 2>/dev/null
151+
jupyter nbconvert --to markdown ${build_folder}/jupyter_execute/overview/cli.ipynb --output-dir redis_vl_hugo/overview/ 2>/dev/null
115152
116153
# Prepare markdown files
117-
rsync -a ./build/markdown/api/ ./redis_vl_hugo/api/ --exclude=index.md
118-
cp ./build/markdown/overview/installation.md ./redis_vl_hugo/overview/installation.md
154+
rsync -a ./${build_folder}/markdown/api/ ./redis_vl_hugo/api/ --exclude=index.md
155+
cp ./${build_folder}/markdown/overview/installation.md ./redis_vl_hugo/overview/installation.md
119156
120157
# Format markdown files
121158
shopt -s globstar
@@ -211,9 +248,9 @@ jobs:
211248
done
212249
213250
# Format _index.md pages
214-
cp ./build/markdown/api/index.md ./redis_vl_hugo/api/_index.md
215-
cp ./build/markdown/user_guide/index.md ./redis_vl_hugo/user_guide/_index.md
216-
cp ./build/markdown/overview/index.md ./redis_vl_hugo/overview/_index.md
251+
cp ./${build_folder}/markdown/api/index.md ./redis_vl_hugo/api/_index.md
252+
cp ./${build_folder}/markdown/user_guide/index.md ./redis_vl_hugo/user_guide/_index.md
253+
cp ./${build_folder}/markdown/overview/index.md ./redis_vl_hugo/overview/_index.md
217254
218255
index_markdown_pages=(
219256
./redis_vl_hugo/api/_index.md
@@ -237,13 +274,21 @@ jobs:
237274
fi
238275
done
239276
240-
cp -r redis_vl_hugo/* content/develop/ai/redisvl/
277+
if [ ${isLatest} = true ]; then
278+
cp -r redis_vl_hugo/* content/develop/ai/redisvl/
279+
else
280+
mkdir -p content/develop/ai/redisvl/${version}/
281+
cp -r redis_vl_hugo/* content/develop/ai/redisvl/${version}/
282+
cp content/develop/ai/redisvl/_index.md content/develop/ai/redisvl/${version}/_index.md
283+
cp content/develop/ai/redisvl/install.md content/develop/ai/redisvl/${version}/install.md
284+
python3 build/version_archiver.py redisvl ${version} --skip-archive
285+
fi
241286
242287
- name: 'Create pull request if necessary'
243288
env:
244289
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245290
run: |
246-
release="${{ steps.sphinx.outputs.release }}"
291+
release="${{ matrix.version }}"
247292
branch="redisvl_docs_sync_${release}"
248293
redisvl_change=false
249294
@@ -254,7 +299,7 @@ jobs:
254299
if [ "$?" -eq 0 ]; then
255300
set -e
256301
# if it does, create local branch off existing remote branch
257-
git checkout -b "${branch}" "origin/${branch}"
302+
git checkout -f -b "${branch}" "origin/${branch}"
258303
git branch --set-upstream-to="origin/${branch}" "${branch}"
259304
git pull
260305
else
@@ -263,9 +308,11 @@ jobs:
263308
git checkout -b "${branch}"
264309
fi
265310
266-
redisvl_is_different=$(git diff content/develop/ai/redisvl/)
311+
set +e
312+
latest_redisvl_release_is_different=$(git diff content/develop/ai/redisvl/)
313+
new_release=$(git ls-files --others --directory | grep content/develop/ai/redisvl/${release})
267314
268-
if [[ ! -z $redisvl_is_different ]]; then
315+
if [[ -n "$latest_redisvl_release_is_different" || -n "$new_release" ]]; then
269316
redisvl_change=true
270317
271318
git add "content/develop/ai/redisvl/"

content/commands/acl-list.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ configuration file if you wish (but make sure to check [`ACL SAVE`]({{< relref "
4444
2) "user default on nopass ~* &* +@all"
4545
```
4646

47+
{{< note >}}
48+
In some cases, you might see `allchannels` instead of `&*` and `allkeys` instead of `~*` in the output. This is because `allchannels` and `allkeys` are aliases for `&*` and `~*` respectively.
49+
{{< /note>}}
50+
4751
## Return information
4852

4953
{{< multitabs id="acl-list-return-info"

content/commands/xackdel.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,38 @@ When using multiple consumer groups, users are encouraged to use `XACKDEL` with
125125

126126
## Examples
127127

128-
{{% redis-cli %}}
129-
XADD mystream * field1 value1
130-
XADD mystream * field2 value2
131-
XGROUP CREATE mystream mygroup 0
132-
XREADGROUP GROUP mygroup consumer1 COUNT 2 STREAMS mystream >
133-
XPENDING mystream mygroup
134-
XACKDEL mystream mygroup KEEPREF IDS 2 1526919030474-55 1526919030474-56
135-
XPENDING mystream mygroup
136-
XRANGE mystream - +
137-
{{% /redis-cli %}}
128+
```
129+
> XADD mystream * field1 value1
130+
"1755870377536-0"
131+
> XADD mystream * field2 value2
132+
"1755870387045-0"
133+
> XGROUP CREATE mystream mygroup 0
134+
OK
135+
> XREADGROUP GROUP mygroup consumer1 COUNT 2 STREAMS mystream >
136+
1) 1) "mystream"
137+
2) 1) 1) "1755870377536-0"
138+
2) 1) "field1"
139+
2) "value1"
140+
2) 1) "1755870387045-0"
141+
2) 1) "field2"
142+
2) "value2"
143+
> XPENDING mystream mygroup
144+
1) (integer) 2
145+
2) "1755870377536-0"
146+
3) "1755870387045-0"
147+
4) 1) 1) "consumer1"
148+
2) "2"
149+
> XACKDEL mystream mygroup KEEPREF IDS 2 1755870377536-0 1755870387045-0
150+
1) (integer) 1
151+
2) (integer) 1
152+
> XPENDING mystream mygroup
153+
1) (integer) 0
154+
2) (nil)
155+
3) (nil)
156+
4) (nil)
157+
> XRANGE mystream - +
158+
(empty array)
159+
```
138160

139161
## Return information
140162

0 commit comments

Comments
 (0)