Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docs and link checker workflow #139

Merged
merged 10 commits into from
Jun 25, 2021
23 changes: 23 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Link Checker
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
linkchecker:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@master
with:
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}
2 changes: 1 addition & 1 deletion .github/workflows/sql-workbench-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*'

env:
PLUGIN_NAME: queryWorkbenchDashboards
PLUGIN_NAME: query-workbench-dashboards
OPENSEARCH_VERSION: '1.0'
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-rc1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: SQL Workbench Test and Build
on: [pull_request, push]

env:
PLUGIN_NAME: queryWorkbenchDashboards
PLUGIN_NAME: query-workbench-dashboards
OPENSEARCH_VERSION: '1.0'
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-rc1

Expand Down
7 changes: 7 additions & 0 deletions ADMINS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Admins

| Admin | GitHub ID | Affiliation |
| --------------- | --------------------------------------- | ----------- |
| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon |

[This document](https://github.com/opensearch-project/.github/blob/main/ADMINS.md) explains what admins do in this repo. and how they should be doing it. If you're interested in becoming a maintainer, see [MAINTAINERS](MAINTAINERS.md). If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
107 changes: 3 additions & 104 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,4 @@
# Contributing Guidelines
## Contributing to this project

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/opensearch-project/sql/issues), or [recently closed](https://github.com/opensearch-project/sql/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment

## Sign your work
OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE.txt file](./LICENSE.txt)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.

We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.

The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).

```
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.
```
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.

Each commit must include a DCO which looks like this

```
Signed-off-by: Jane Smith <[email protected]>
```
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.

## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *develop* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

To send us a pull request, please:

1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass; please add unit tests for all the new code paths introduced by your change.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## Developing

For instructions for development in details, please refer to [Developer Guide](./DEVELOPER_GUIDE.rst).

## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/opensearch-project/sql/issues?q=label%3A%22help+wanted%22) issues is a great place to start.


## Code of Conduct

This project has adopted an [Open Source Code of Conduct](./CODE_OF_CONDUCT.md).


## Security issue notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.


## Licensing

