From f4dd2891df31b45ca8d0c9b3f37e4a88711fa632 Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Wed, 1 Jun 2022 13:31:53 -0700 Subject: [PATCH] Add link checker workflow (#51) * Adding a link checker workflow Signed-off-by: Vacha Shah * Fixing broken links Signed-off-by: Vacha Shah * Fixing integration workflow Signed-off-by: Vacha Shah --- .ci/opensearch/Dockerfile.opensearch | 2 +- .github/workflows/integration.yml | 6 +----- .github/workflows/links.yml | 25 +++++++++++++++++++++++++ CONTRIBUTING.md | 10 +++++----- LICENSE => LICENSE.txt | 0 5 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/links.yml rename LICENSE => LICENSE.txt (100%) diff --git a/.ci/opensearch/Dockerfile.opensearch b/.ci/opensearch/Dockerfile.opensearch index 2bde4d52..b9739725 100644 --- a/.ci/opensearch/Dockerfile.opensearch +++ b/.ci/opensearch/Dockerfile.opensearch @@ -1,5 +1,5 @@ ARG OPENSEARCH_VERSION -FROM opensearchproject/opensearch:$OPENSEARCH_VERSION +FROM opensearchproject/opensearch:${OPENSEARCH_VERSION} COPY --chown=opensearch:opensearch opensearch.yml /usr/share/opensearch/config/ diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c2b2c9bd..3daafc85 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -33,13 +33,9 @@ jobs: docker network prune --force docker system prune --volumes --force - - name: Set the cluster version - if: ${{ matrix.entry.cluster == 'opensearch' }} - run: | - export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }} - - name: Launch ${{ matrix.entry.cluster }} cluster run: | + export OPENSEARCH_VERSION=${{ matrix.entry.version }} export SECURE_INTEGRATION=${{ matrix.secured }} docker-compose --project-directory .ci/${{ matrix.entry.cluster }} build docker-compose --project-directory .ci/${{ matrix.entry.cluster }} up -d diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 00000000..20d49160 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,25 @@ +name: Link Checker +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" + +jobs: + linkchecker: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: lychee Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.0.8 + with: + args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://localhost:9200" --exclude-mail + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Fail if there were link errors + run: exit ${{ steps.lychee.outputs.exit_code }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b8ea937..624efe9d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ OpenSearch is a community project that is built and maintained by people just li ## First Things First -1. **When in doubt, open an issue** - For almost any type of contribution, the first step is opening an issue. Even if you think you already know what the solution is, writing down a description of the problem you're trying to solve will help everyone get context when they review your pull request. If it's truly a trivial change (e.g. spelling error), you can skip this step -- but as the subject says, when it doubt, [open an issue](issues). +1. **When in doubt, open an issue** - For almost any type of contribution, the first step is opening an issue. Even if you think you already know what the solution is, writing down a description of the problem you're trying to solve will help everyone get context when they review your pull request. If it's truly a trivial change (e.g. spelling error), you can skip this step -- but as the subject says, when it doubt, [open an issue](https://github.com/opensearch-project/opensearch-dsl-py/issues/new/choose). 2. **Only submit your own work** (or work you have sufficient rights to submit) - Please make sure that any code or documentation you submit is your work or you have the rights to submit. We respect the intellectual property rights of others, and as part of contributing, we'll ask you to sign your contribution with a "Developer Certificate of Origin" (DCO) that states you have the rights to submit this work and you understand we'll use your contribution. There's more information about this topic in the [DCO section](#developer-certificate-of-origin). @@ -25,7 +25,7 @@ Ugh! Bugs! A bug is when software behaves in a way that you didn't expect and the developer didn't intend. To help us understand what's going on, we first want to make sure you're working from the latest version. -Once you've confirmed that the bug still exists in the latest version, you'll want to check to make sure it's not something we already know about on the [open issues GitHub page](issues). +Once you've confirmed that the bug still exists in the latest version, you'll want to check to make sure it's not something we already know about on the [open issues GitHub page](https://github.com/opensearch-project/opensearch-dsl-py/issues). If you've upgraded to the latest version and you can't find it in our open issues list, then you'll need to tell us how to reproduce it Provide as much information as you can. You may think that the problem lies with your query, when actually it depends on how your data is indexed. The easier it is for us to recreate your problem, the faster it is likely to be fixed. @@ -36,11 +36,11 @@ If you've thought of a way that OpenSearch could be better, we want to hear abou ### Contributing Code -As with other types of contributions, the first step is to [open an issue on GitHub](issues/new/choose). Opening an issue before you make changes makes sure that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. So again, when in doubt, open an issue. +As with other types of contributions, the first step is to [open an issue on GitHub](https://github.com/opensearch-project/opensearch-dsl-py/issues/new/choose). Opening an issue before you make changes makes sure that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. So again, when in doubt, open an issue. ## Developer Certificate of Origin -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. +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. @@ -87,7 +87,7 @@ You may type this line on your own when writing your commit messages. However, i ## Review Process -We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](issues/new/choose) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. +We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](https://github.com/opensearch-project/opensearch-dsl-py/issues/new/choose) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. During the PR process, expect that there will be some back-and-forth. Please try to respond to comments in a timely fashion, and if you don't wish to continue with the PR, let us know. If a PR takes too many iterations for its complexity or size, we may reject it. Additionally, if you stop responding we may close the PR as abandoned. In either case, if you feel this was done in error, please add a comment on the PR. diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt