From aba015bd3f945ac3b9763039a6a09c49606fb82f Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 29 Jul 2021 09:46:56 +0530 Subject: [PATCH] Update code of conduct (#46) Signed-off-by: Ketan Umare --- datacatalog/CODE_OF_CONDUCT.md | 2 +- .../flyte/code_of_conduct/CODE_OF_CONDUCT.md | 2 + .../flyte/code_of_conduct/README.rst | 2 + .../flyte/code_of_conduct/update.sh | 12 ++++ .../boilerplate/flyte/end2end/Makefile | 12 ++++ .../boilerplate/flyte/end2end/end2end.sh | 34 +++++++++++ .../flyte/flyte_golang_compile/Readme.rst | 16 +++++ .../flyte_golang_compile.Template | 26 ++++++++ .../flyte/flyte_golang_compile/update.sh | 13 ++++ .../flyte/github_workflows/Readme.rst | 22 +++++++ .../boilerplate_automation.yml | 36 +++++++++++ .../flyte/github_workflows/master.yml | 31 ++++++++++ .../flyte/github_workflows/pull_request.yml | 19 ++++++ .../flyte/github_workflows/update.sh | 16 +++++ .../golang_dockerfile/Dockerfile.GoTemplate | 32 ++++++++++ .../flyte/golang_dockerfile/Readme.rst | 16 +++++ .../flyte/golang_dockerfile/update.sh | 13 ++++ .../flyte/golang_support_tools/go.mod | 3 + .../flyte/golang_support_tools/go.sum | 26 ++++++++ .../flyte/golang_support_tools/tools.go | 1 + .../golang_test_targets/download_tooling.sh | 1 + .../flyte/golang_test_targets/goimports | 2 +- .../boilerplate/flyte/precommit/Makefile | 9 +++ .../flyte/precommit/hooks/pre-push | 41 +++++++++++++ .../flyte/precommit/hooks/prepare-commit-msg | 16 +++++ .../boilerplate/flyte/precommit/update.sh | 60 +++++++++++++++++++ .../pull_request_template.md | 13 ++-- .../flyte/{ => welcome_bot}/Readme.rst | 0 .../flyte/{ => welcome_bot}/config.yml | 0 .../flyte/{ => welcome_bot}/update.sh | 7 ++- datacatalog/boilerplate/update.sh | 19 ------ datacatalog/pull_request_template.md | 13 ++-- 32 files changed, 481 insertions(+), 34 deletions(-) create mode 100644 datacatalog/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md create mode 100644 datacatalog/boilerplate/flyte/code_of_conduct/README.rst create mode 100755 datacatalog/boilerplate/flyte/code_of_conduct/update.sh create mode 100644 datacatalog/boilerplate/flyte/end2end/Makefile create mode 100755 datacatalog/boilerplate/flyte/end2end/end2end.sh create mode 100644 datacatalog/boilerplate/flyte/flyte_golang_compile/Readme.rst create mode 100644 datacatalog/boilerplate/flyte/flyte_golang_compile/flyte_golang_compile.Template create mode 100755 datacatalog/boilerplate/flyte/flyte_golang_compile/update.sh create mode 100644 datacatalog/boilerplate/flyte/github_workflows/Readme.rst create mode 100644 datacatalog/boilerplate/flyte/github_workflows/boilerplate_automation.yml create mode 100644 datacatalog/boilerplate/flyte/github_workflows/master.yml create mode 100644 datacatalog/boilerplate/flyte/github_workflows/pull_request.yml create mode 100755 datacatalog/boilerplate/flyte/github_workflows/update.sh create mode 100644 datacatalog/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate create mode 100644 datacatalog/boilerplate/flyte/golang_dockerfile/Readme.rst create mode 100755 datacatalog/boilerplate/flyte/golang_dockerfile/update.sh create mode 100644 datacatalog/boilerplate/flyte/precommit/Makefile create mode 100755 datacatalog/boilerplate/flyte/precommit/hooks/pre-push create mode 100755 datacatalog/boilerplate/flyte/precommit/hooks/prepare-commit-msg create mode 100755 datacatalog/boilerplate/flyte/precommit/update.sh rename datacatalog/boilerplate/flyte/{ => welcome_bot}/Readme.rst (100%) rename datacatalog/boilerplate/flyte/{ => welcome_bot}/config.yml (100%) rename datacatalog/boilerplate/flyte/{ => welcome_bot}/update.sh (55%) diff --git a/datacatalog/CODE_OF_CONDUCT.md b/datacatalog/CODE_OF_CONDUCT.md index 4c3a38cc48..e12139d691 100644 --- a/datacatalog/CODE_OF_CONDUCT.md +++ b/datacatalog/CODE_OF_CONDUCT.md @@ -1,2 +1,2 @@ -This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). All contributors and participants agree to abide by its terms. diff --git a/datacatalog/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md b/datacatalog/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..e12139d691 --- /dev/null +++ b/datacatalog/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). +All contributors and participants agree to abide by its terms. diff --git a/datacatalog/boilerplate/flyte/code_of_conduct/README.rst b/datacatalog/boilerplate/flyte/code_of_conduct/README.rst new file mode 100644 index 0000000000..0c9f2f1ec5 --- /dev/null +++ b/datacatalog/boilerplate/flyte/code_of_conduct/README.rst @@ -0,0 +1,2 @@ +CODE OF CONDUCT +~~~~~~~~~~~~~~~ diff --git a/datacatalog/boilerplate/flyte/code_of_conduct/update.sh b/datacatalog/boilerplate/flyte/code_of_conduct/update.sh new file mode 100755 index 0000000000..42f6158460 --- /dev/null +++ b/datacatalog/boilerplate/flyte/code_of_conduct/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/CODE_OF_CONDUCT.md ${DIR}/../../../CODE_OF_CONDUCT.md diff --git a/datacatalog/boilerplate/flyte/end2end/Makefile b/datacatalog/boilerplate/flyte/end2end/Makefile new file mode 100644 index 0000000000..b0eb945b13 --- /dev/null +++ b/datacatalog/boilerplate/flyte/end2end/Makefile @@ -0,0 +1,12 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +.PHONY: end2end_execute +end2end_execute: + ./boilerplate/flyte/end2end/end2end.sh + +.PHONY: k8s_integration_execute +k8s_integration_execute: + echo "pass" \ No newline at end of file diff --git a/datacatalog/boilerplate/flyte/end2end/end2end.sh b/datacatalog/boilerplate/flyte/end2end/end2end.sh new file mode 100755 index 0000000000..b2492de01c --- /dev/null +++ b/datacatalog/boilerplate/flyte/end2end/end2end.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +OUT="${DIR}/tmp" +rm -rf ${OUT} +git clone https://github.com/flyteorg/flyte.git "${OUT}" + +pushd ${OUT} + +if [ ! -z "$IMAGE" ]; +then + kind load docker-image ${IMAGE} + if [ ${IMAGE_NAME} -eq "flytepropeller" ] + then + sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" ${OUT}/kustomize/base/propeller/deployment.yaml + fi + + if [ ${IMAGE} -eq "flyteadmin" ] + then + sed -i.bak -e "s_${IMAGE_NAME}:.*_${IMAGE}_g" ${OUT}/kustomize/base/admindeployment/deployment.yaml + fi +fi + +make kustomize +make end2end_execute +popd diff --git a/datacatalog/boilerplate/flyte/flyte_golang_compile/Readme.rst b/datacatalog/boilerplate/flyte/flyte_golang_compile/Readme.rst new file mode 100644 index 0000000000..e6b56dd16e --- /dev/null +++ b/datacatalog/boilerplate/flyte/flyte_golang_compile/Readme.rst @@ -0,0 +1,16 @@ +Flyte Golang Compile +~~~~~~~~~~~~~~~~~~~~ + +Common compile script for Flyte golang services. + +**To Enable:** + +Add ``flyteorg/flyte_golang_compile`` to your ``boilerplate/update.cfg`` file. + +Add the following to your Makefile + +:: + + .PHONY: compile_linux + compile_linux: + PACKAGES={{ *your packages }} OUTPUT={{ /path/to/output }} ./boilerplate/flyte/flyte_golang_compile.sh diff --git a/datacatalog/boilerplate/flyte/flyte_golang_compile/flyte_golang_compile.Template b/datacatalog/boilerplate/flyte/flyte_golang_compile/flyte_golang_compile.Template new file mode 100644 index 0000000000..f587e971be --- /dev/null +++ b/datacatalog/boilerplate/flyte/flyte_golang_compile/flyte_golang_compile.Template @@ -0,0 +1,26 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +if [ -z "$PACKAGES" ]; then + echo "PACKAGES environment VAR not set" + exit 1 +fi + +if [ -z "$OUTPUT" ]; then + echo "OUTPUT environment VAR not set" + exit 1 +fi + +# get the GIT_SHA and RELEASE_SEMVER + +GIT_SHA=$(git rev-parse HEAD) +RELEASE_SEMVER=$(git describe --tags --exact-match $GIT_SHA 2>/dev/null) + +CURRENT_PKG=github.com/flyteorg/{{ REPOSITORY }} +VERSION_PKG="${CURRENT_PKG}/vendor/github.com/flyteorg/flytestdlib" + +LDFLAGS="-X ${VERSION_PKG}/version.Build=${GIT_SHA} -X ${VERSION_PKG}/version.Version=${RELEASE_SEMVER}" + +GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "$LDFLAGS" -o "$OUTPUT" "$PACKAGES" diff --git a/datacatalog/boilerplate/flyte/flyte_golang_compile/update.sh b/datacatalog/boilerplate/flyte/flyte_golang_compile/update.sh new file mode 100755 index 0000000000..b1e6101c2b --- /dev/null +++ b/datacatalog/boilerplate/flyte/flyte_golang_compile/update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +echo " - generating ${DIR}/flyte_golang_compile.sh" +sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/flyte_golang_compile.Template > ${DIR}/flyte_golang_compile.sh diff --git a/datacatalog/boilerplate/flyte/github_workflows/Readme.rst b/datacatalog/boilerplate/flyte/github_workflows/Readme.rst new file mode 100644 index 0000000000..905ddd81d8 --- /dev/null +++ b/datacatalog/boilerplate/flyte/github_workflows/Readme.rst @@ -0,0 +1,22 @@ +Golang Github Actions +~~~~~~~~~~~~~~~~~ + +Provides a two github actions workflows. + +**To Enable:** + +Add ``flyteorg/github_workflows`` to your ``boilerplate/update.cfg`` file. + +Add a github secret ``package_name`` with the name to use for publishing (e.g. ``flytepropeller``). Typicaly, this will be the same name as the repository. + +*Note*: If you are working on a fork, include that prefix in your package name (``myfork/flytepropeller``). + +The actions will push to 2 repos: + + 1. ``docker.pkg.github.com/flyteorg//`` + 2. ``docker.pkg.github.com/flyteorg//-stages`` : this repo is used to cache build stages to speed up iterative builds after. + +There are two workflows that get deployed: + + 1. A workflow that runs on Pull Requests to build and push images to github registy tagged with the commit sha. + 2. A workflow that runs on master merges that bump the patch version of release tag, builds and pushes images to github registry tagged with the version, commit sha as well as "latest" diff --git a/datacatalog/boilerplate/flyte/github_workflows/boilerplate_automation.yml b/datacatalog/boilerplate/flyte/github_workflows/boilerplate_automation.yml new file mode 100644 index 0000000000..9bda305d4f --- /dev/null +++ b/datacatalog/boilerplate/flyte/github_workflows/boilerplate_automation.yml @@ -0,0 +1,36 @@ +name: Update Boilerplate Automation +on: + workflow_dispatch: +jobs: + update-boilerplate: + name: Update Boilerplate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Update Boilerplate + run: | + make update_boilerplate + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Boilerplate + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-boilerplate + delete-branch: true + title: 'Update Boilerplate' + body: | + Update Boilerplate + - Auto-generated by [flyte-bot] + labels: | + boilerplate + team-reviewers: | + owners + maintainers + draft: false + diff --git a/datacatalog/boilerplate/flyte/github_workflows/master.yml b/datacatalog/boilerplate/flyte/github_workflows/master.yml new file mode 100644 index 0000000000..a8eab5af0e --- /dev/null +++ b/datacatalog/boilerplate/flyte/github_workflows/master.yml @@ -0,0 +1,31 @@ +name: Master + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + fetch-depth: '0' + - name: Bump version and push tag + id: bump-version + uses: anothrNick/github-tag-action@1.17.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DEFAULT_BUMP: patch + - name: Push Docker Image to Github Registry + uses: whoan/docker-build-with-cache-action@v5 + with: + username: "${{ github.actor }}" + password: "${{ secrets.GITHUB_TOKEN }}" + image_name: ${{ secrets.package_name }} + image_tag: latest,${{ github.sha }},${{ steps.bump-version.outputs.tag }} + push_git_tag: true + registry: docker.pkg.github.com + build_extra_args: "--compress=true" diff --git a/datacatalog/boilerplate/flyte/github_workflows/pull_request.yml b/datacatalog/boilerplate/flyte/github_workflows/pull_request.yml new file mode 100644 index 0000000000..932400bc4f --- /dev/null +++ b/datacatalog/boilerplate/flyte/github_workflows/pull_request.yml @@ -0,0 +1,19 @@ +name: Pull Request + +on: + pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Push Docker Image to Github Registry + uses: whoan/docker-build-with-cache-action@v5 + with: + username: "${{ github.actor }}" + password: "${{ secrets.GITHUB_TOKEN }}" + image_name: ${{ secrets.package_name }} + image_tag: ${{ github.sha }} + push_git_tag: true + registry: docker.pkg.github.com diff --git a/datacatalog/boilerplate/flyte/github_workflows/update.sh b/datacatalog/boilerplate/flyte/github_workflows/update.sh new file mode 100755 index 0000000000..d5a74a4fc0 --- /dev/null +++ b/datacatalog/boilerplate/flyte/github_workflows/update.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +mkdir -p ${DIR}/../../../.github/workflows + +echo " - generating github action workflows in root directory." +sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/master.yml > ${DIR}/../../../.github/workflows/master.yml +sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/pull_request.yml > ${DIR}/../../../.github/workflows/pull_request.yml diff --git a/datacatalog/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate b/datacatalog/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate new file mode 100644 index 0000000000..2b5b775c62 --- /dev/null +++ b/datacatalog/boilerplate/flyte/golang_dockerfile/Dockerfile.GoTemplate @@ -0,0 +1,32 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +FROM golang:1.13.3-alpine3.10 as builder +RUN apk add git openssh-client make curl + +# COPY only the go mod files for efficient caching +COPY go.mod go.sum /go/src/github.com/flyteorg/{{REPOSITORY}}/ +WORKDIR /go/src/github.com/flyteorg/{{REPOSITORY}} + +# Pull dependencies +RUN go mod download + +# COPY the rest of the source code +COPY . /go/src/github.com/flyteorg/{{REPOSITORY}}/ + +# This 'linux_compile' target should compile binaries to the /artifacts directory +# The main entrypoint should be compiled to /artifacts/{{REPOSITORY}} +RUN make linux_compile + +# update the PATH to include the /artifacts directory +ENV PATH="/artifacts:${PATH}" + +# This will eventually move to centurylink/ca-certs:latest for minimum possible image size +FROM alpine:3.10 +COPY --from=builder /artifacts /bin + +RUN apk --update add ca-certificates + +CMD ["{{REPOSITORY}}"] diff --git a/datacatalog/boilerplate/flyte/golang_dockerfile/Readme.rst b/datacatalog/boilerplate/flyte/golang_dockerfile/Readme.rst new file mode 100644 index 0000000000..dba3b34f60 --- /dev/null +++ b/datacatalog/boilerplate/flyte/golang_dockerfile/Readme.rst @@ -0,0 +1,16 @@ +Golang Dockerfile +~~~~~~~~~~~~~~~~~ + +Provides a Dockerfile that produces a small image. + +**To Enable:** + +Add ``flyteorg/golang_dockerfile`` to your ``boilerplate/update.cfg`` file. + +Create and configure a ``make linux_compile`` target that compiles your go binaries to the ``/artifacts`` directory :: + + .PHONY: linux_compile + linux_compile: + RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts {{ packages }} + +All binaries compiled to ``/artifacts`` will be available at ``/bin`` in your final image. diff --git a/datacatalog/boilerplate/flyte/golang_dockerfile/update.sh b/datacatalog/boilerplate/flyte/golang_dockerfile/update.sh new file mode 100755 index 0000000000..5439bada4f --- /dev/null +++ b/datacatalog/boilerplate/flyte/golang_dockerfile/update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +echo " - generating Dockerfile in root directory." +sed -e "s/{{REPOSITORY}}/${REPOSITORY}/g" ${DIR}/Dockerfile.GoTemplate > ${DIR}/../../../Dockerfile diff --git a/datacatalog/boilerplate/flyte/golang_support_tools/go.mod b/datacatalog/boilerplate/flyte/golang_support_tools/go.mod index 7afee48e45..53f645159a 100644 --- a/datacatalog/boilerplate/flyte/golang_support_tools/go.mod +++ b/datacatalog/boilerplate/flyte/golang_support_tools/go.mod @@ -6,7 +6,10 @@ require ( github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.3.22 github.com/golangci/golangci-lint v1.38.0 + github.com/pseudomuto/protoc-gen-doc v1.4.1 // indirect github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 + +replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/datacatalog/boilerplate/flyte/golang_support_tools/go.sum b/datacatalog/boilerplate/flyte/golang_support_tools/go.sum index 49939b689d..261048f745 100644 --- a/datacatalog/boilerplate/flyte/golang_support_tools/go.sum +++ b/datacatalog/boilerplate/flyte/golang_support_tools/go.sum @@ -75,8 +75,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -99,6 +102,8 @@ github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cv github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -164,6 +169,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -191,6 +197,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0= +github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= @@ -204,6 +212,8 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= +github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -271,6 +281,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -355,8 +366,10 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= @@ -418,9 +431,13 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -543,6 +560,8 @@ github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1: github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= @@ -616,6 +635,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= @@ -655,6 +675,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= @@ -737,6 +759,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -797,6 +820,7 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -905,6 +929,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1121,6 +1146,7 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/datacatalog/boilerplate/flyte/golang_support_tools/tools.go b/datacatalog/boilerplate/flyte/golang_support_tools/tools.go index 71163a57d9..eee691d8c3 100644 --- a/datacatalog/boilerplate/flyte/golang_support_tools/tools.go +++ b/datacatalog/boilerplate/flyte/golang_support_tools/tools.go @@ -7,4 +7,5 @@ import ( _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/vektra/mockery/cmd/mockery" + - "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/datacatalog/boilerplate/flyte/golang_test_targets/download_tooling.sh b/datacatalog/boilerplate/flyte/golang_test_targets/download_tooling.sh index 25d4ac3dc1..c0ab06b063 100755 --- a/datacatalog/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/datacatalog/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -20,6 +20,7 @@ tools=( "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" + "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) tmp_dir=$(mktemp -d -t gotooling-XXX) diff --git a/datacatalog/boilerplate/flyte/golang_test_targets/goimports b/datacatalog/boilerplate/flyte/golang_test_targets/goimports index ba0d6d8718..af1829036c 100755 --- a/datacatalog/boilerplate/flyte/golang_test_targets/goimports +++ b/datacatalog/boilerplate/flyte/golang_test_targets/goimports @@ -5,4 +5,4 @@ # # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst -goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") +goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -path "./boilerplate/*") diff --git a/datacatalog/boilerplate/flyte/precommit/Makefile b/datacatalog/boilerplate/flyte/precommit/Makefile new file mode 100644 index 0000000000..3c6f17d6b2 --- /dev/null +++ b/datacatalog/boilerplate/flyte/precommit/Makefile @@ -0,0 +1,9 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + + +.PHONY: setup-precommit +setup-precommit: #setup the precommit + @boilerplate/flyte/precommit/update.sh diff --git a/datacatalog/boilerplate/flyte/precommit/hooks/pre-push b/datacatalog/boilerplate/flyte/precommit/hooks/pre-push new file mode 100755 index 0000000000..f161cfe856 --- /dev/null +++ b/datacatalog/boilerplate/flyte/precommit/hooks/pre-push @@ -0,0 +1,41 @@ +DUMMY_SHA=0000000000000000000000000000000000000000 + +echo "Running pre-push check; to skip this step use 'push --no-verify'" + +while read LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA +do + if [ "$LOCAL_SHA" = $DUMMY_SHA ] + then + # Branch deleted. Do nothing. + exit 0 + else + if [ "$REMOTE_SHA" = $DUMMY_SHA ] + then + # New branch. Verify the last commit, since this is very likely where the new code is + # (though there is no way to know for sure). In the extremely uncommon case in which someone + # pushes more than 1 new commit to a branch, CI will enforce full checking. + RANGE="$LOCAL_SHA~1..$LOCAL_SHA" + else + # Updating branch. Verify new commits. + RANGE="$REMOTE_SHA..$LOCAL_SHA" + fi + + # Verify DCO signoff. We do this before the format checker, since it has + # some probability of failing spuriously, while this check never should. + # + # In general, we can't assume that the commits are signed off by author + # pushing, so we settle for just checking that there is a signoff at all. + SIGNED_OFF=$(git rev-list --no-merges --grep "^Signed-off-by: " "$RANGE") + NOT_SIGNED_OFF=$(git rev-list --no-merges "$RANGE" | grep -Fxv "$SIGNED_OFF") + if [ -n "$NOT_SIGNED_OFF" ] + then + echo >&2 "ERROR: The following commits do not have DCO signoff:" + while read -r commit; do + echo " $(git log --pretty=oneline --abbrev-commit -n 1 $commit)" + done <<< "$NOT_SIGNED_OFF" + exit 1 + fi + fi +done + +exit 0 diff --git a/datacatalog/boilerplate/flyte/precommit/hooks/prepare-commit-msg b/datacatalog/boilerplate/flyte/precommit/hooks/prepare-commit-msg new file mode 100755 index 0000000000..8148d104b8 --- /dev/null +++ b/datacatalog/boilerplate/flyte/precommit/hooks/prepare-commit-msg @@ -0,0 +1,16 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst +# $ ln -s ../../support/hooks/prepare-commit-msg .git/hooks/prepare-commit-msg + +COMMIT_MESSAGE_FILE="$1" +AUTHOR=$(git var GIT_AUTHOR_IDENT) +SIGNOFF=$(echo $AUTHOR | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') + +# Check for DCO signoff message. If one doesn't exist, append one and then warn +# the user that you did so. +if ! $(grep -qs "^$SIGNOFF" "$COMMIT_MESSAGE_FILE") ; then + echo "\n$SIGNOFF" >> "$COMMIT_MESSAGE_FILE" + echo "Appended the following signoff to the end of the commit message:\n $SIGNOFF\n" +fi diff --git a/datacatalog/boilerplate/flyte/precommit/update.sh b/datacatalog/boilerplate/flyte/precommit/update.sh new file mode 100755 index 0000000000..971c8386c1 --- /dev/null +++ b/datacatalog/boilerplate/flyte/precommit/update.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +# Helper script for Automatically add DCO signoff with commit hooks +# Taken from Envoy https://gitlab.cncf.ci/envoyproxy/envoy +if [ ! "$PWD" == "$(git rev-parse --show-toplevel)" ]; then + cat >&2 <<__EOF__ +ERROR: this script must be run at the root of the envoy source tree +__EOF__ + exit 1 +fi + +# Helper functions that calculate `abspath` and `relpath`. Taken from Mesos +# commit 82b040a60561cf94dec3197ea88ae15e57bcaa97, which also carries the Apache +# V2 license, and has deployed this code successfully for some time. +abspath() { + cd "$(dirname "${1}")" + echo "${PWD}"/"$(basename "${1}")" + cd "${OLDPWD}" +} +relpath() { + local FROM TO UP + FROM="$(abspath "${1%/}")" TO="$(abspath "${2%/}"/)" + while test "${TO}" = "${TO#"${FROM}"/}" \ + -a "${TO}" != "${FROM}"; do + FROM="${FROM%/*}" UP="../${UP}" + done + TO="${UP%/}${TO#${FROM}}" + echo "${TO:-.}" +} + +# Try to find the `.git` directory, even if it's not in Flyte project root (as +# it wouldn't be if, say, this were in a submodule). The "blessed" but fairly +# new way to do this is to use `--git-common-dir`. +DOT_GIT_DIR=$(git rev-parse --git-common-dir) +if test ! -d "${DOT_GIT_DIR}"; then + # If `--git-common-dir` is not available, fall back to older way of doing it. + DOT_GIT_DIR=$(git rev-parse --git-dir) +fi + +mkdir -p ${DOT_GIT_DIR}/hooks + +HOOKS_DIR="${DOT_GIT_DIR}/hooks" +HOOKS_DIR_RELPATH=$(relpath "${HOOKS_DIR}" "${PWD}") + +if [ ! -e "${HOOKS_DIR}/prepare-commit-msg" ]; then + echo "Installing hook 'prepare-commit-msg'" + ln -s "${HOOKS_DIR_RELPATH}/boilerplate/flyte/precommit/hooks/prepare-commit-msg" "${HOOKS_DIR}/prepare-commit-msg" +fi + +if [ ! -e "${HOOKS_DIR}/pre-push" ]; then + echo "Installing hook 'pre-push'" + ln -s "${HOOKS_DIR_RELPATH}/boilerplate/flyte/precommit/hooks/pre-push" "${HOOKS_DIR}/pre-push" +fi diff --git a/datacatalog/boilerplate/flyte/pull_request_template/pull_request_template.md b/datacatalog/boilerplate/flyte/pull_request_template/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/datacatalog/boilerplate/flyte/pull_request_template/pull_request_template.md +++ b/datacatalog/boilerplate/flyte/pull_request_template/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ diff --git a/datacatalog/boilerplate/flyte/Readme.rst b/datacatalog/boilerplate/flyte/welcome_bot/Readme.rst similarity index 100% rename from datacatalog/boilerplate/flyte/Readme.rst rename to datacatalog/boilerplate/flyte/welcome_bot/Readme.rst diff --git a/datacatalog/boilerplate/flyte/config.yml b/datacatalog/boilerplate/flyte/welcome_bot/config.yml similarity index 100% rename from datacatalog/boilerplate/flyte/config.yml rename to datacatalog/boilerplate/flyte/welcome_bot/config.yml diff --git a/datacatalog/boilerplate/flyte/update.sh b/datacatalog/boilerplate/flyte/welcome_bot/update.sh similarity index 55% rename from datacatalog/boilerplate/flyte/update.sh rename to datacatalog/boilerplate/flyte/welcome_bot/update.sh index 506c3221b7..2db64ac3f1 100755 --- a/datacatalog/boilerplate/flyte/update.sh +++ b/datacatalog/boilerplate/flyte/welcome_bot/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e @@ -11,4 +11,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # Clone the config.yml file echo " - copying ${DIR}/config.yml to the root directory." -cp ${DIR}/config.yml ${DIR}/../../.github/config.yml +cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml + diff --git a/datacatalog/boilerplate/update.sh b/datacatalog/boilerplate/update.sh index 2d0fd711a5..73de4dc91c 100755 --- a/datacatalog/boilerplate/update.sh +++ b/datacatalog/boilerplate/update.sh @@ -10,15 +10,9 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -<<<<<<< HEAD trap 'rm -fr $OUT' EXIT git clone https://github.com/flyteorg/boilerplate.git "${OUT}" -======= -trap "rm -fr $OUT" EXIT - -git clone git@github.com:flyteorg/boilerplate.git "${OUT}" ->>>>>>> c841290e942bbc901f235650d68347b4a03b8d28 echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" @@ -39,11 +33,7 @@ if [ -z "$REPOSITORY" ]; then exit 1 fi -<<<<<<< HEAD while read -r directory junk; do -======= -while read directory junk; do ->>>>>>> c841290e942bbc901f235650d68347b4a03b8d28 # Skip comment lines (which can have leading whitespace) if [[ "$directory" == '#'* ]]; then continue @@ -71,13 +61,8 @@ while read directory junk; do echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." -<<<<<<< HEAD rm -rf "${DIR:?}/${directory}" mkdir -p "$(dirname "${DIR}"/"${directory}")" -======= - rm -rf "${DIR}/${directory}" - mkdir -p $(dirname "${DIR}/${directory}") ->>>>>>> c841290e942bbc901f235650d68347b4a03b8d28 cp -r "$dir_path" "${DIR}/${directory}" if [ -f "${DIR}/${directory}/update.sh" ]; then echo "executing ${DIR}/${directory}/update.sh" @@ -85,8 +70,4 @@ while read directory junk; do fi echo "***********************************************************************************" echo "" -<<<<<<< HEAD -done < "$CONFIG_FILE" -======= done < "$CONFIG_FILE" ->>>>>>> c841290e942bbc901f235650d68347b4a03b8d28 diff --git a/datacatalog/pull_request_template.md b/datacatalog/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/datacatalog/pull_request_template.md +++ b/datacatalog/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_