See the [LICENSE](./LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
OpenSearch is a community project that is built and maintained by people just like **you**.
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
| --------------- | --------- | ----------- |
| Anirudha (Ani) Jadhav | [anirudha](https://github.com/anirudha) | Amazon |
| Peng Huo | [penghuo](https://github.com/penghuo) | Amazon |
| Chloe | [chloe-zh](https://github.com/chloe-zh) | Amazon |
| Chen Dai | [dai-chen](https://github.com/dai-chen) | Amazon |
| Harold Wang | [harold-wang](https://github.com/harold-wang) | Amazon |
| Nick Knize | [nknize](https://github.com/nknize) | Amazon |
| Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[![Test and Build Workflow](https://github.com/opendistro-for-elasticsearch/sql/workflows/Java%20CI/badge.svg)](https://github.com/opendistro-for-elasticsearch/sql/actions)
[![codecov](https://codecov.io/gh/opendistro-for-elasticsearch/sql/branch/develop/graph/badge.svg)](https://codecov.io/gh/opendistro-for-elasticsearch/sql)
[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://docs-beta.opensearch.org/docs/sql/endpoints/)
[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://docs-beta.opensearch.org/search-plugins/sql/endpoints/)
[![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/sql/)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)

Expand Down
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project follows the [OpenSearch release process](https://github.com/opensearch-project/.github/blob/main/RELEASING.md).
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Reporting a Vulnerability

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [email protected]. Please do **not** create a public GitHub issue.
4 changes: 2 additions & 2 deletions sql-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

The SQL CLI component in OpenSearch is a stand-alone Python application and can be launched by a 'wake' word `opensearchsql`.

It only supports [OpenSearch SQL Plugin](https://docs-beta.opensearch.org/docs/sql/)
It only supports [OpenSearch SQL Plugin](https://docs-beta.opensearch.org/search-plugins/sql/index/)
You must have the OpenSearch SQL plugin installed to your OpenSearch instance to connect.
Users can run this CLI from MacOS and Linux, and connect to any valid OpenSearch end-point such as Amazon Elasticsearch Service (AES).

Expand Down Expand Up @@ -75,7 +75,7 @@ You can also configure the following connection properties:

* `endpoint`: You do not need to specify an option, anything that follows the launch command `opensearchsql` is considered as the endpoint. If you do not provide an endpoint, by default, the SQL CLI connects to [http://localhost:9200](http://localhost:9200/).
* `-u/-w`: Supports username and password for HTTP basic authentication, such as:
* OpenSearch with [OpenSearch Security Plugin](https://docs-beta.opensearch.org/docs/opensearch/install/plugins/) installed
* OpenSearch with [OpenSearch Security Plugin](https://docs-beta.opensearch.org/security-plugin/index/) installed
* Amazon Elasticsearch Service domain with [Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled
* `--aws-auth`: Turns on AWS sigV4 authentication to connect to an Amazon Elasticsearch Service endpoint. Use with the AWS CLI (`aws configure`) to retrieve the local AWS configuration to authenticate and connect.

Expand Down
2 changes: 1 addition & 1 deletion sql-cli/development_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ https uses 443 by default.
- Prerequisites
- Build the application
- Start a local OpenSearch instance with
[OpenSearch SQL plugin](https://docs-beta.opensearch.org/docs/sql/) installed
[OpenSearch SQL plugin](https://docs-beta.opensearch.org/search-plugins/sql/index/) installed
and listening at http://localhost:9200.
- Pytest
- `pip install -r requirements-dev.txt` Install test frameworks including Pytest and mock.
Expand Down
2 changes: 1 addition & 1 deletion sql-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
author_email="[email protected]",
version=version,
license="Apache 2.0",
url="https://docs-beta.opensearch.org/docs/sql/cli/",
url="https://docs-beta.opensearch.org/search-plugins/sql/cli/",
packages=find_packages('src'),
package_dir={'': 'src'},
package_data={"opensearch_sql_cli": ["conf/clirc", "opensearch_literals/opensearch_literals.json"]},
Expand Down
2 changes: 1 addition & 1 deletion sql-cli/tests/test_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

* [ ] Test connection to a local OpenSearch instance
* [ ] OpenSearch, no authentication
* [ ] OpenSearch, install [OpenSearch Security plugin](https://docs-beta.opensearch.org/docs/opensearch/install/plugins/) to enable authentication and SSL
* [ ] OpenSearch, install [OpenSearch Security plugin](https://docs-beta.opensearch.org/security-plugin/index/) to enable authentication and SSL
* Run command like `opensearchsql <endpoint> -u <username> -w <password>` to connect to instance with authentication.
* [ ] Test connection to [Amazon Elasticsearch domain](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg.html) with
[Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled.
Expand Down
2 changes: 1 addition & 1 deletion sql-jdbc/docs/tableau.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Download and Installation

* Download and install [Tableau Desktop](https://www.tableau.com/en-ca/products/desktop/download).
* Install and configure [OpenSearch](https://docs-beta.opensearch.org/docs/install/).
* Install and configure [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/).
* Download the [OpenSearch JDBC Driver](https://github.com/opensearch-project/sql/blob/master/sql-jdbc/README.md#download-and-installation).

## Setup
Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/dev/run_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Requirements

* Latest version of [OpenSearch](https://docs-beta.opensearch.org/docs/install/)
* Latest version of [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/)
* [Required datasets loaded](#set-up-test-datasets)
* [DSN configured](#set-up-dsn)

### Set up test datasets

Loading a dataset requires an [OpenSearch](https://docs-beta.opensearch.org/docs/install/) service running with [OpenSearch Dashboards](https://docs-beta.opensearch.org/docs/opensearch-dashboards/). If either of these are missing, please refer to the documentation on how to set them up.
Loading a dataset requires an [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/) service running with [OpenSearch Dashboards](https://docs-beta.opensearch.org/dashboards/index/). If either of these are missing, please refer to the documentation on how to set them up.

Note, if you wish to work with SSL/TLS, you need to configure OpenSearch and OpenSearch Dashboards to support it. See the [build instructions](./BUILD_INSTRUCTIONS.md) for more info.

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/test/excel_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites
* [Download and install](../../README.md) OpenSearch SQL ODBC Driver.
* [Install and configure](https://docs-beta.opensearch.org/docs/install/) OpenSearch.
* [Install and configure](https://docs-beta.opensearch.org/opensearch/install/index/) OpenSearch.
* Open ODBC Data Source Administrator. Click on **System DSN** > **OpenSearch SQL ODBC DSN** > **Configure**.
* Set all connection options & Click on **Test**. Connection test should return `Connection Successful`.

Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/user/microsoft_excel_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Prerequisites

* Microsoft Excel 2016 and higher
* [OpenSearch](https://docs-beta.opensearch.org/docs/install/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/docs/sql/odbc/)
* [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/search-plugins/sql/odbc/)
* A preconfigured [User or System DSN](../../README.md)

## Test Successful Connection
Expand Down
4 changes: 2 additions & 2 deletions sql-odbc/docs/user/microsoft_excel_support_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Prerequisites

* Microsoft Excel 2016 and higher
* [OpenSearch](https://docs-beta.opensearch.org/docs/install/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/docs/sql/odbc/)
* [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/search-plugins/sql/odbc/)
* A preconfigured [User or System DSN](mac_configure_dsn.md)

## Test Successful Connection
Expand Down
6 changes: 3 additions & 3 deletions sql-odbc/docs/user/power_bi_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Prerequisites
* Microsoft Power BI Desktop
* [OpenSearch](https://docs-beta.opensearch.org/docs/install/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/docs/sql/odbc/)
* [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/)
* [OpenSearch SQL ODBC driver](https://docs-beta.opensearch.org/search-plugins/sql/odbc/)
* [SqlOdbcPBIConnector.mez](../../src/PowerBIConnector/bin/Release/)
* Optional: [sqlodbc_import.pbids](../../src/PowerBIConnector/PBIDSExamples) to help with repeated connections to the same server

Expand Down Expand Up @@ -86,7 +86,7 @@ It will take you straight to the **Navigator** window for selecting the tables f

## Troubleshooting

* If you get an following error, please install [OpenSearch SQL ODBC Driver](https://docs-beta.opensearch.org/docs/sql/odbc/).
* If you get an following error, please install [OpenSearch SQL ODBC Driver](https://docs-beta.opensearch.org/search-plugins/sql/odbc/).

<img src="img/pbi_error_driver_not_installed.png" width="350">

Expand Down
2 changes: 1 addition & 1 deletion sql-odbc/docs/user/tableau_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Connect an OpenSearch data source to Tableau Desktop via the Tableau Connector t
## Prerequisites

* Download and Install [Tableau Desktop](https://www.tableau.com/products/desktop/download) 2020 and higher
* Install and Configure [OpenSearch](https://docs-beta.opensearch.org/docs/install/)
* Install and Configure [OpenSearch](https://docs-beta.opensearch.org/opensearch/install/index/)
* Download and Install [OpenSearch SQL ODBC driver](../../README.md)
* Download Tableau Connector for `SQL by OpenSearch for ES` ([opensearch_sql_odbc.taco](../../src/TableauConnector/opensearch_sql_odbc/opensearch_sql_odbc.taco)).
Click on **Download** option for downloading `opensearch_sql_odbc.taco` file.
Expand Down
55 changes: 55 additions & 0 deletions workbench/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Developer Guide

So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.

### Setup

1. Download OpenSearch for the version that matches the [OpenSearch Dashboards version specified in package.json](./package.json#L8).
1. Download and install the most recent version of [OpenSearch SQL plugin](https://github.com/opensearch-project/sql).
1. Download the OpenSearch Dashboards source code for the [version specified in package.json](./package.json#L8) you want to set up.

See the [OpenSearch Dashboards contributing guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/CONTRIBUTING.md) to get started.

1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory.
1. cd into the OpenSearch Dashboards source code directory.
1. Check out this package from version control into the `plugins` directory.
```
git clone [email protected]:opensearch-project/sql.git plugins --no-checkout
cd plugins
echo 'workbench/*' >> .git/info/sparse-checkout
git config core.sparseCheckout true
git checkout main
```
6. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/workbench`.

Ultimately, your directory structure should look like this:

```md
.
├── OpenSearch-Dashboards
│ └── plugins
│ └── workbench
```


## Build

To build the plugin's distributable zip simply run `yarn build`.

Example output: `./build/query-workbench-dashboards*.zip`


## Run

- `yarn start`

Starts OpenSearch Dashboards and includes this plugin. OpenSearch Dashboards will be available on `localhost:5601`.

- `NODE_PATH=../../node_modules yarn test:jest`

Runs the plugin tests.


### Submitting Changes

See [CONTRIBUTING](CONTRIBUTING.md).
Loading