Skip to content

Commit

Permalink
Merge branch 'main' into listAPISpecs
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Garg <[email protected]>
  • Loading branch information
Harsh Garg committed Oct 23, 2024
2 parents eef5a97 + abc7163 commit 5cae9b9
Show file tree
Hide file tree
Showing 47 changed files with 1,453 additions and 394 deletions.
4 changes: 4 additions & 0 deletions .cspell
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Nanos
nbest
nfkc
ngram
nguyenvukhang
niofs
nmslib
nodeattrs
Expand Down Expand Up @@ -158,13 +159,15 @@ Rudnick
ruleset
scriptless
securityconfig
signoff
slowlog
Slowlog
slurpfile
smartcn
Smartcn
snapshotted
softmax
softprops
Sorani
sslinfo
stoptags
Expand All @@ -181,6 +184,7 @@ tenantinfo
termvectors
tfidf
Tfidf
thomaseizinger
Tika
tlbr
tokenfilters
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Draft a Release

on:
push:
tags:
- 'v*.*.*'

jobs:
draft-a-release:
name: Draft a Release
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Get Current Version
id: current
run: |
echo version=$(yq .version spec/_info.yaml) >> "$GITHUB_OUTPUT"
- name: Check Version
run: |
echo current=v${{ steps.current.outputs.version }}
echo tag=${{ github.ref_name }}
if "v${{ steps.current.outputs.version }}" != "${{ github.ref_name }}"; then
echo "::error::Failing, reason: version ${{ steps.current.outputs.version }} does not match tag ${{ github.ref_name }}."
exit 1
else
echo "::notice::Found version ${{ steps.current.outputs.version }}, all good."
fi
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Build
run: npm ci && npm run merge

- name: Upload Artifacts
id: upload
uses: actions/upload-artifact@v4
with:
name: build
path: |
build/*
- name: Extract Changelog
id: changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: Unreleased
no-print-matched-heading: true

- name: Draft a release
uses: softprops/action-gh-release@v2
id: release
with:
draft: true
generate_release_notes: false
tag_name: ${{ github.ref_name }}
body: |
${{ steps.changelog.outputs.markdown }}
### Links
- [Build Artifact](${{ steps.upload.outputs.artifact-url }})
files: |
LICENSE.txt
build/*
- name: Increment Version
uses: nguyenvukhang/semver-increment@v1
id: version
with:
increment: patch
version-file: spec/_info.yaml
version-regex: '^version: (.*)'

- name: Update CHANGELOG to the Next Developer Iteration
uses: thomaseizinger/keep-a-changelog-new-release@v3
with:
tag: ${{ github.ref_name }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Preparing for next developer iteration ${{ steps.version.outputs.version }}.'
signoff: true
branch: prepare-v-next
base: main
delete-branch: true
title: 'Preparing for next developer iteration, ${{ steps.version.outputs.version }}.'
body: |
I've drafted a release, [${{ github.ref_name }}](${{ steps.release.outputs.url }}), please verify and release it.
Preparing for the next developer iteration, ${{ steps.version.outputs.version }}.
4 changes: 4 additions & 0 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
tests: snapshot
- version: 2.17.0
tests: plugins/streaming
- version: 2.17.0
tests: plugins/notifications
- version: 2.17.0
tests: plugins/query_insights
- version: 2.18.0
hub: opensearchstaging
ref: '@sha256:83e56824438188322f2d477b262e4b55aa3e4d0c03c6f9b2f27de4ecfafc9a62'
Expand Down
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
https://localhost:*
http://webhook:8080
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added the `context` query param to the `put_script` APIs ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))
- Added `persian_stem` filter ([#592](https://github.com/opensearch-project/opensearch-api-specification/pull/592))
- Added `404` response for `DELETE /{index}`, `GET /{index}/_doc/{id}`, `DELETE /{index}/_doc/{id}` ([#589](https://github.com/opensearch-project/opensearch-api-specification/pull/589))
- Added ability to pass `InlineScript` as a simple string ([#605](https://github.com/opensearch-project/opensearch-api-specification/pull/605))
- Added `config_id` and `config_id_list` to `/_plugins/_notifications/configs` query parameters ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594))
- Added a release workflow triggered on a tag ([#635](https://github.com/opensearch-project/opensearch-api-specification/pull/635))
- Added API spec for query insights plugin ([#625](https://github.com/opensearch-project/opensearch-api-specification/pull/625))

### Changed

Expand Down Expand Up @@ -133,6 +137,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Removed the ability to skip an individual spec test ([#358](https://github.com/opensearch-project/opensearch-api-specification/pull/358))
- Removed `shape` query ([#531](https://github.com/opensearch-project/opensearch-api-specification/pull/531))
- Removed unsupported DataStream Lifecycle types ([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))
- Removed unsupported runtime field types ([#634](https://github.com/opensearch-project/opensearch-api-specification/pull/634))

### Fixed

Expand Down Expand Up @@ -172,8 +177,11 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed create/delete/index operation in `_bulk` ([#582](https://github.com/opensearch-project/opensearch-api-specification/pull/582))
- Add `mode` and `compression` to k-NN index creation and search, and add `rescore` and `oversample_factor` to k-NN search ([#588](https://github.com/opensearch-project/opensearch-api-specification/pull/588))
- Fixed `/{index}/_search` with aggregations ([#576](https://github.com/opensearch-project/opensearch-api-specification/pull/576))
- Fixed inaccurate numeric type ([#597](https://github.com/opensearch-project/opensearch-api-specification/pull/597))([#598](https://github.com/opensearch-project/opensearch-api-specification/pull/598))([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))
- Fixed inaccurate numeric type ([#597](https://github.com/opensearch-project/opensearch-api-specification/pull/597))([#598](https://github.com/opensearch-project/opensearch-api-specification/pull/598))([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))([#612](https://github.com/opensearch-project/opensearch-api-specification/pull/612))
- Fixed mapping and analysis types ([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))
- Fixed `RestStatus` responses in `DELETE /_plugins/_notifications/configs/{config_id}` ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594))
- Fixed `GET /_snapshot_/{repository}/{snapshot}` ([#608](https://github.com/opensearch-project/opensearch-api-specification/pull/608))
- Fixed `POST /_snapshot/{repository}/{snapshot}/_restore` when `wait_for_completion` is `false` and `GET /{index}/_recovery` ([#611](https://github.com/opensearch-project/opensearch-api-specification/pull/611))

### Security

Expand Down
28 changes: 28 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
- [Overview](#overview)
- [Branching](#branching)
- [Release Branching](#release-branching)
- [Feature Branches](#feature-branches)
- [Release Labels](#release-labels)
- [Releasing](#releasing)

## Overview

This document explains the release strategy for opensearch-api-specification.

## Versioning

At this time this project follows minor semantic versioning, i.e. a breaking change is an increment from 0.1.0 to 0.2.0 and a non-breaking change is an increment from 0.1.0 to 0.1.1. A version 1.0 of the API specification will be released when the spec is known to be complete against any current version of OpenSearch.

## Branching

Given the early release stages of this repo we only maintain a **main** branch where all merges take place and code moves fast.

# Releasing

A release can be done by any [maintainer](MAINTAINERS.md).

1. Check out the [upstream repo](https://github.com/opensearch-project/opensearch-api-specification) and ensure the repo is up-to-date with `git pull origin main` and that you do not have any local changes.
2. Create a tag, e.g. `git tag v0.1.0`, and push it to GitHub with `git push origin --tags`.
3. The [release workflow](.github/workflows/release.yml) will be automatically kicked off, a draft release, and a pull request that increments the version in [spec/_info.yaml](spec/_info.yaml) will be created.
4. Verify and release the draft.
5. Approve, and merge the version increment pull request.
2 changes: 1 addition & 1 deletion spec/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$schema: ./json_schemas/_info.schema.yaml

title: OpenSearch API Specification
version: 1.0.0
version: 0.1.0
x-api-version: 2.16.0
Loading

0 comments on commit 5cae9b9

Please sign in to comment.