From a50cdc1be5c72fd18b1edd67976cc2497bb1cf66 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 1 Jul 2022 11:25:09 -0500 Subject: [PATCH 01/29] Add DCO Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 70 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cfc34a32..f7bf37c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,12 +67,68 @@ poetry run python3 -m black src --check Remove the `--check` flag to write reformatted files to disk. To simplify reviews you can format your changes in a separate commit. -## Pull Request Process -1. Update the [CHANGELOG.md](README.md) or similar documentation with details of changes you wish to make, if applicable. -2. Add any appropriate tests. -3. Make your code or other changes. -4. Review guidelines such as - [How to write the perfect pull request][github-perfect-pr], thanks! +## Communication +Before starting work on a major feature, please reach out to us via GitHub, Slack, email, etc. We will make sure no one else is already working on it and ask you to open a GitHub issue. +A "major feature" is defined as any change that is > 100 LOC altered (not including tests), or changes any user-facing behavior. +We will use the GitHub issue to discuss the feature and come to agreement. +This is to prevent your time being wasted, as well as ours. +The GitHub review process for major features is also important so that organizations with commit access can come to agreement on design. +If it is appropriate to write a design document, the document must be hosted either in the GitHub tracking issue, or linked to from the issue and hosted in a world-readable location. +Specifically, if the goal is to add a new extension, please read the extension policy. +Small patches and bug fixes don't need prior communication. -[github-perfect-pr]: https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/ +## Coding Style +We follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) with one exception: lines can be up to 100 characters in length, not 79. + +## Sign your work +The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +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. +``` + +Then you just add a line to every git commit message: + +``` +Signed-off-by: Joe Smith +Use your real name (sorry, no pseudonyms or anonymous contributions.) +``` + +If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with git commit -s. From 209b21b57e00b0c634d17b2840a10fd77e91aad1 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 1 Jul 2022 13:05:55 -0500 Subject: [PATCH 02/29] Add preamble Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7bf37c8..f083fc85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,8 @@ -# Contributing +We happily welcome contributions to the `databricks-sql-connector` package. We use [GitHub Issues](https://githaub.com/databricks/databricks-sql-python/issues) to track community reported issues and [GitHub Pull Requests](https://githaub.com/databricks/databricks-sql-python/pulls) for accepting changes. -To contribute to this repository, fork it and send pull requests. +Contributions are licensed on a license-in/license-out basis. + +# Contributing Guide ## Set up your environment From bb885243fc5b6bd4a622bc759bfa86ec738395e6 Mon Sep 17 00:00:00 2001 From: Jesse Date: Fri, 1 Jul 2022 13:09:17 -0500 Subject: [PATCH 03/29] add pull request template Signed-off-by: Jesse Whitehouse --- .github/.github/pull_request_template.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/.github/pull_request_template.md diff --git a/.github/.github/pull_request_template.md b/.github/.github/pull_request_template.md new file mode 100644 index 00000000..8ce224e8 --- /dev/null +++ b/.github/.github/pull_request_template.md @@ -0,0 +1,23 @@ + + + +## What type of PR is this? + + +- [ ] Refactor +- [ ] Feature +- [ ] Bug Fix +- [ ] Other + +## Description + +## How is this tested? + +- [ ] Unit tests +- [ ] E2E Tests +- [ ] Manually +- [ ] N/A + + + +## Related Tickets & Documents From fc91fea00fe9d0d97de4a588bc5781f08d23528a Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 1 Jul 2022 13:11:05 -0500 Subject: [PATCH 04/29] Reorganise CONTRIBUTING.md Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 130 ++++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f083fc85..2b127ada 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,71 @@ Contributions are licensed on a license-in/license-out basis. # Contributing Guide +## Communication +Before starting work on a major feature, please reach out to us via GitHub, Slack, email, etc. We will make sure no one else is already working on it and ask you to open a GitHub issue. +A "major feature" is defined as any change that is > 100 LOC altered (not including tests), or changes any user-facing behavior. +We will use the GitHub issue to discuss the feature and come to agreement. +This is to prevent your time being wasted, as well as ours. +The GitHub review process for major features is also important so that organizations with commit access can come to agreement on design. +If it is appropriate to write a design document, the document must be hosted either in the GitHub tracking issue, or linked to from the issue and hosted in a world-readable location. +Specifically, if the goal is to add a new extension, please read the extension policy. +Small patches and bug fixes don't need prior communication. + +## Coding Style +We follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) with one exception: lines can be up to 100 characters in length, not 79. + +## Sign your work +The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org): + +``` +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +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. +``` + +Then you just add a line to every git commit message: + +``` +Signed-off-by: Joe Smith +Use your real name (sorry, no pseudonyms or anonymous contributions.) +``` + +If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with git commit -s. + ## Set up your environment This project uses [Poetry](https://python-poetry.org/) for dependency management, tests, and linting. @@ -69,68 +134,3 @@ poetry run python3 -m black src --check Remove the `--check` flag to write reformatted files to disk. To simplify reviews you can format your changes in a separate commit. - -## Communication -Before starting work on a major feature, please reach out to us via GitHub, Slack, email, etc. We will make sure no one else is already working on it and ask you to open a GitHub issue. -A "major feature" is defined as any change that is > 100 LOC altered (not including tests), or changes any user-facing behavior. -We will use the GitHub issue to discuss the feature and come to agreement. -This is to prevent your time being wasted, as well as ours. -The GitHub review process for major features is also important so that organizations with commit access can come to agreement on design. -If it is appropriate to write a design document, the document must be hosted either in the GitHub tracking issue, or linked to from the issue and hosted in a world-readable location. -Specifically, if the goal is to add a new extension, please read the extension policy. -Small patches and bug fixes don't need prior communication. - -## Coding Style -We follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) with one exception: lines can be up to 100 characters in length, not 79. - -## Sign your work -The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -1 Letterman Drive -Suite D4700 -San Francisco, CA, 94129 - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -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. -``` - -Then you just add a line to every git commit message: - -``` -Signed-off-by: Joe Smith -Use your real name (sorry, no pseudonyms or anonymous contributions.) -``` - -If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with git commit -s. From 6976201a4d420f1896fd7a1a6d80095587e2e80f Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 1 Jul 2022 13:12:27 -0500 Subject: [PATCH 05/29] Fix typo in URLs Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b127ada..c1a1653a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -We happily welcome contributions to the `databricks-sql-connector` package. We use [GitHub Issues](https://githaub.com/databricks/databricks-sql-python/issues) to track community reported issues and [GitHub Pull Requests](https://githaub.com/databricks/databricks-sql-python/pulls) for accepting changes. +We happily welcome contributions to the `databricks-sql-connector` package. We use [GitHub Issues](https://github.com/databricks/databricks-sql-python/issues) to track community reported issues and [GitHub Pull Requests](https://github.com/databricks/databricks-sql-python/pulls) for accepting changes. Contributions are licensed on a license-in/license-out basis. From 88b7f027a954e3b80e1894570d5ae839f40e0776 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 15 Jul 2022 14:34:21 -0500 Subject: [PATCH 06/29] Rebased on latest main Signed-off-by: Jesse Whitehouse From 416acc435ab9345727251c5971cdc0a63270ad30 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 15 Jul 2022 14:36:12 -0500 Subject: [PATCH 07/29] Fix format error during rebase onto latest `main` Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1a1653a..ab714d72 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ +# Contributing Guide + We happily welcome contributions to the `databricks-sql-connector` package. We use [GitHub Issues](https://github.com/databricks/databricks-sql-python/issues) to track community reported issues and [GitHub Pull Requests](https://github.com/databricks/databricks-sql-python/pulls) for accepting changes. Contributions are licensed on a license-in/license-out basis. -# Contributing Guide - ## Communication Before starting work on a major feature, please reach out to us via GitHub, Slack, email, etc. We will make sure no one else is already working on it and ask you to open a GitHub issue. A "major feature" is defined as any change that is > 100 LOC altered (not including tests), or changes any user-facing behavior. From 16b438c547b5bac4dec102e6c7dc2817838035f4 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 15 Jul 2022 16:13:01 -0500 Subject: [PATCH 08/29] Add automatic DCO Check failure notification action. The check itself comes from the DCO Check GitHub app. These apps are tied directly to GitHub which is why the `app_id` is a known constant. It's the same id regardless of the repository it monitors. These were forked from MLFlow's public repository: https: //github.com/mlflow/mlflow/blob/master/.github/workflows/notify-dco-failure.js Signed-off-by: Jesse Whitehouse --- .github/workflows/notify-dco-failure.js | 49 ++++++++++++++++++++++++ .github/workflows/notify-dco-failure.yml | 21 ++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/notify-dco-failure.js create mode 100644 .github/workflows/notify-dco-failure.yml diff --git a/.github/workflows/notify-dco-failure.js b/.github/workflows/notify-dco-failure.js new file mode 100644 index 00000000..d9ab70d2 --- /dev/null +++ b/.github/workflows/notify-dco-failure.js @@ -0,0 +1,49 @@ +module.exports = async ({ context, github }) => { + const { owner, repo } = context.repo; + const { number: issue_number } = context.issue; + const ref = context.payload.pull_request.head.sha; + const { user } = context.payload.pull_request; + + function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + async function getDcoCheck() { + const backoffs = [0, 2, 4, 6, 8]; + const numAttempts = backoffs.length; + for (const [index, backoff] of backoffs.entries()) { + await sleep(backoff * 1000); + const resp = await github.checks.listForRef({ + owner, + repo, + ref, + app_id: 1861, // ID of the DCO check app + }); + + const { check_runs } = resp.data; + if (check_runs.length > 0 && check_runs[0].status === "completed") { + return check_runs[0]; + } + console.log( + `[Attempt ${index + 1}/${numAttempts}]`, + "The DCO check hasn't completed yet." + ); + } + } + + const dcoCheck = await getDcoCheck(); + if (dcoCheck.conclusion !== "success") { + const body = [ + `@${user.login} Thanks for the contribution! The DCO check failed. `, + `Please sign off your commits by following the instructions here: ${dcoCheck.html_url}. `, + "See https://github.com/databricks/databricks-sql-python/blob/main/CONTRIBUTING.md#sign-your-work for more ", + "details.", + ].join(""); + await github.issues.createComment({ + owner, + repo, + issue_number, + body, + }); + } + }; \ No newline at end of file diff --git a/.github/workflows/notify-dco-failure.yml b/.github/workflows/notify-dco-failure.yml new file mode 100644 index 00000000..939d5c87 --- /dev/null +++ b/.github/workflows/notify-dco-failure.yml @@ -0,0 +1,21 @@ +name: Notify DCO Failure + +on: + pull_request_target: + types: + - opened + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/github-script@v4 + with: + script: | + const script = require( + `${process.env.GITHUB_WORKSPACE}/.github/workflows/notify-dco-failure.js` + ); + script({ context, github }); \ No newline at end of file From a41e451c318faf5b0b58d168a3e872cb4805efe4 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 13:52:36 -0500 Subject: [PATCH 09/29] Revert "Add automatic DCO Check failure notification action." This reverts commit 16b438c547b5bac4dec102e6c7dc2817838035f4. We're going to use a GitHub Action for DCO checks instead of a GH App Signed-off-by: Jesse Whitehouse --- .github/workflows/notify-dco-failure.js | 49 ------------------------ .github/workflows/notify-dco-failure.yml | 21 ---------- 2 files changed, 70 deletions(-) delete mode 100644 .github/workflows/notify-dco-failure.js delete mode 100644 .github/workflows/notify-dco-failure.yml diff --git a/.github/workflows/notify-dco-failure.js b/.github/workflows/notify-dco-failure.js deleted file mode 100644 index d9ab70d2..00000000 --- a/.github/workflows/notify-dco-failure.js +++ /dev/null @@ -1,49 +0,0 @@ -module.exports = async ({ context, github }) => { - const { owner, repo } = context.repo; - const { number: issue_number } = context.issue; - const ref = context.payload.pull_request.head.sha; - const { user } = context.payload.pull_request; - - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - async function getDcoCheck() { - const backoffs = [0, 2, 4, 6, 8]; - const numAttempts = backoffs.length; - for (const [index, backoff] of backoffs.entries()) { - await sleep(backoff * 1000); - const resp = await github.checks.listForRef({ - owner, - repo, - ref, - app_id: 1861, // ID of the DCO check app - }); - - const { check_runs } = resp.data; - if (check_runs.length > 0 && check_runs[0].status === "completed") { - return check_runs[0]; - } - console.log( - `[Attempt ${index + 1}/${numAttempts}]`, - "The DCO check hasn't completed yet." - ); - } - } - - const dcoCheck = await getDcoCheck(); - if (dcoCheck.conclusion !== "success") { - const body = [ - `@${user.login} Thanks for the contribution! The DCO check failed. `, - `Please sign off your commits by following the instructions here: ${dcoCheck.html_url}. `, - "See https://github.com/databricks/databricks-sql-python/blob/main/CONTRIBUTING.md#sign-your-work for more ", - "details.", - ].join(""); - await github.issues.createComment({ - owner, - repo, - issue_number, - body, - }); - } - }; \ No newline at end of file diff --git a/.github/workflows/notify-dco-failure.yml b/.github/workflows/notify-dco-failure.yml deleted file mode 100644 index 939d5c87..00000000 --- a/.github/workflows/notify-dco-failure.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Notify DCO Failure - -on: - pull_request_target: - types: - - opened - -jobs: - notify: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - uses: actions/github-script@v4 - with: - script: | - const script = require( - `${process.env.GITHUB_WORKSPACE}/.github/workflows/notify-dco-failure.js` - ); - script({ context, github }); \ No newline at end of file From b9b2cb2d5efe9eb620b3e54d36e5d94eb675f547 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 13:56:47 -0500 Subject: [PATCH 10/29] Introduce GH Action for automated DCO Check Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/dco-check.yml diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml new file mode 100644 index 00000000..d2c660d0 --- /dev/null +++ b/.github/workflows/dco-check.yml @@ -0,0 +1,9 @@ +name: DCO Check + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: tisonkun/actions-dco@v1.1 \ No newline at end of file From 49919d5bd3817441988d3326e138f14499d624f0 Mon Sep 17 00:00:00 2001 From: Jesse Date: Fri, 29 Jul 2022 13:58:46 -0500 Subject: [PATCH 11/29] Update CONTRIBUTING.md Intentionally not signing this commit to make sure the automated DCO check behaves as expected. Signed-off-by: Jesse Whitehouse --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab714d72..386ba5da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,7 @@ Signed-off-by: Joe Smith Use your real name (sorry, no pseudonyms or anonymous contributions.) ``` -If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with git commit -s. +If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. ## Set up your environment From 185380566c94d74ffa0be35abf86c7e275c26fd6 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:46:14 -0500 Subject: [PATCH 12/29] Test: Attempt to auto-comment failures Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index d2c660d0..5a56072c 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -6,4 +6,17 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: tisonkun/actions-dco@v1.1 \ No newline at end of file + - name: Check for DCO + id: dco-check + uses: tisonkun/actions-dco@v1.1 + - name: Comment about DCO status + uses: actions/github-script@v6 + if: ${{ failure() }} + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "${{steps.dco-check.outputs.result}}" + }) From fe8a68895b6c63a5dc3a8939f4b111650374b5a1 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:52:06 -0500 Subject: [PATCH 13/29] Experimenting how to get error message from previous check Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 5a56072c..fa001908 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${{steps.dco-check.outputs.result}}" + body: "${{steps.dco-check.errors.*}}" }) From 8fdac4f7b14586ee652d99f8b388ef5985c5e426 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:53:28 -0500 Subject: [PATCH 14/29] Previous commit gave me access to the array. Now let's expand it. Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index fa001908..7cc60d78 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${{steps.dco-check.errors.*}}" + body: ${{join(steps.run_tests.errors.*, '\n')}} }) From 06bde92af2049bad206061b048e6c51fb1509a87 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:54:50 -0500 Subject: [PATCH 15/29] Next attempt to expand out the errors in a GH comment Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 7cc60d78..9d57a465 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${{join(steps.run_tests.errors.*, '\n')}} + body: ${{ steps.run_tests.errors }} }) From 5dcea64c408413f229d63469c2d900073999aa47 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:56:35 -0500 Subject: [PATCH 16/29] Revert "Next attempt to expand out the errors in a GH comment" This reverts commit 0a004498aa6824ab1c3252c5362cb6bfbd800834. Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 9d57a465..7cc60d78 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${{ steps.run_tests.errors }} + body: ${{join(steps.run_tests.errors.*, '\n')}} }) From 6668614aa4964cd9b01b8ff11977124a1d9e28b6 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:56:50 -0500 Subject: [PATCH 17/29] Found extra characters to remove. Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 7cc60d78..750bb1a4 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -19,4 +19,3 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: ${{join(steps.run_tests.errors.*, '\n')}} - }) From 1c2d2ab3ff7b5d3e9b42e1b74d04e186843fa87a Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:58:00 -0500 Subject: [PATCH 18/29] Fake commit to kickoff checks Signed-off-by: Jesse Whitehouse From 528c8def750708c88f15fc7676871239c03e52f2 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:59:12 -0500 Subject: [PATCH 19/29] Try again Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 750bb1a4..0464008d 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,4 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${{join(steps.run_tests.errors.*, '\n')}} + body: join(steps.run_tests.errors.*, '\n' + }) From e0e54e48e2ee7ab544a406223612760cccf85b12 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 14:59:58 -0500 Subject: [PATCH 20/29] Syntax error Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 0464008d..dafd9315 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: join(steps.run_tests.errors.*, '\n' + body: join(steps.run_tests.errors, '\n') }) From 3ffb49b5f58b48c61c597b91b74e37f32f97c3c2 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:00:38 -0500 Subject: [PATCH 21/29] join is not defined Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index dafd9315..1a61f58f 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: join(steps.run_tests.errors, '\n') + body: steps.run_tests.errors, }) From af955d531736520952acd490765272e4e85e6ea1 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:02:37 -0500 Subject: [PATCH 22/29] steps is not defined Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 1a61f58f..67d53ab0 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: steps.run_tests.errors, + body: ${{ steps.run_tests.errors }}, }) From 9f82f81360f7afbe5bd0b0aa3bec4d8bc260c46d Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:03:16 -0500 Subject: [PATCH 23/29] Unexpected token Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 67d53ab0..9d57a465 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${{ steps.run_tests.errors }}, + body: ${{ steps.run_tests.errors }} }) From e5054be34ce1c94412d15e992405c52842c515d7 Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:35:25 -0500 Subject: [PATCH 24/29] Try adding quotation marks Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 9d57a465..7bf07dbb 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: ${{ steps.run_tests.errors }} + body: "${{ steps.run_tests.errors }}" }) From 7380e739798a8cbb46e7191993ad797321ed0d1e Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:36:25 -0500 Subject: [PATCH 25/29] With join again Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 7bf07dbb..f9ace984 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${{ steps.run_tests.errors }}" + body: "${{ join(steps.run_tests.errors.*, '\n') }}" }) From ef7829b89b2e73e51a55181aea819b706ca25f8a Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:38:14 -0500 Subject: [PATCH 26/29] Check if .error contains any info Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index f9ace984..0acc5fa6 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${{ join(steps.run_tests.errors.*, '\n') }}" + body: "${{ steps.run_tests.error }}" }) From 71a68b80fc2ca7d56a57bbb4327d12751a8a046c Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:48:15 -0500 Subject: [PATCH 27/29] Provide generic message on failure Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 0acc5fa6..938de4b4 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,5 +18,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "${{ steps.run_tests.error }}" + body: `Thanks for your contribution! To satisfy the DCO policy in our [contributing guide](CONTRIBUTING.md) + every commit message must include a sign-off. You can retroactively apply this sign-off with an interactive rebase.` }) From deabb18b1e6312b273aa220df5bdb361819389bc Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:51:31 -0500 Subject: [PATCH 28/29] Clarify message formatting. Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 938de4b4..4a3ca334 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -18,6 +18,8 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `Thanks for your contribution! To satisfy the DCO policy in our [contributing guide](CONTRIBUTING.md) - every commit message must include a sign-off. You can retroactively apply this sign-off with an interactive rebase.` + body: `Thanks for your contribution! To satisfy the DCO policy in our \ + [contributing guide](https://github.com/databricks/databricks-sql-python/blob/main/CONTRIBUTING.md) \ + every commit message must include a sign-off. One or more of your commits is missing this sign-off message. \ + You can retroactively apply this sign-off with an interactive rebase.` }) From 7a646554bbd12d3a6613f9313fcb87bf936abd5c Mon Sep 17 00:00:00 2001 From: Jesse Whitehouse Date: Fri, 29 Jul 2022 15:53:50 -0500 Subject: [PATCH 29/29] More formatting Signed-off-by: Jesse Whitehouse --- .github/workflows/dco-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 4a3ca334..5a5c6060 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -20,6 +20,6 @@ jobs: repo: context.repo.repo, body: `Thanks for your contribution! To satisfy the DCO policy in our \ [contributing guide](https://github.com/databricks/databricks-sql-python/blob/main/CONTRIBUTING.md) \ - every commit message must include a sign-off. One or more of your commits is missing this sign-off message. \ - You can retroactively apply this sign-off with an interactive rebase.` + every commit message must include a sign-off message. One or more of your commits is missing this message. \ + You can reword previous commit messages with an interactive rebase (\`git rebase -i main\`).` })