diff --git a/contributing.md b/contributing.md index d5f0142aa8a..b127afe919a 100644 --- a/contributing.md +++ b/contributing.md @@ -322,9 +322,16 @@ Example: `Fix typos in Foo scaladoc`

Pull request

+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. Fork the GitHub repository at https://github.com/apache/spark 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 -Running benchmarks in your forked repository +Running benchmarks in your forked repository 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 -Running tests in your forked repository. +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. Open a pull request 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 spark-prs.appspot.com and @@ -475,4 +484,4 @@ We expect this code of conduct to be honored by everyone who participates in the This code is not exhaustive or complete. 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 Apache Software Foundation Code of Conduct. \ No newline at end of file +For more information and specific guidelines, refer to the Apache Software Foundation Code of Conduct. diff --git a/developer-tools.md b/developer-tools.md index 7b669ae2f87..e64d56c4394 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. - -

Running tests in your forked repository

- -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. - - -

Running benchmarks in your forked repository

diff --git a/images/running-tests-using-github-actions.png b/images/running-tests-using-github-actions.png deleted file mode 100644 index 819203e4bbf..00000000000 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 3a1c1b2f995..fbcb0007b10 100644 --- a/site/contributing.html +++ b/site/contributing.html @@ -503,10 +503,16 @@

JIRA

Pull request

+

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. Fork the GitHub repository at https://github.com/apache/spark if you haven’t already
  2. -
  3. Clone your fork, create a new branch, push commits to the branch.
  4. +
  5. Go to “Actions” tab on your forked repository and enable “Build and test” and “Report test results” workflows
  6. +
  7. Clone your fork and create a new branch
  8. Consider whether documentation or tests need to be added or updated as part of the change, and add them as needed.
      @@ -543,14 +549,16 @@

      Pull request

  9. Consider whether benchmark results should be added or updated as part of the change, and add them as needed by -Running benchmarks in your forked repository +Running benchmarks in your forked repository to generate benchmark results.
  10. 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 -Running tests in your forked repository. +passes style checks. If style checks fail, review the Code Style Guide below.
  11. +
  12. 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.
  13. Open a pull request 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 diff --git a/site/developer-tools.html b/site/developer-tools.html index 1b073e72f91..477a1ea0ee7 100644 --- a/site/developer-tools.html +++ b/site/developer-tools.html @@ -374,25 +374,6 @@

      Testing with GitHub actions workflow

      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.

      -

      -

      Running tests in your forked repository

      - -

      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.
      • -
      - -

      -

      Running benchmarks in your forked repository

      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 819203e4bbf..00000000000 Binary files a/site/images/running-tests-using-github-actions.png and /dev/null differ