Skip to content

Commit

Permalink
Merge branch 'main' into vector-database
Browse files Browse the repository at this point in the history
  • Loading branch information
hdhalter authored Apr 15, 2024
2 parents 2ead077 + 758bb17 commit a16f53d
Show file tree
Hide file tree
Showing 471 changed files with 24,763 additions and 3,336 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @hdhalter @kolchfa-aws @Naarcha-AWS @vagimeli @AMoo-Miki @natebower @dlvenable
* @hdhalter @kolchfa-aws @Naarcha-AWS @vagimeli @AMoo-Miki @natebower @dlvenable @scrawfor99 @epugh
2 changes: 0 additions & 2 deletions .github/dco.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/vale/styles/OpenSearch/AdverbsOfTime.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/vale/styles/OpenSearch/LinksDoubleParentheses.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extends: existence
message: "Remove double slashes from the link '%s'."
message: "Remove double parentheses from the link '%s'."
level: error
nonword: true
scope: raw
tokens:
- '\[.*\](\(){2,}.*(\)){1,}'
- '\[.*\](\(){1,}.*(\)){2,}'
- '\]\({2,}[^)]*?\){1,}'

2 changes: 1 addition & 1 deletion .github/vale/styles/OpenSearch/LinksDoubleSlash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ level: error
nonword: true
scope: raw
tokens:
- '\(\{\{site.url\}\}\{\{site.baseurl\}\}.*\/{2,}.*\)'
- '\(\{\{site.url\}\}\{\{site.baseurl\}\}[^)]*?\/{2,}[^)]*?\)'
2 changes: 1 addition & 1 deletion .github/vale/styles/OpenSearch/SpacingWords.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends: existence
message: "There should be once space between words in '%s'."
message: "There should be one space between words in '%s'."
level: error
nonword: true
tokens:
Expand Down
5 changes: 3 additions & 2 deletions .github/vale/styles/OpenSearch/SubstitutionsError.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ swap:
'Huggingface': Hugging Face
'indices': indexes
'ingestion pipeline': ingest pipeline
'keystore': key store
'key store': keystore
'key/value': key-value
'kmeans': k-means
'kNN': k-NN
'machine-learning': machine learning
Expand All @@ -46,7 +47,7 @@ swap:
'time stamp': timestamp
'timezone': time zone
'tradeoff': trade-off
'truststore': trust store
'trust store': truststore
'U.S.': US
'web page': webpage
'web site': website
Expand Down
2 changes: 2 additions & 0 deletions .github/vale/styles/Vocab/OpenSearch/Plugins/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Asynchronous Search plugin
Crypto plugin
Cross-Cluster Replication plugin
Custom Codecs plugin
Flow Framework plugin
Maps plugin
Notebooks plugin
Notifications plugin
Expand All @@ -19,6 +20,7 @@ ML Commons plugin
Neural Search plugin
Observability plugin
Performance Analyzer plugin
Query Insights plugin
Query Workbench plugin
Search Relevance plugin
Security plugin
Expand Down
2 changes: 2 additions & 0 deletions .github/vale/styles/Vocab/OpenSearch/Products/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Open Distro
OpenAI
OpenID Connect
OpenSearch
OpenSearch Assistant
OpenSearch Assistant Toolkit
OpenSearch Benchmark
OpenSearch Dashboards
OpenSearch Playground
Expand Down
12 changes: 12 additions & 0 deletions .github/vale/styles/Vocab/OpenSearch/Words/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ Boolean
[Dd]eallocate
[Dd]eduplicates?
[Dd]eduplication
[Dd]eprovision(s|ed|ing)?
[Dd]eserialize
[Dd]eserialization
Dev
[Dd]iscoverability
Distro
[Dd]ownvote(s|d)?
[Dd]uplicative
[Ee]gress
[Ee]num
Expand Down Expand Up @@ -75,7 +77,11 @@ Levenshtein
[Mm]ultivalued
[Mm]ultiword
[Nn]amespace
[Oo]versamples?
[Oo]nboarding
pebibyte
[Pp]erformant
[Pp]laintext
[Pp]luggable
[Pp]reconfigure
[Pp]refetch
Expand All @@ -87,6 +93,7 @@ pebibyte
[Pp]reprocess
[Pp]retrain
[Pp]seudocode
[Quantiz](e|ation|ing|er)
[Rr]ebalance
[Rr]ebalancing
[Rr]edownload
Expand All @@ -103,6 +110,7 @@ pebibyte
[Ss]erverless
[Ss]harding
[Ss]ignificand
[Ss]napshott(ed|ing)
stdout
[Ss]temmers?
[Ss]ubaggregation
Expand All @@ -117,21 +125,25 @@ stdout
[Ss]ubvector
[Ss]ubwords?
[Ss]uperset
[Ss]yslog
tebibyte
[Tt]emplated
[Tt]okenization
[Tt]okenizer?
[Tt]ooltip
[Tt]ranslog
[Tt]ruststore
[Uu]nary
[Uu]ncheck
[Uu]ncomment
[Uu]ndeploy
[Uu]nigram
[Uu]nnesting
[Uu]nrecovered
[Uu]nregister(s|ed|ing)?
[Uu]pdatable
[Uu]psert
[Uu]pvote(s|d)?
[Ww]alkthrough
[Ww]ebpage
xy
2 changes: 0 additions & 2 deletions .github/vale/tests/test-style-neg.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This sentence tests Advanced Placement (AP). We should define AP before using.

