This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/spark-website.git
The following commit(s) were added to refs/heads/asf-site by this push: new 991df19 Contribution guide to document actual guide for pull requests 991df19 is described below commit 991df1959e2381dfd32dadce39cbfa2be80ec0c6 Author: khalidmammadov <xmame...@hotmail.com> AuthorDate: Fri Feb 4 17:07:55 2022 -0600 Contribution guide to document actual guide for pull requests Currently contribution guide does not reflect actual flow to raise a new PR and hence it's not clear (for a new contributors) what exactly needs to be done to make a PR for Spark repository and test it as per expectation. This PR addresses that by following: - It describes in the Pull request section of the Contributing page the actual procedure and takes a contributor through a step by step process. - It removes optional "Running tests in your forked repository" section on Developer Tools page which is obsolete now and doesn't reflect reality anymore i.e. it says we can test by clicking “Run workflow” button which is not available anymore as workflow does not use "workflow_dispatch" event trigger anymore and was removed in https://github.com/apache/spark/pull/32092 - Instead it documents the new procedure that above PR introduced i.e. contributors needs to use their own GitHub free workflow credits to test new changes they are purposing and a Spark Actions workflow will expect that to be completed before marking PR to be ready for a review. - Some general wording was copied from "Running tests in your forked repository" section on Developer Tools page but main content was rewritten to meet objective - Also fixed URL to developer-tools.html to be resolved by parser (that converted it into relative URI) instead of using hard coded absolute URL. Tested imperically with `bundle exec jekyll serve` and static files were generated with `bundle exec jekyll build` commands This closes https://issues.apache.org/jira/browse/SPARK-37996 Author: khalidmammadov <xmame...@hotmail.com> Closes #378 from khalidmammadov/fix_contribution_workflow_guide. --- contributing.md | 21 +++++++++++++++------ developer-tools.md | 17 ----------------- images/running-tests-using-github-actions.png | Bin 312696 -> 0 bytes site/contributing.html | 18 +++++++++++++----- site/developer-tools.html | 19 ------------------- site/images/running-tests-using-github-actions.png | Bin 312696 -> 0 bytes 6 files changed, 28 insertions(+), 47 deletions(-) diff --git a/contributing.md b/contributing.md index d5f0142..b127afe 100644 --- a/contributing.md +++ b/contributing.md @@ -322,9 +322,16 @@ Example: `Fix typos in Foo scaladoc` <h3>Pull request</h3> +Before creating a pull request in Apache Spark, it is important to check if tests can pass on your branch because +our GitHub Actions workflows automatically run tests for your pull request/following commits +and every run burdens the limited resources of GitHub Actions in Apache Spark repository. +Below steps will take your through the process. + + 1. <a href="https://help.github.com/articles/fork-a-repo/">Fork</a> the GitHub repository at <a href="https://github.com/apache/spark">https://github.com/apache/spark</a> if you haven't already -1. Clone your fork, create a new branch, push commits to the branch. +1. Go to "Actions" tab on your forked repository and enable "Build and test" and "Report test results" workflows +1. Clone your fork and create a new branch 1. Consider whether documentation or tests need to be added or updated as part of the change, and add them as needed. 1. When you add tests, make sure the tests are self-descriptive. @@ -355,14 +362,16 @@ and add them as needed. ... ``` 1. Consider whether benchmark results should be added or updated as part of the change, and add them as needed by -<a href="https://spark.apache.org/developer-tools.html#github-workflow-benchmarks">Running benchmarks in your forked repository</a> +<a href="{{site.baseurl}}/developer-tools.html#github-workflow-benchmarks">Running benchmarks in your forked repository</a> to generate benchmark results. 1. Run all tests with `./dev/run-tests` to verify that the code still compiles, passes tests, and -passes style checks. Alternatively you can run the tests via GitHub Actions workflow by -<a href="https://spark.apache.org/developer-tools.html#github-workflow-tests">Running tests in your forked repository</a>. +passes style checks. If style checks fail, review the Code Style Guide below. +1. Push commits to your branch. This will trigger "Build and test" and "Report test results" workflows +on your forked repository and start testing and validating your changes. 1. <a href="https://help.github.com/articles/using-pull-requests/">Open a pull request</a> against -the `master` branch of `apache/spark`. (Only in special cases would the PR be opened against other branches.) +the `master` branch of `apache/spark`. (Only in special cases would the PR be opened against other branches). This +will trigger workflows "On pull request*" (on Spark repo) that will look/watch for successful workflow runs on "your" forked repository (it will wait if one is running). 1. The PR title should be of the form `[SPARK-xxxx][COMPONENT] Title`, where `SPARK-xxxx` is the relevant JIRA number, `COMPONENT `is one of the PR categories shown at <a href="https://spark-prs.appspot.com/">spark-prs.appspot.com</a> and @@ -475,4 +484,4 @@ We expect this code of conduct to be honored by everyone who participates in the This code <u>is not exhaustive or complete</u>. It serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter, so that it can enrich all of us and the technical communities in which we participate. -For more information and specific guidelines, refer to the <a href="https://www.apache.org/foundation/policies/conduct.html">Apache Software Foundation Code of Conduct</a>. \ No newline at end of file +For more information and specific guidelines, refer to the <a href="https://www.apache.org/foundation/policies/conduct.html">Apache Software Foundation Code of Conduct</a>. diff --git a/developer-tools.md b/developer-tools.md index 7b669ae..e64d56c 100644 --- a/developer-tools.md +++ b/developer-tools.md @@ -246,23 +246,6 @@ Kubernetes, and more importantly, minikube have rapid release cycles, and point Apache Spark leverages GitHub Actions that enables continuous integration and a wide range of automation. Apache Spark repository provides several GitHub Actions workflows for developers to run before creating a pull request. -<a name="github-workflow-tests"></a> -<h4>Running tests in your forked repository</h4> - -Before creating a pull request in Apache Spark, it is important to check if tests can pass on your branch because our GitHub Acrions workflows automatically run tests for your pull request/following commits, and every run burdens the limited resources of GitHub Actions in Apache Spark repository. - -Apache Spark repository has a workflow that enables you to run the same tests for a branch in your own forked repository that does not burden the resource from Apache Spark repository. - -For example, suppose that you have a branch named "your_branch" for a pull request. -To run tests on "your_branch" and check test results: - -- Click the "Actions" tab in your forked repository. -- Select the "Build and test" workflow in the "All workflows" list. -- Click the "Run workflow" button and enter "your_branch" in the "Target branch to run" field. -- Once the "Build and test" workflow is finished, click the "Report test results" workflow to check test results. - -<img src="/images/running-tests-using-github-actions.png" style="width: 100%; max-width: 800px;" /> - <a name="github-workflow-benchmarks"></a> <h4>Running benchmarks in your forked repository</h4> diff --git a/images/running-tests-using-github-actions.png b/images/running-tests-using-github-actions.png deleted file mode 100644 index 819203e..0000000 Binary files a/images/running-tests-using-github-actions.png and /dev/null differ diff --git a/site/contributing.html b/site/contributing.html index 3a1c1b2..fbcb000 100644 --- a/site/contributing.html +++ b/site/contributing.html @@ -503,10 +503,16 @@ Example: <code class="language-plaintext highlighter-rouge">Fix typos in Foo sca <h3>Pull request</h3> +<p>Before creating a pull request in Apache Spark, it is important to check if tests can pass on your branch because +our GitHub Actions workflows automatically run tests for your pull request/following commits +and every run burdens the limited resources of GitHub Actions in Apache Spark repository. +Below steps will take your through the process.</p> + <ol> <li><a href="https://help.github.com/articles/fork-a-repo/">Fork</a> the GitHub repository at <a href="https://github.com/apache/spark">https://github.com/apache/spark</a> if you haven’t already</li> - <li>Clone your fork, create a new branch, push commits to the branch.</li> + <li>Go to “Actions” tab on your forked repository and enable “Build and test” and “Report test results” workflows</li> + <li>Clone your fork and create a new branch</li> <li>Consider whether documentation or tests need to be added or updated as part of the change, and add them as needed. <ol> @@ -543,14 +549,16 @@ public void testCase() { </ol> </li> <li>Consider whether benchmark results should be added or updated as part of the change, and add them as needed by -<a href="https://spark.apache.org/developer-tools.html#github-workflow-benchmarks">Running benchmarks in your forked repository</a> +<a href="/developer-tools.html#github-workflow-benchmarks">Running benchmarks in your forked repository</a> to generate benchmark results.</li> <li>Run all tests with <code class="language-plaintext highlighter-rouge">./dev/run-tests</code> to verify that the code still compiles, passes tests, and -passes style checks. Alternatively you can run the tests via GitHub Actions workflow by -<a href="https://spark.apache.org/developer-tools.html#github-workflow-tests">Running tests in your forked repository</a>. +passes style checks. If style checks fail, review the Code Style Guide below.</li> + <li>Push commits to your branch. This will trigger “Build and test” and “Report test results” workflows +on your forked repository and start testing and validating your changes.</li> <li><a href="https://help.github.com/articles/using-pull-requests/">Open a pull request</a> against -the <code class="language-plaintext highlighter-rouge">master</code> branch of <code class="language-plaintext highlighter-rouge">apache/spark</code>. (Only in special cases would the PR be opened against other branches.) +the <code class="language-plaintext highlighter-rouge">master</code> branch of <code class="language-plaintext highlighter-rouge">apache/spark</code>. (Only in special cases would the PR be opened against other branches). This +will trigger workflows “On pull request*” (on Spark repo) that will look/watch for successful workflow runs on “your” forked repository (it will wait if one is running). <ol> <li>The PR title should be of the form <code class="language-plaintext highlighter-rouge">[SPARK-xxxx][COMPONENT] Title</code>, where <code class="language-plaintext highlighter-rouge">SPARK-xxxx</code> is the relevant JIRA number, <code class="language-plaintext highlighter-rouge">COMPONENT </code>is one of the PR categories shown at diff --git a/site/developer-tools.html b/site/developer-tools.html index 1b073e7..477a1ea 100644 --- a/site/developer-tools.html +++ b/site/developer-tools.html @@ -374,25 +374,6 @@ minikube stop <p>Apache Spark leverages GitHub Actions that enables continuous integration and a wide range of automation. Apache Spark repository provides several GitHub Actions workflows for developers to run before creating a pull request.</p> -<p><a name="github-workflow-tests"></a></p> -<h4>Running tests in your forked repository</h4> - -<p>Before creating a pull request in Apache Spark, it is important to check if tests can pass on your branch because our GitHub Acrions workflows automatically run tests for your pull request/following commits, and every run burdens the limited resources of GitHub Actions in Apache Spark repository.</p> - -<p>Apache Spark repository has a workflow that enables you to run the same tests for a branch in your own forked repository that does not burden the resource from Apache Spark repository.</p> - -<p>For example, suppose that you have a branch named “your_branch” for a pull request. -To run tests on “your_branch” and check test results:</p> - -<ul> - <li>Click the “Actions” tab in your forked repository.</li> - <li>Select the “Build and test” workflow in the “All workflows” list.</li> - <li>Click the “Run workflow” button and enter “your_branch” in the “Target branch to run” field.</li> - <li>Once the “Build and test” workflow is finished, click the “Report test results” workflow to check test results.</li> -</ul> - -<p><img src="/images/running-tests-using-github-actions.png" style="width: 100%; max-width: 800px;" /></p> - <p><a name="github-workflow-benchmarks"></a></p> <h4>Running benchmarks in your forked repository</h4> diff --git a/site/images/running-tests-using-github-actions.png b/site/images/running-tests-using-github-actions.png deleted file mode 100644 index 819203e..0000000 Binary files a/site/images/running-tests-using-github-actions.png and /dev/null differ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org