Skip to content

Commit bc6f0a9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into majorgreys/feature/ext_asgi
2 parents edc6044 + 06bab74 commit bc6f0a9

13 files changed

Lines changed: 139 additions & 105 deletions

File tree

.github/workflows/prepare-release.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,24 @@ jobs:
1414
python-version: '3.7'
1515
- name: Build wheels
1616
run: ./scripts/build.sh
17+
- name: Install twine
18+
run: |
19+
pip install twine
20+
# The step below publishes to testpypi in order to catch any issues
21+
# with the package configuration that would cause a failure to upload
22+
# to pypi. One example of such a failure is if a classifier is
23+
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
24+
# middle of the package upload causing the action to fail, and certain packages
25+
# might have already been updated, this would be bad.
26+
- name: Publish to TestPyPI
27+
env:
28+
TWINE_USERNAME: ${{ secrets.test_pypi_username }}
29+
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
30+
run: |
31+
twine upload --repository testpypi --skip-existing --verbose dist/*
1732
- name: Publish to PyPI
1833
env:
1934
TWINE_USERNAME: '__token__'
2035
TWINE_PASSWORD: ${{ secrets.pypi_password }}
2136
run: |
22-
pip install twine
2337
twine upload --skip-existing --verbose dist/*

RELEASING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Releasing OpenTelemetry Packages (for maintainers only)
2+
This document explains how to publish all OT modules at version x.y.z. Ensure that you’re following semver when choosing a version number.
3+
4+
Release Process:
5+
* [Create a new branch](#create-a-new-branch)
6+
* [Open a Pull Request](#open-a-pull-request)
7+
* [Create a Release](#Create-a-Release)
8+
* [Move stable tag](#Move-stable-tag)
9+
* [Update master](#Update-master)
10+
* [Check PyPI](#Check-PyPI)
11+
* [Troubleshooting](#troubleshooting)
12+
13+
14+
## Create a new branch
15+
The following script does the following:
16+
- update master locally
17+
- creates a new release branch `release/<version>`
18+
- updates version and changelog files
19+
- commits the change to a new branch `release/<version>-auto`
20+
21+
*NOTE: This script was run by a GitHub Action but required the Action bot to be excluded from the CLA check, which it currently is not.*
22+
23+
```bash
24+
./scripts/prepare_release.sh 0.7b0
25+
```
26+
27+
## Open a Pull Request
28+
29+
The PR should be opened from the `release/<version>-auto` branch created as part of running `prepare_release.sh` in the steps above.
30+
31+
## Create a Release
32+
33+
- Create the GH release from the release branch, using a new tag for this micro version, e.g. `v0.7.0`
34+
- Copy the changelogs from all packages that changed into the release notes (and reformat to remove hard line wraps)
35+
36+
37+
## Check PyPI
38+
39+
This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python/blob/master/.github/workflows/publish.yml).
40+
41+
- Check the [action logs](https://github.com/open-telemetry/opentelemetry-python/actions?query=workflow%3APublish) to make sure packages have been uploaded to PyPI
42+
- Check the release history (e.g. https://pypi.org/project/opentelemetry-api/#history) on PyPI
43+
44+
If for some reason the action failed, see [Publish failed](#publish-failed) below
45+
46+
## Move stable tag
47+
48+
This will ensure the docs are pointing at the stable release.
49+
50+
```bash
51+
git tag -d stable
52+
git tag stable
53+
git push origin stable
54+
```
55+
56+
## Update master
57+
58+
Ensure the version and changelog updates have been applied to master.
59+
60+
```bash
61+
# checkout a new branch from master
62+
git checkout -b v0.7b0-master-update
63+
# cherry pick the change from the release branch
64+
git cherry-pick $(git log -n 1 origin/release/0.7b0 --format="%H")
65+
# update the version number, make it a "dev" greater than release number, e.g. 0.8.dev0
66+
perl -i -p -e 's/0.7b0/0.8.dev0/' $(git grep -l "0.7b0" | grep -vi CHANGELOG)
67+
# open a PR targeting master see #331
68+
git commit -m
69+
```
70+
71+
## Troubleshooting
72+
73+
### Publish failed
74+
75+
If for some reason the action failed, do it manually:
76+
77+
- To avoid pushing untracked changes, check out the repo in a new dir
78+
- Switch to the release branch (important so we don't publish packages with "dev" versions)
79+
- Build distributions with `./scripts/build.sh`
80+
- Delete distributions we don't want to push (e.g. `testutil`)
81+
- Push to PyPI as `twine upload --skip-existing --verbose dist/*`
82+
- Double check PyPI!

ext/opentelemetry-ext-django/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Add support for django >= 1.10 (#717)
6+
57
## 0.7b1
68

79
Released 2020-05-12

ext/opentelemetry-ext-docker-tests/tests/opencensus/test_opencensusexporter_functional.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -58,72 +58,3 @@ def test_export(self):
5858
for export_status in self.span_processor.export_status:
5959
self.assertEqual(export_status.name, "SUCCESS")
6060
self.assertEqual(export_status.value, 0)
61-
62-
63-
# FIXME This test fails because of an issue in the OpenCensus collector
64-
# reported here:
65-
# https://github.com/census-instrumentation/opencensus-service/issues/641
66-
# Uncomment this test when this issue gets fixed.
67-
68-
# from time import sleep
69-
# from opentelemetry.ext.opencensusexporter.metrics_exporter import (
70-
# OpenCensusMetricsExporter,
71-
# )
72-
# from opentelemetry.sdk.metrics import Counter, MeterProvider
73-
# from opentelemetry.sdk.metrics.export.controller import PushController
74-
75-
# from opentelemetry import metrics
76-
#
77-
#
78-
# class ExportStatusMetricController(PushController):
79-
# def __init__(self, *args, **kwargs):
80-
# super().__init__(*args, **kwargs)
81-
# self.export_status = []
82-
#
83-
# def run(self):
84-
# while not self.finished.wait(self.interval):
85-
# self.tick()
86-
#
87-
# def tick(self):
88-
# # Collect all of the meter's metrics to be exported
89-
# self.meter.collect()
90-
# token = attach(set_value("suppress_instrumentation", True))
91-
# # Export the given metrics in the batcher
92-
# self.export_status.append(
93-
# self.exporter.export(self.meter.batcher.checkpoint_set())
94-
# )
95-
# detach(token)
96-
# # Perform post-exporting logic based on batcher configuration
97-
# self.meter.batcher.finished_collection()
98-
#
99-
#
100-
# class TestOpenCensusMetricsExporter(TestBase):
101-
# def setUp(self):
102-
# super().setUp()
103-
#
104-
# metrics.set_meter_provider(MeterProvider())
105-
# self.meter = metrics.get_meter(__name__)
106-
# self.controller = ExportStatusMetricController(
107-
# self.meter,
108-
# OpenCensusMetricsExporter(
109-
# service_name="basic-service", endpoint="localhost:55678"
110-
# ),
111-
# 1,
112-
# )
113-
#
114-
# def test_export(self):
115-
#
116-
# self.meter.create_metric(
117-
# name="requests",
118-
# description="number of requests",
119-
# unit="1",
120-
# value_type=int,
121-
# metric_type=Counter,
122-
# label_keys=("environment",),
123-
# ).add(25, {"environment": "staging"})
124-
#
125-
# sleep(2)
126-
#
127-
# self.assertEqual(len(self.controller.export_status), 1)
128-
# self.assertEqual(self.controller.export_status[0].name, "SUCCESS")
129-
# self.assertEqual(self.controller.export_status[0].value, 0)

ext/opentelemetry-ext-grpc/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- lint: version of grpc causes lint issues
6+
([#696](https://github.com/open-telemetry/opentelemetry-python/pull/696))
7+
38
## 0.6b0
49

510
Released 2020-03-30

ext/opentelemetry-ext-jaeger/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Transform resource to tags when exporting
6+
([#645](https://github.com/open-telemetry/opentelemetry-python/pull/645))
7+
58
## 0.6b0
69

710
Released 2020-03-30

ext/opentelemetry-ext-opencensusexporter/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Rename otcollector to opencensus
6+
([#695](https://github.com/open-telemetry/opentelemetry-python/pull/695))
7+
58
## 0.5b0
69

710
Released 2020-03-16

ext/opentelemetry-ext-zipkin/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Transform resource to tags when exporting
6+
([#707](https://github.com/open-telemetry/opentelemetry-python/pull/707))
7+
58
## 0.7b1
69

710
Released 2020-05-12

opentelemetry-api/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
- Handle boolean, integer and float values in Configuration
6+
([#662](https://github.com/open-telemetry/opentelemetry-python/pull/662))
7+
- bugfix: ensure status is always string
8+
([#640](https://github.com/open-telemetry/opentelemetry-python/pull/640))
9+
510
## 0.7b1
611

712
Released 2020-05-12

0 commit comments

Comments
 (0)