Then this sentence tests adverbs of time.

This sentence tests cybersecurity.

This sentence tests dash---spacing.
Expand Down
2 changes: 0 additions & 2 deletions .github/vale/tests/test-style-pos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This sentence tests AP. AP should be defined before using.

Then, this sentence tests adverbs of time.

This sentence tests cyber security.

This sentence tests dash --- spacing.
Expand Down
Binary file not shown.
33 changes: 33 additions & 0 deletions .github/workflows/automerge-backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Automerge Backport
on:
pull_request:
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
jobs:
automerge-backport:
if: |
github.repository == 'opensearch-project/documentation-website' &&
startsWith(github.event.pull_request.head.ref, 'backport/')
runs-on: ubuntu-latest
steps:
- name: Wait some time so that label and approval is up
run: sleep 30
- id: automerge
name: automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: "backport-automerge,!On hold"
MERGE_FILTER_AUTHOR: "opensearch-trigger-bot[bot]"
MERGE_REQUIRED_APPROVALS: "1"
MERGE_RETRIES: "20"
MERGE_RETRY_SLEEP: "10000"
MERGE_ERROR_FAIL: "true"
MERGE_FORKS: "false"
MERGE_METHOD: "squash"
MERGE_DELETE_BRANCH: "true"
23 changes: 23 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& github.repository == 'opensearch-project/documentation-website'
&& (
github.event.action == 'closed'
|| (
Expand All @@ -38,3 +39,25 @@ jobs:
with:
github_token: ${{ steps.github_app_token.outputs.token }}
head_template: backport/backport-<%= number %>-to-<%= base %>

- name: Label new backport PR with backport-automerge label
run: |
PR_LABELS=`echo "${{ toJson(github.event.pull_request.labels.*.name) }}" | sed -e 's/\[//g;s/\]//g;s/^\s*//g;s/\s*$//g' | tr -d '\n'`
echo $PR_LABELS
OLDIFS=$IFS
export IFS=','
for label in $PR_LABELS
do
if [[ "$label" == "backport"* ]]; then
echo "Found label \"$label\""
PR_REPO="opensearch-project/documentation-website"
PR_BRANCH=backport/backport-${{ github.event.pull_request.number }}-to-`echo $label | cut -d ' ' -f2`
PR_NUMBER=`gh pr list -R $PR_REPO --json "number,headRefName" --state open | jq -r ".[] | select(.headRefName == \"$PR_BRANCH\") | .number"`
echo "Update Backport PR '#$PR_NUMBER' on branch '$PR_BRANCH' with 'backport-automerge' label"
gh issue edit -R $PR_REPO $PR_NUMBER --add-label backport-automerge
echo "Auto approve $PR_REPO PR #$PR_NUMBER with opensearch-trigger-bot"
gh pr review -R $PR_REPO $PR_NUMBER --approve
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/delete_backport_branch.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/delete_merged_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Delete merged branch of the PRs
on:
pull_request:
types:
- closed

jobs:
delete-branch:
runs-on: ubuntu-latest
if: |
github.repository == 'opensearch-project/documentation-website' &&
${{ !startsWith(github.event.pull_request.head.ref, 'main') }} &&
${{ !startsWith(github.event.pull_request.head.ref, '1.') }} &&
${{ !startsWith(github.event.pull_request.head.ref, '2.') }} &&
${{ !startsWith(github.event.pull_request.head.ref, 'version/') }}
steps:
- name: Echo remove branch
run: echo Removing ${{github.event.pull_request.head.ref}}
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/encoding-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Encoding Checker

on: [pull_request]

jobs:
encoding-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check for possible file that does not follow utf-8 encoding
run: |
set +e
IFS=$(echo -en "\n\b")
COUNTER=0
for i in `find . -type f \( -name "*.txt" -o -name "*.md" -o -name "*.markdown" -o -name "*.html" \) | grep -vE "^./.git"`;
do
grep -axv '.*' "$i"
if [ "$?" -eq 0 ]; then
echo -e "######################\n$i\n######################"
COUNTER=$(( COUNTER + 1 ))
fi
done
if [ "$COUNTER" != 0 ]; then
echo "Found files that is not following utf-8 encoding, exit 1"
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/jekyll-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Jekyll Build Verification
on: [pull_request]

jobs:
check:
jekyll-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: '3.2'
bundler-cache: true
- run: |
JEKYLL_FATAL_LINK_CHECKER=internal bundle exec jekyll build --future
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: "30 11 * * 0"
jobs:
check:
link-checker:
if: github.repository == 'opensearch-project/documentation-website'
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Style check
name: Style Check

on:
pull_request:
Expand All @@ -20,4 +20,5 @@ jobs:
reporter: github-pr-check
filter_mode: added
vale_flags: "--no-exit"
version: 2.28.0
version: 2.28.0
continue-on-error: true
1 change: 0 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Vale.Spelling = NO
Vale.Repetition = NO
Vale.Terms = YES
OpenSearch.AcronymParentheses = YES
OpenSearch.AdverbsOfTime = YES
OpenSearch.Ampersand = YES
OpenSearch.Cyber = YES
OpenSearch.DashSpacing = YES
Expand Down
Loading

0 comments on commit a16f53d

Please sign in to comment.