Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 42 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
## Contributing In General
# Contributing to the Instana Python Sensor

Our project welcomes external contributions. If you have an itch, please feel
free to scratch it.

To contribute code or documentation, please submit a [pull request](https://github.com/instana/python-sensor/pulls).
To contribute with code, please submit a [pull request].

A good way to familiarize yourself with the codebase and contribution process is
to look for and tackle low-hanging fruit in the [issue tracker](https://github.com/instana/python-sensor/issues).
to look for and tackle low-hanging fruit in the [issue tracker].

<!--Before embarking on a more ambitious contribution, please quickly [get in touch](#communication) with us.-->

**Note: We appreciate your effort, and want to avoid a situation where a contribution
requires extensive rework (by you or by us), sits in backlog for a long time, or
cannot be accepted at all!**
**Note: We appreciate your effort, and want to avoid a situation where a
contribution requires extensive rework (by you or by us), sits in backlog for a
long time, or cannot be accepted at all!**

### Proposing new features
## Proposing new features

If you would like to implement a new feature, please [raise an issue](https://github.com/instana/python-sensor/issues)
before sending a pull request so the feature can be discussed. This is to avoid
If you would like to implement a new feature, please [raise an issue] before
sending a pull request so the feature can be discussed. This is to avoid
you wasting your valuable time working on a feature that the project developers
are not interested in accepting into the code base.

### Fixing bugs
Do not forget to add the labels `enhancement` or `feature` to your issue.

## Fixing bugs

If you would like to fix a bug, please [raise an issue](https://github.com/instana/python-sensor/issues) before sending a
If you would like to fix a bug, please [raise an issue] before sending a
pull request so it can be tracked.

### Merge approval
Do not forget to add the label `bug` to your issue.

The project maintainers use LGTM (Looks Good To Me) in comments on the code
review to indicate acceptance. A change requires LGTMs from two of the
maintainers of each component affected.
## Merge approval

The project maintainers use `LGTM` (Looks Good To Me) in comments on the code
review to indicate acceptance. A pull request requires LGTMs from, at least, one
of the maintainers of each component affected.

For a list of the maintainers, see the [MAINTAINERS.md](MAINTAINERS.md) page.

## Legal

Each source file must include a license header for the MIT
License. Using the SPDX format is the simplest approach.
e.g.
### Copyright

Each source file must include a Copyright header to IBM. When submitting a pull
request for review which contains new source code files, the developer must
include the following content in the beginning of the file.

```
/*
Copyright <holder> All Rights Reserved.
# (c) Copyright IBM Corp. <YEAR>

SPDX-License-Identifier: MIT
*/
```

### Sign your work

We have tried to make it as easy as possible to make contributions. This
applies to how we handle the legal aspects of contribution. We use the
same approach - the [Developer's Certificate of Origin 1.1 (DCO)](https://github.com/hyperledger/fabric/blob/master/docs/source/DCO1.1.txt) - that the Linux® Kernel [community](https://elinux.org/Developer_Certificate_Of_Origin)
uses to manage code contributions.
applies to how we handle the legal aspects of contribution.

We use the same approach - the [Developer's Certificate of Origin 1.1 (DCO)] - that the [Linux® Kernel community] uses to manage code contributions.

We simply ask that when submitting a patch for review, the developer
We simply ask that when submitting a pull request for review, the developer
must include a sign-off statement in the commit message.

Here is an example Signed-off-by line, which indicates that the
Expand All @@ -64,7 +71,7 @@ Signed-off-by: John Doe <john.doe@example.com>
You can include this automatically when you commit a change to your
local git repository using the following command:

```
```shell
git commit -s
```

Expand All @@ -84,3 +91,11 @@ before submitting.
**FIXME** Optional, but recommended: please share any specific style guidelines you might
have for your project.
-->

<!-- Reference links -->

[pull request]: https://github.com/instana/python-sensor/pulls "Python Sensor Pull Requests"
[issue tracker]: https://github.com/instana/python-sensor/issues "Python Sensor Issue Tracker"
[raise an issue]: https://github.com/instana/python-sensor/issues "Raise an issue"
[Developer's Certificate of Origin 1.1 (DCO)]: https://github.com/hyperledger/fabric/blob/master/docs/source/DCO1.1.txt "DCO1.1"
[Linux® Kernel community]: https://elinux.org/Developer_Certificate_Of_Origin "Linux Kernel DCO"
36 changes: 10 additions & 26 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
# Release Steps

## PyPI

_Note: To release a new Instana package, you must be a project member of the [Instana package project on Pypi](https://pypi.org/project/instana/).
Contact [Peter Giacomo Lombardo](https://github.com/pglombardo) to be added._

1. Before releasing, assure that [tests have passed](https://circleci.com/gh/instana/workflows/python-sensor) and that the package has also been manually validated in various stacks.
2. `git checkout main && git pull --rebase && pip install -U twine`
3. Bump the package version in `instana/version.py`. `git` commit & push the version change to the `main` branch
4. Create a [draft Release on Github](https://github.com/instana/python-sensor/releases) using [./bin/create_general_release.py](https://github.com/instana/python-sensor/blob/main/bin/create_general_release.py)
5. Run `python setup.py sdist bdist_wheel` to create the packages file in `./dist/`
6. Upload the package to Pypi with twine: `twine upload dist/instana-<version>*`
7. Validate the new release on https://pypi.org/project/instana/
8. Update Python documentation with latest changes: https://docs.instana.io/ecosystem/python/
9. Publish the draft release on [Github](https://github.com/instana/python-sensor/releases)
10. Ensure that the new [Concourse CI resource version](
https://ci.instana.io/teams/tracer-community/pipelines/tracer-test-suite:main/resources/instana-python-package)
has been discovered. Trigger it manually if the automation doesn't do it. Also ensure that the [update job](
https://ci.instana.io/teams/tracer-community/pipelines/tracer-test-suite%3Amain/jobs/update-python-package/)
and its downstream jobs are successfull. In particular the `run-test-suite` doesn't report any errors.
## PyPI and GitHub

The project has a GitHub Action that publishes new versions of the Instana Python Tracer to GitHub and [PyPI] using the [Trusted Publisher Management System].

Only the GitHub `@instana/python-eng` team members are allowed to publish a new version of the Instana Python Tracer.

## AWS Lambda Layer

To release a new AWS Lambda layer, see `bin/aws-lambda/lambda_build_publish_layer.py`.
On top of the common Instana Python Tracer release, the GitHub `@instana/python-eng` team members also publish versions of the Instana Python Tracer AWS Lambda layer.

```bash
./bin/aws-lambda/build_and_publish_lambda_layer.py [-dev|-prod]
./bin/create_lambda_release.py <version>
```
These releases are available on the GitHub Releases page.

These scripts assume that you have the AWS CLI and Github CLI installed and credentials already configured.
<!-- Reference links -->

Post release, remember to update documentation and the Instana UI.
[PyPI]: https://pypi.org/project/instana/ "Instana Python Tracer on PyPI"
[Trusted Publisher Management System]: https://docs.pypi.org/trusted-publishers/ "Trusted Publisher Management System"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ keywords = [
"distributed-tracing",
]
authors = [
{ name = "Instana Team Python Tracer Engineers" },
{ name = "Instana Python Tracer Engineers", email = "pythonrubyinstana@ibm.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
Loading