-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs] Cleanup docs on contributing #369
base: main
Are you sure you want to change the base?
Changes from all commits
6c29bc0
094d484
9ed70f6
197ea00
ae415f4
1faa8d4
e56f07b
89e48bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,11 @@ This page gives an overview of how to contribute to the project. Please read ove | |
|
||
contributing/prerequisites.rst | ||
contributing/building.rst | ||
contributing/contributing-issues.rst | ||
contributing/writing-go.rst | ||
contributing/known-issues.rst | ||
|
||
Overview | ||
---------- | ||
|
||
Paraglider provides a streamlined interface for users to manage their cloud network resources. | ||
Cloud customers interact with the Paraglider APIs exposed by the Paraglider controller. | ||
The controller is responsible for provisioning and updating the relevant cloud network resources based on the requests from the user. | ||
|
@@ -27,6 +26,7 @@ For more information about the design and architecture, please refer to :ref:`ho | |
|
||
Guidelines | ||
------------------ | ||
|
||
We always welcome minor contributions like documentation improvements, typo corrections, bug fixes, and minor features in the form of pull requests. | ||
You are also welcome to `choose an existing issue <https://github.com/paraglider-project/paraglider/issues>`_, or `create an issue to work on <https://github.com/paraglider-project/paraglider/issues/new>`_. | ||
|
||
|
@@ -45,7 +45,7 @@ Contributors sign-off that they adhere to these requirements by adding a Signed- | |
|
||
Signed-off-by: Random J Developer <[email protected]> | ||
|
||
We provide a Git Hook to automatically add this line to your commit messages. You can install it by running the following command after installing the repo. | ||
We provide a Git Hook to automatically add this line to your commit messages. You can install it by running the following command after cloning the repo. | ||
|
||
.. code-block:: console | ||
|
||
|
@@ -57,13 +57,13 @@ If you'd like to do this manually, git has a ``-s`` command line option to appen | |
|
||
$ git commit -s -m 'This is my commit message' | ||
|
||
Visual Studio Code has a setting, git.alwaysSignOff to automatically add a Signed-off-by line to commit messages. Search for "sign-off" in VS Code settings to find it and enable it. | ||
|
||
VS Code has a setting, git.alwaysSignOff to automatically add a Signed-off-by line to commit messages. Search for "sign-off" in VS Code settings to find it and enable it. | ||
|
||
Creating issues | ||
-------------------- | ||
Please create issues for needed work and bugs in the `repo <https://github.com/paraglider-project/paraglider/issues>`_. | ||
|
||
Please create issues for needed work and bugs in the `repo <https://github.com/paraglider-project/paraglider/issues>`_. | ||
Please provide as much information as possible, including the version of the software you are using, the operating system, and the steps to reproduce the issue. | ||
|
||
Sending pull requests | ||
---------------------- | ||
|
@@ -75,10 +75,7 @@ Code of Conduct | |
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. | ||
For more information, see the `Contributor Covenant Code of Conduct 2.1 <https://www.contributor-covenant.org/version/2/1/code_of_conduct/>`_. | ||
|
||
|
||
Troubleshooting and getting help | ||
--------------------------------- | ||
* Have a question? - Visit our Discord (linked on our homepage) to post your question and we'll get back to you ASAP | ||
* Found an issue? - Refer to :ref:`contributingissues` on filing a bug report | ||
* Have a proposal? - Refer to :ref:`contributingissues` for instructions on filing a feature request | ||
|
||
If you have a question, please visit our Discord (linked at the footer) to post your question and we'll get back to you ASAP | ||
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,74 +3,61 @@ | |||||
Prerequisites | ||||||
============= | ||||||
|
||||||
Prerequisites for working with the repo | ||||||
----------------------------------------- | ||||||
This section lists the prerequisites for working with the repository. Most contributors should start with the basic prerequisites. | ||||||
This section lists the prerequisites for working with the repository. | ||||||
Most contributors should start with the basic prerequisites. | ||||||
Depending on the task you need to perform, you may need to install more tools. | ||||||
|
||||||
We also provide a `Devcontainer <https://code.visualstudio.com/docs/devcontainers/containers>`_ for working with this repository without installing prerequisites. | ||||||
Keep reading for instructions. | ||||||
VS Code Setup | ||||||
------------- | ||||||
|
||||||
Operating system | ||||||
^^^^^^^^^^^^^^^^^^^^ | ||||||
We support developing on macOS, Linux and Windows with `WSL <https://docs.microsoft.com/windows/wsl/install>`_. | ||||||
|
||||||
Asking for help | ||||||
^^^^^^^^^^^^^^^^^^^^ | ||||||
If you get stuck installing any of our dependencies, you can raise an issue or ask for help in our `discord <https://discordapp.com/channels/1116864463832891502/11168644638328915074>`_. | ||||||
|
||||||
Required tools | ||||||
^^^^^^^^^^^^^^^^^^^^ | ||||||
This is the list of core dependencies to install for the most common tasks. In general we expect all contributors to have all of these tools present: | ||||||
We recommend using VS Code for Paraglider development because we provide a `dev container <https://code.visualstudio.com/docs/devcontainers/containers>`_. | ||||||
Dev containers allow you to run a development environment using VS Code inside a container, which means you don't need to install any dependencies on your local machine. | ||||||
|
||||||
- `Git <https://git-scm.com>`_ | ||||||
- `Go <https://golang.org/>`_ | ||||||
- `golangci-lint <https://golangci-lint.run>`_ | ||||||
- `protoc <https://grpc.io/docs/protoc-installation>`_ | ||||||
- make | ||||||
#. `Get VS Code set up to use dev containers <https://code.visualstudio.com/docs/devcontainers/containers#_getting-started>`_. | ||||||
#. `In VS Code, open the cloned repository in a container <https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-an-existing-folder-in-a-container>`_. | ||||||
|
||||||
* Linux: Install the ``build-essential`` package: | ||||||
|
||||||
.. code-block:: console | ||||||
|
||||||
$ apt install build-essential | ||||||
|
||||||
Then install ``make``: | ||||||
.. note:: | ||||||
|
||||||
.. code-block:: console | ||||||
The first time you open the repository in a container, it will take a while to download and install the prerequisites. | ||||||
seankimkdy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
Subsequent opens will be much faster. | ||||||
|
||||||
$ apt install make | ||||||
|
||||||
* Mac: | ||||||
#. `Install the Go extension <https://marketplace.visualstudio.com/items?itemName=golang.go>`_. | ||||||
#. Configure linter. | ||||||
|
||||||
You may see the following error from ``gopls`` in the ``*_test.go`` files. | ||||||
|
||||||
Xcode | ||||||
This file is within module ".", which is not included in your workspace. | ||||||
To fix this problem, you can add a go.work file that uses this directory. | ||||||
See the documentation for more information on setting up your workspace: | ||||||
https://github.com/golang/tools/blob/master/gopls/doc/workspace.md. | ||||||
|
||||||
.. code-block:: console | ||||||
|
||||||
$ xcode-select --install | ||||||
|
||||||
Homebrew | ||||||
Specify the following in your ``settings.json``. | ||||||
|
||||||
.. code-block:: console | ||||||
.. code-block:: json | ||||||
|
||||||
$ brew install make | ||||||
|
||||||
Testing Required Tools | ||||||
^^^^^^^^^^^^^^^^^^^^^^^ | ||||||
If you have not already done so, clone the repository and navigate there in your command shell. | ||||||
"go.buildTags": "unit,integration,multicloud" | ||||||
|
||||||
You can build the main outputs using ``make``: | ||||||
Required Tools | ||||||
-------------- | ||||||
|
||||||
.. code-block:: console | ||||||
This is the list of core dependencies to install for the most common tasks. | ||||||
In general we expect all contributors to have all of these tools present. | ||||||
|
||||||
$ make build lint | ||||||
- `make <https://www.gnu.org/software/make/>`_ | ||||||
- `Go <https://golang.org/>`_ | ||||||
- `protoc <https://grpc.io/docs/protoc-installation>`_ | ||||||
- `protoc-gen-go <https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go>`_ | ||||||
- `protoc-gen-go-grpc <https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc>`_ | ||||||
- `redis <https://redis.io>`_ | ||||||
- `golangci-lint <https://golangci-lint.run>`_ | ||||||
|
||||||
Running these steps will run our build and lint steps and verify that the tools are installed correctly. | ||||||
If you get stuck or suspect something is not working in these instructions please raise an issue or ask for help in our Discord linked on our homepage. | ||||||
Running Functional Tests | ||||||
------------------------ | ||||||
|
||||||
**Integration/Multicloud Tests** | ||||||
Paraglider uses both unit and functional tests. | ||||||
While unit tests use a fake cloud provider, functional tests make API calls to real cloud providers, which requires further setup. | ||||||
|
||||||
Our integration/multicloud tests perform real requests to cloud providers. You can run these with the following commands | ||||||
You can run these with the following commands | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
.. code-block:: console | ||||||
|
||||||
|
@@ -79,9 +66,11 @@ Our integration/multicloud tests perform real requests to cloud providers. You c | |||||
|
||||||
Note that the ``make test`` command only runs unit tests. | ||||||
|
||||||
If you would like to run these locally, you will need to be authenticated. The following are the steps for each respective cloud provider. | ||||||
If you would like to run these locally, you will need to be authenticated. | ||||||
The following are the steps for each respective cloud provider. | ||||||
|
||||||
**Google Cloud** | ||||||
Google Cloud | ||||||
^^^^^^^^^^^^ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the below, I am confused by the second bullet under the last numbered point. Isn't it that you choose this if you want to not delete the project? I think the beginning of the point doesn't really capture that. I would then also specifically say that you must then delete everything on your own, and here is the order to do that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not exactly. For not deleting the project, we have ![]() |
||||||
|
||||||
#. `Install the gcloud CLI <https://cloud.google.com/sdk/docs/install>`_. If you're using the dev container, this will already be installed for you. | ||||||
#. `Set up your application default credentials <https://cloud.google.com/docs/authentication/provide-credentials-adc>`_. | ||||||
|
@@ -94,13 +83,14 @@ If you would like to run these locally, you will need to be authenticated. The f | |||||
|
||||||
This requires privileges of creating projects and linking billing accounts. | ||||||
|
||||||
* If you want to use your own project, set the environment variable ``PARAGLIDER_GCP_PROJECT``. The order for deleting resources when deleting through the console: instances, VPN tunnels, VPN gateway + peer/external VPN gateways + router, VPC. The connectivity tests can be deleted at any time. | ||||||
* If you want to use your own project instead of creating a new one, set the environment variable ``PARAGLIDER_GCP_PROJECT``. The order for deleting resources when deleting through the console: instances, VPN tunnels, VPN gateway + peer/external VPN gateways + router, VPC. The connectivity tests can be deleted at any time. | ||||||
|
||||||
.. warning:: | ||||||
|
||||||
Resources will not automatically be cleaned up for you. | ||||||
The project will not be deleted, and resources allocated by the tests will not automatically be cleaned up for you. | ||||||
|
||||||
**Azure** | ||||||
Azure | ||||||
^^^^^ | ||||||
|
||||||
#. `Install azure cli <https://learn.microsoft.com/en-us/cli/azure/install-azure-cli>`_. If you're using the dev container, this will already be installed for you. | ||||||
#. `Authenticate to your account with azure login <https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli>`_. | ||||||
|
@@ -112,50 +102,24 @@ If you would like to run these locally, you will need to be authenticated. The f | |||||
|
||||||
Resource group must be created before running the test. | ||||||
|
||||||
|
||||||
If you'd like to persist resources after a test (i.e., not teardown project/resource group), you can set the environment variable ``PARAGLIDER_TEST_PERSIST`` to ``1``. | ||||||
|
||||||
**IBM** | ||||||
IBM | ||||||
^^^ | ||||||
|
||||||
#. Set environment variable ``PARAGLIDER_IBM_API_KEY`` with an ``IAM API`` key. Create a key on `IBM's web console <https://cloud.ibm.com/iam/apikeys>`_. | ||||||
#. Set environment variable ``PARAGLIDER_IBM_RESOURCE_GROUP_ID`` with a resource group ID. | ||||||
Pick a resource group from `IBM's web console <https://cloud.ibm.com/account/resource-groups>`__. | ||||||
|
||||||
| Cleanup function, terminating all Paraglider resources on IBM, is executed automatically when tests end, unless ``INVISINETS_TEST_PERSIST`` is set to ``1``. | ||||||
|
||||||
Editor | ||||||
-------------------- | ||||||
If you don't have a code editor set up for Go, we recommend VS Code. The experience with VS Code is high-quality and approachable for newcomers. | ||||||
|
||||||
Alternatively, you can choose whichever editor you are most comfortable for working on Go code. Feel free to skip this section if you want to make another choice. | ||||||
|
||||||
- `Visual Studio Code <https://code.visualstudio.com/>`_ | ||||||
- `Go extension <https://marketplace.visualstudio.com/items?itemName=golang.go>`_ | ||||||
|
||||||
Launching VS Code | ||||||
Persisting Resources | ||||||
^^^^^^^^^^^^^^^^^^^^ | ||||||
The best way to launch VS Code for Go is to do *File* > *Open Folder* on the repository. | ||||||
|
||||||
You can easily do this from the command shell with ``code .``, which opens the current directory as a folder in VS Code. | ||||||
|
||||||
|
||||||
Using the Dev Container | ||||||
------------------------ | ||||||
Dev Containers allow you to run a development environment using VS Code inside a container. If you want to try this: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it still valuable to at least have the pre-reqs for the dev container? Or is it explained enough in what you link above? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link is the official VS Code guideline, but I think you're right in that this short statement would be helpful as dev containers are not expected knowledge. I updated the wording under "VS Code Setup". |
||||||
|
||||||
- Install `Docker <https://code.visualstudio.com/docs/devcontainers/containers#_system-requirements>`_ | ||||||
- Install `VS Code <https://code.visualstudio.com/>`_ | ||||||
- Install the `Dev Container extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_ | ||||||
|
||||||
Now when you open the Paraglider repo, you will be prompted with the option to open in a Dev Container. | ||||||
This will take a few minutes the first time to download and build the container, but will be much faster on subsequent opens. | ||||||
|
||||||
Additional Tools | ||||||
-------------------- | ||||||
The functional tests will automatically clean up any resources they create before completing the test run. | ||||||
If you'd like to persist resources after a test (i.e., not teardown project/resource group), you can set the environment variable ``PARAGLIDER_TEST_PERSIST`` to ``1``. | ||||||
|
||||||
Test summaries | ||||||
^^^^^^^^^^^^^^^^^^^^ | ||||||
The default ``go test`` output can be hard to read when you have many tests. We recommend ``gotestsum`` as a tool to solve this. | ||||||
Our ``make test`` command will automatically use ``gotestsum`` if it is available. | ||||||
Optional Tools | ||||||
-------------- | ||||||
|
||||||
- `gotestsum <https://github.com/gotestyourself/gotestsum#install>`_ | ||||||
- `gotestsum <https://github.com/gotestyourself/gotestsum#install>`_ for better test summaries | ||||||
|
||||||
The default ``go test`` output can be hard to read when you have many tests. | ||||||
We recommend ``gotestsum`` as a tool to solve this. | ||||||
Our ``make test`` command will automatically use ``gotestsum`` if available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: