Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 1.74 KB

File metadata and controls

48 lines (40 loc) · 1.74 KB

Contributing

We love pull requests. For new features, consider opening an issue to discuss the idea first. When you're ready to open a pull requset, here's a quick guide.

  1. Fork, clone and branch off main:

    git clone git@github.com:<your-username>/datadog-lambda-js.git
    git checkout -b <my-branch>
  2. Install the repositories dependencies, yarn install.

  3. Make your changes.

  4. Test your Lambda function against the locally modified version of Datadog Lambda library.

    • The easiest approach is to use yarn link.

      yarn build # rebuild after changes
      cd dist
      yarn link
      cd /path/to/your/testing/function/
      yarn link "datadog-lambda-js" # use unlink after done
    • You can also build and publish a Lambda layer to your own AWS account and use it for testing.

      # Build layers using docker
      ./scripts/build_layers.sh
      
      # Publish the a testing layer to your own AWS account, and the ARN will be returned
      # Example: ./scripts/publish_layers.sh us-east-1
      ./scripts/publish_layers.sh <AWS_REGION>
  5. Update tests and ensure they pass

    yarn test
  6. Run the local docker-based integration tests (no AWS account needed — this is the behavioral gate that runs per PR):

    ./integration_tests_local/run.sh
  7. Rely on the end-to-end test suites for cases that require real AWS Lambda resources. See integration_tests/README.md.

  8. Push to your fork and submit a pull request.

At this point you're waiting on us. We may suggest some changes or improvements or alternatives.