Skip to content

Commit 84dbd22

Browse files
committed
Merge branch 'main' into DOC-5550
2 parents e3137af + 2ff439c commit 84dbd22

File tree

346 files changed

+53432
-679
lines changed

Some content is hidden

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

346 files changed

+53432
-679
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: 70 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,24 @@ 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
286+
287+
# Globally replace unicode quotes to ASCII
288+
find content/develop/ai/redisvl/ -type f -exec sed -i 's/[“”]/"/g' {} \;
241289
242290
- name: 'Create pull request if necessary'
243291
env:
244292
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245293
run: |
246-
release="${{ steps.sphinx.outputs.release }}"
294+
release="${{ matrix.version }}"
247295
branch="redisvl_docs_sync_${release}"
248296
redisvl_change=false
249297
@@ -254,7 +302,7 @@ jobs:
254302
if [ "$?" -eq 0 ]; then
255303
set -e
256304
# if it does, create local branch off existing remote branch
257-
git checkout -b "${branch}" "origin/${branch}"
305+
git checkout -f -b "${branch}" "origin/${branch}"
258306
git branch --set-upstream-to="origin/${branch}" "${branch}"
259307
git pull
260308
else
@@ -263,9 +311,11 @@ jobs:
263311
git checkout -b "${branch}"
264312
fi
265313
266-
redisvl_is_different=$(git diff content/develop/ai/redisvl/)
314+
set +e
315+
latest_redisvl_release_is_different=$(git diff content/develop/ai/redisvl/)
316+
new_release=$(git ls-files --others --directory | grep content/develop/ai/redisvl/${release})
267317
268-
if [[ ! -z $redisvl_is_different ]]; then
318+
if [[ -n "$latest_redisvl_release_is_different" || -n "$new_release" ]]; then
269319
redisvl_change=true
270320
271321
git add "content/develop/ai/redisvl/"

assets/css/index.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,16 @@ select {
240240
}
241241

242242
.search-item {
243-
@apply bg-white rounded-md relative text-redis-ink-900 border border-redis-pen-800;
243+
@apply bg-gray-700 rounded-md relative text-gray-300 border border-gray-600;
244244
}
245245

246246
.search-item[aria-selected] {
247-
@apply bg-red-100;
247+
@apply bg-gray-600;
248248
}
249249

250250
.search-item:hover,
251251
.search-item:not([aria-selected]):focus-within {
252-
@apply bg-red-50 text-redis-pen-800;
252+
@apply bg-gray-600 text-white;
253253
}
254254

255255
.search-item > a {
@@ -701,7 +701,7 @@ html {
701701

702702
/* Names - Red (NameNamespace) */
703703
.chroma .nn {
704-
@apply text-red-400;
704+
@apply text-blue-400;
705705
}
706706

707707
/* Names - Green (NameTag) */

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/acl-log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Each log entry is composed of the following fields:
9292
5. `username`: The username that executed the command that caused the security events or the username that had a failed authentication attempt.
9393
6. `age-seconds`: Age of the log entry in seconds.
9494
7. `client-info`: Displays the client info of a client which caused one of the security events.
95-
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were lost, if they fell between periods.
95+
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were "lost", if they fell between periods.
9696
9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created.
9797
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.
9898

content/commands/cf.count.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ redis> CF.COUNT cf item2
6363

6464
## Return information
6565

66-
{{< multitabs id=cf-count-return-info"
66+
{{< multitabs id="cf-count-return-info"
6767
tab1="RESP2"
6868
tab2="RESP3" >}}
6969

content/commands/cf.del.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ redis> CF.DEL cf item2
7777

7878
## Return information
7979

80-
{{< multitabs id=cf-del-return-info"
80+
{{< multitabs id="cf-del-return-info"
8181
tab1="RESP2"
8282
tab2="RESP3" >}}
8383

content/commands/cf.info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ redis> CF.INFO cf
6464

6565
One of the following:
6666

67-
{{< multitabs id=cf-info-return-info"
67+
{{< multitabs id="cf-info-return-info"
6868
tab1="RESP2"
6969
tab2="RESP3" >}}
7070

content/commands/cf.insert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ redis> CF.INSERT cf2 ITEMS 1 1 1 1
109109

110110
## Return information
111111

112-
{{< multitabs id=cf-insert-return-info"
112+
{{< multitabs id="cf-insert-return-info"
113113
tab1="RESP2"
114114
tab2="RESP3" >}}
115115

0 commit comments

Comments
 (0)