Skip to content

How to Contribute

Daeun Yim edited this page Sep 27, 2023 · 5 revisions

Contributing to PostgreSQL extension for Azure Data Studio

There are many ways to contribute to this project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.

Build and Run From Source

If you want to understand how extension works or want to debug an issue, you'll want to get the source, build it, and run the tool locally.

Getting the sources

git clone https://github.com/Microsoft/azuredatastudio-postgresql.git

Installing Prerequisites

  • Git
  • Node.JS = v18.17.1
  • NPM = v9.6.7
  • Yarn, install by opening a Powershell window after installing Node and running npm i -g yarn
  • Gulp, install using npm install --global gulp-cli

Finally, install all dependencies using Yarn:

yarn

Build PostgreSQL extension

After you have these tools installed, run the following commands to clone github repository, install dependencies, and compile source code:

git clone https://github.com/Microsoft/azuredatastudio-postgresql.git
cd azuredatastudio-postgresql
yarn
yarn run compile

Packaging

Install vsce by running npm install -g vsce to be able to be to create a vsix package

  • Create online package yarn run package
  • Create offline packages for three OSes yarn run package-offline

Clean up build, npm modules and reset your local git repository to a clean state

git clean -fxd

Development Workflow

Debug extension

Debugging extension with VS Code

Debugging

You can use VS Code to debug the PostgreSQL extension on Azure Data Studio.

Debugging extension with VS Code Once you've downloaded the extension, launching the debugger will initiate an ADS window using the local repository. Ensure you set breakpoints within the compiled JavaScript code; breakpoints in TypeScript won't be effective.

Notice that the debugger utilizes the 'pgtoolsservice' defined in the config.json file without explicitly giving local pgtoolsservice directory to ADS extension setting. To leverage your local version of pgtoolsservice as the backend, refer to pgtoolsservice debugging page for further guidance.

Work Branches

Even if you have push rights on the Microsoft/azuredatastudio-postgresql repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your personal workflow cruft out of sight.

Pull Requests

Before we can accept a pull request from you, you'll need to sign a Contributor License Agreement (CLA). It is an automated process and you only need to do it once.

To enable us to quickly review and accept your pull requests, always create one pull request per issue and link the issue in the pull request. Never merge multiple requests in one unless they have the same root cause. Be sure to follow our coding guidelines and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible.

Where to Contribute

Check out the full issues list for a list of all potential areas for contributions.

To improve the chances to get a pull request merged you should select an issue that is labelled with the help-wanted or bug labels. If the issue you want to work on is not labelled with help-wanted or bug, you can start a conversation with the issue owner asking whether an external contribution will be considered.

Suggestions

We're also interested in your feedback for the future of PostgreSQL extension for Azure Data Studio. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.

Discussion Etiquette

In order to keep the conversation clear and transparent, please limit discussion to English and keep things on topic with the issue. Be considerate to others and try to be courteous and professional at all times.

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Clone this wiki locally