Skip to content

Commit 8240805

Browse files
authored
Merge branch 'main' into refresh_ubi_docs
2 parents 6ba8662 + b50a3eb commit 8240805

File tree

203 files changed

+15074
-277
lines changed

Some content is hidden

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

203 files changed

+15074
-277
lines changed

.github/ISSUE_TEMPLATE/issue_template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ assignees: ''
1515

1616
**Tell us about your request.** Provide a summary of the request.
1717

18-
***Version:** List the OpenSearch version to which this issue applies, e.g. 2.14, 2.12--2.14, or all.
18+
**Version:** List the OpenSearch version to which this issue applies, e.g. 2.14, 2.12--2.14, or all.
1919

2020
**What other resources are available?** Provide links to related issues, POCs, steps for testing, etc.
21-

.github/vale/styles/Vocab/OpenSearch/Words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ p\d{2}
8585
[Pp]erformant
8686
[Pp]laintext
8787
[Pp]luggable
88+
[Pp]reaggregate(s|d)?
89+
[Pp]recompute(s|d)?
8890
[Pp]reconfigure
8991
[Pp]refetch
9092
[Pp]refilter
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lint and Test Jekyll Spec Insert
2+
on:
3+
push:
4+
paths:
5+
- 'spec-insert/**'
6+
pull_request:
7+
paths:
8+
- 'spec-insert/**'
9+
jobs:
10+
lint-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: ruby/setup-ruby@v1
15+
with: { ruby-version: 3.3.0 }
16+
- run: bundle install
17+
- working-directory: spec-insert
18+
run: |
19+
bundle exec rubocop
20+
bundle exec rspec
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update API Components
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 * * 0" # Every Sunday at midnight GMT
6+
jobs:
7+
update-api-components:
8+
if: ${{ github.repository == 'opensearch-project/documentation-website' }}
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
fetch-depth: 0
18+
19+
- run: git config --global pull.rebase true
20+
21+
- uses: ruby/setup-ruby@v1
22+
with: { ruby-version: 3.3.0 }
23+
24+
- run: bundle install
25+
26+
- name: Download spec and insert into documentation
27+
run: bundle exec jekyll spec-insert
28+
29+
- name: Get current date
30+
id: date
31+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
32+
33+
- name: GitHub App token
34+
id: github_app_token
35+
uses: tibdex/github-app-token@v2.1.0
36+
with:
37+
app_id: ${{ secrets.APP_ID }}
38+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
39+
40+
- name: Create pull request
41+
uses: peter-evans/create-pull-request@v6
42+
with:
43+
token: ${{ steps.github_app_token.outputs.token }}
44+
commit-message: "Updated API components to reflect the latest OpenSearch API spec (${{ env.date }})"
45+
title: "[AUTOCUT] Update API components to reflect the latest OpenSearch API spec (${{ env.date }})"
46+
body: |
47+
Update API components to reflect the latest [OpenSearch API spec](https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml).
48+
Date: ${{ env.date }}
49+
branch: update-api-components-${{ env.date }}
50+
base: main
51+
signoff: true
52+
labels: autocut

CONTRIBUTING.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Follow these steps to set up your local copy of the repository:
8484

8585
```
8686
curl -sSL https://get.rvm.io | bash -s stable
87-
rvm install 3.2.4
87+
rvm install 3.3.2
8888
ruby -v
8989
```
9090

@@ -158,6 +158,23 @@ To ensure that our documentation adheres to the [OpenSearch Project Style Guidel
158158

159159
Optionally, you can install the [Vale VSCode](https://github.com/chrischinchilla/vale-vscode) extension, which integrates Vale with Visual Studio Code. By default, only _errors_ and _warnings_ are underlined. To change the minimum alert level to include _suggestions_, go to **Vale VSCode** > **Extension Settings** and select **suggestion** in the **Vale > Vale CLI: Min Alert Level** dropdown list.
160160

161+
## Troubleshooting
162+
163+
This section provides information about potential solutions for known issues.
164+
165+
### Installing Ruby on an Apple silicon machine
166+
167+
If you're having trouble installing Ruby with `rvm` on an Apple silicon machine, it could be because of an OpenSSL version misalignment. To fix this issue, use the following command, replacing `<openssl-version>` with your [desired version](https://github.com/ruby/openssl/blob/master/README.md):
168+
169+
```
170+
# Assumes Brew is installed
171+
curl -sSL https://get.rvm.io | bash -s stable
172+
rvm install 3.2.4 --with-openssl-dir=$(brew --prefix openssl@<openssl-version>)
173+
ruby -v
174+
```
175+
161176
## Getting help
162177

163178
For help with the contribution process, reach out to one of the [points of contact](README.md#points-of-contact).
179+
180+

DEVELOPER_GUIDE.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Developer guide
2+
- [Introduction](#introduction)
3+
- [Starting the Jekyll server locally](#starting-the-jekyll-server-locally)
4+
- [Using the spec-insert Jekyll plugin](#using-the-spec-insert-jekyll-plugin)
5+
- [Ignoring files and folders](#ignoring-files-and-folders)
6+
- [CI/CD](#cicd)
7+
- [Spec insert components](#spec-insert-components)
8+
- [Query parameters](#query-parameters)
9+
- [Path parameters](#path-parameters)
10+
- [Paths and HTTP methods](#paths-and-http-methods)
11+
12+
## Introduction
13+
14+
The `.md` documents in this repository are rendered into HTML pages using [Jekyll](https://jekyllrb.com/). These HTML pages are hosted on [opensearch.org](https://opensearch.org/docs/latest/).
15+
16+
## Starting the Jekyll server locally
17+
You can run the Jekyll server locally to view the rendered HTML pages using the following steps:
18+
19+
1. Install [Ruby](https://www.ruby-lang.org/en/documentation/installation/) 3.1.0 or later for your operating system.
20+
2. Install the required gems by running `bundle install`.
21+
3. Run `bundle exec jekyll serve` to start the Jekyll server locally (this can take several minutes to complete).
22+
4. Open your browser and navigate to `http://localhost:4000` to view the rendered HTML pages.
23+
24+
## Using the `spec-insert` Jekyll plugin
25+
The `spec-insert` Jekyll plugin is used to insert API components into Markdown files. The plugin downloads the [latest OpenSearch specification](https://github.com/opensearch-project/opensearch-api-specification) and renders the API components from the spec. This aims to reduce the manual effort required to keep the documentation up to date.
26+
27+
To use this plugin, make sure that you have installed Ruby 3.1.0 or later and the required gems by running `bundle install`.
28+
29+
Edit your Markdown file and insert the following snippet where you want render an API component:
30+
31+
```markdown
32+
<!-- spec_insert_start
33+
api: <API_NAME>
34+
component: <COMPONENT_NAME>
35+
other_argument: <OTHER_ARGUMENT>
36+
-->
37+
38+
This is where the API component will be inserted.
39+
Everything between the `spec_insert_start` and `spec_insert_end` tags will be overwritten.
40+
41+
<!-- spec_insert_end -->
42+
```
43+
44+
Then run the following Jekyll command to render the API components:
45+
```shell
46+
bundle exec jekyll spec-insert
47+
```
48+
49+
If you are working on multiple Markdown files and do not want to keep running the `jekyll spec-insert` command, you can add the `--watch` (or `-W`) flag to the command to watch for changes in the Markdown files and automatically render the API components:
50+
51+
```shell
52+
bundle exec jekyll spec-insert --watch
53+
```
54+
55+
Depending on the text editor you are using, you may need to manually reload the file from disk to see the changes applied by the plugin if the editor does not automatically reload the file periodically.
56+
57+
The plugin will pull the newest OpenSearch API spec from its [repository](https://github.com/opensearch-project/opensearch-api-specification) if the spec file does not exist locally or if it is older than 24 hours. To tell the plugin to always pull the newest spec, you can add the `--refresh-spec` (or `-R`) flag to the command:
58+
59+
```shell
60+
bundle exec jekyll spec-insert --refresh-spec
61+
```
62+
63+
### Ignoring files and folders
64+
The `spec-insert` plugin ignores all files and folders listed in the [./_config.yml#exclude](./_config.yml) list, which is also the list of files and folders that Jekyll ignores.
65+
66+
## CI/CD
67+
The `spec-insert` plugin is run as part of the CI/CD pipeline to ensure that the API components are up to date in the documentation. This is performed through the [update-api-components.yml](.github/workflows/update-api-components.yml) GitHub Actions workflow, which creates a pull request containing the updated API components every Sunday.
68+
69+
## Spec insert components
70+
All spec insert components accept the following arguments:
71+
- `api` (String; required): The name of the API to render the component from. This is equivalent to the `x-operation-group` field in the OpenSearch OpenAPI Spec.
72+
- `component` (String; required): The name of the component to render, such as `query_parameters`, `path_parameters`, or `paths_and_http_methods`.
73+
- `omit_header` (Boolean; Default is `false`): If set to `true`, the markdown header of the component will not be rendered.
74+
75+
### Paths and HTTP methods
76+
To insert paths and HTTP methods for the `search` API, use the following snippet:
77+
```markdown
78+
<!-- spec_insert_start
79+
api: search
80+
component: paths_and_http_methods
81+
-->
82+
<!-- spec_insert_end -->
83+
```
84+
85+
### Path parameters
86+
87+
To insert a path parameters table of the `indices.create` API, use the following snippet. Use the `x-operation-group` field from OpenSearch OpenAPI Spec for the `api` value:
88+
89+
```markdown
90+
<!-- spec_insert_start
91+
api: indices.create
92+
component: path_parameters
93+
-->
94+
<!-- spec_insert_end -->
95+
```
96+
This table accepts the same arguments as the query parameters table except the `include_global` argument.
97+
98+
### Query parameters
99+
To insert the API query parameters table of the `cat.indices` API, use the following snippet:
100+
```markdown
101+
<!-- spec_insert_start
102+
api: cat.indices
103+
component: query_parameters
104+
-->
105+
<!-- spec_insert_end -->
106+
```
107+
108+
This will insert the query parameters of the `cat.indices` API into the `.md` file with three default columns: `Parameter`, `Type`, and `Description`. You can customize the query parameters table by adding the `columns` argument which accepts a comma-separated list of column names. The available column names are:
109+
110+
- `Parameter`
111+
- `Type`
112+
- `Description`
113+
- `Required`
114+
- `Default`
115+
116+
_When `Required`/`Default` is not chosen, the information will be written in the `Description` column._
117+
118+
You can also customize this component with the following settings:
119+
120+
- `include_global` (Boolean; default is `false`): Includes global query parameters in the table.
121+
- `include_deprecated` (Boolean; default is `true`): Includes deprecated parameters in the table.
122+
- `pretty` (Boolean; default is `false`): Renders the table in the pretty format instead of the compact format.
123+
124+
The following snippet inserts the specified columns into the query parameters table:
125+
126+
```markdown
127+
<!-- spec_insert_start
128+
api: cat.indices
129+
component: query_parameters
130+
include_global: true
131+
include_deprecated: false
132+
pretty: true
133+
-->
134+
<!-- spec_insert_end -->
135+
```

Gemfile

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
source "http://rubygems.org"
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Manually add csv gem since Ruby 3.4.0 no longer includes it
6+
gem 'csv', '~> 3.0'
27

38
# Hello! This is where you manage which Jekyll version is used to run.
49
# When you want to use a different version, change it below, save the
@@ -8,12 +13,12 @@ source "http://rubygems.org"
813
#
914
# This will help ensure the proper Jekyll version is running.
1015
# Happy Jekylling!
11-
gem "jekyll", "~> 4.3.2"
16+
gem 'jekyll', '~> 4.3.2'
1217

1318
# This is the default theme for new Jekyll sites. You may change this to anything you like.
14-
gem "just-the-docs", "~> 0.3.3"
15-
gem "jekyll-remote-theme", "~> 0.4"
16-
gem "jekyll-redirect-from", "~> 0.16"
19+
gem 'jekyll-redirect-from', '~> 0.16'
20+
gem 'jekyll-remote-theme', '~> 0.4'
21+
gem 'just-the-docs', '~> 0.3.3'
1722

1823
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
1924
# uncomment the line below. To upgrade, run `bundle update github-pages`.
@@ -22,21 +27,31 @@ gem "jekyll-redirect-from", "~> 0.16"
2227

2328
# If you have any plugins, put them here!
2429
group :jekyll_plugins do
25-
gem "jekyll-last-modified-at"
26-
gem "jekyll-sitemap"
30+
gem 'jekyll-last-modified-at'
31+
gem 'jekyll-sitemap'
32+
gem 'jekyll-spec-insert', :path => './spec-insert'
2733
end
2834

2935
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
30-
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
36+
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
3137

3238
# Performance-booster for watching directories on Windows
33-
gem "wdm", "~> 0.1.0" if Gem.win_platform?
39+
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
3440

3541
# Installs webrick dependency for building locally
36-
gem "webrick", "~> 1.7"
37-
42+
gem 'webrick', '~> 1.7'
3843

3944
# Link checker
40-
gem "typhoeus"
41-
gem "ruby-link-checker"
42-
gem "ruby-enum"
45+
gem 'ruby-enum'
46+
gem 'ruby-link-checker'
47+
gem 'typhoeus'
48+
49+
# Spec Insert
50+
gem 'activesupport', '~> 7'
51+
gem 'mustache', '~> 1'
52+
53+
group :development, :test do
54+
gem 'rspec'
55+
gem 'rubocop', '~> 1.44', require: false
56+
gem 'rubocop-rake', require: false
57+
end

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# About the OpenSearch documentation repo
44

55
The `documentation-website` repository contains the user documentation for OpenSearch. You can find the rendered documentation at [opensearch.org/docs](https://opensearch.org/docs).
6+
The markdown files in this repository are rendered into HTML pages using [Jekyll](https://jekyllrb.com/). Check the [DEVELOPER_GUIDE](DEVELOPER_GUIDE.md) for more information about how to use Jekyll for this repository.
67

78

89
## Contributing

TERMS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,10 @@ Tools inside of OpenSearch that can be customized to enhance OpenSearch's functi
604604

605605
**pop-up**
606606

607+
**preaggregate**
608+
609+
**precompute**
610+
607611
**premise, premises**
608612

609613
With reference to property and buildings, always form as plural.

_about/version-history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permalink: /version-history/
99

1010
OpenSearch version | Release highlights | Release date
1111
:--- | :--- | :---
12+
[2.18.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.18.0.md) | Adds a redesigned home page, updated Discover interface, and collaborative workspaces to OpenSearch Dashboards. Includes improvements to ML inference processor and query grouping. Introduces reranking by field and paginated CAT APIs. Includes experimental OpenSearch Dashboards Assistant capabilities. For a full list of release highlights, see the Release Notes. | 05 November 2024
1213
[2.17.1](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.17.1.md) | Includes bug fixes for ML Commons, anomaly detection, k-NN, and security analytics. Adds various infrastructure and maintenance updates. For a full list of release highlights, see the Release Notes. | 1 October 2024
1314
[2.17.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.17.0.md) | Includes disk-optimized vector search, binary quantization, and byte vector encoding in k-NN. Adds asynchronous batch ingestion for ML tasks. Provides search and query performance enhancements and a new custom trace source in trace analytics. Includes application-based configuration templates. For a full list of release highlights, see the Release Notes. | 17 September 2024
1415
[2.16.0](https://github.com/opensearch-project/opensearch-build/blob/main/release-notes/opensearch-release-notes-2.16.0.md) | Includes built-in byte vector quantization and binary vector support in k-NN. Adds new sort, split, and ML inference search processors for search pipelines. Provides application-based configuration templates and additional plugins to integrate multiple data sources in OpenSearch Dashboards. Includes an experimental Batch Predict ML Commons API. For a full list of release highlights, see the Release Notes. | 06 August 2024

0 commit comments

Comments
 (0)