You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. make sure to use `pytest.importorskip` to import any dependencies that are only required by your tests:
124
+
1.make sure to use `pytest.importorskip` to import any dependencies that are only required by your tests:
126
125
127
-
foodriver = pytest.importorskip("foodriver")
126
+
foodriver = pytest.importorskip("foodriver")
128
127
129
-
1. Create one or more requirements files in `tests/requirements` that list the dependencies that are to be installed specifically for your tests:
130
-
To only test the newest version of the library, create a file `tests/requirements/reqs-foo-newest.txt` and add something like this to it:
128
+
1.Create one or more requirements files in `tests/requirements` that list the dependencies that are to be installed specifically for your tests:
129
+
To only test the newest version of the library, create a file `tests/requirements/reqs-foo-newest.txt` and add something like this to it:
131
130
132
-
foodriver
133
-
-r reqs-base.txt
131
+
foodriver
132
+
-r reqs-base.txt
134
133
135
-
This tells the matrix runner to install the newest version of `foodriver`, as well as the base requirements needed to run the test suite.
136
-
To test more than one version of the library, create additional `reqs-foo-X.Y.txt` files with specific versions of your instrumented package.
134
+
This tells the matrix runner to install the newest version of `foodriver`, as well as the base requirements needed to run the test suite.
135
+
To test more than one version of the library, create additional `reqs-foo-X.Y.txt` files with specific versions of your instrumented package.
137
136
138
-
1. Create a file called `foo.sh` in `tests/scripts/envs/foo.sh`.
139
-
Here you can define environment variables that are required to run your tests.
140
-
As a minimum, you'll have to set the `PYTEST_MARKER` variable to the same value you used above for the pytest marker, e.g.
137
+
1.Create a file called `foo.sh` in `tests/scripts/envs/foo.sh`.
138
+
Here you can define environment variables that are required to run your tests.
139
+
As a minimum, you'll have to set the `PYTEST_MARKER` variable to the same value you used above for the pytest marker, e.g.
141
140
142
-
export PYTEST_MARKER="-m foo"
141
+
export PYTEST_MARKER="-m foo"
143
142
144
-
1. Add entries in `.ci/matrix_framework.yml` (for pull requests) and `.ci/matrix_framework_full.yml` (for nightly builds).
145
-
Generally, we only test the newest version of an instrumentation with every pull request:
143
+
1.Add entries in `.ci/matrix_framework.yml` (for pull requests) and `.ci/matrix_framework_full.yml` (for nightly builds).
144
+
Generally, we only test the newest version of an instrumentation with every pull request:
146
145
147
-
- foo-newest
146
+
- foo-newest
148
147
149
-
To test other versions in the nightly build, add them to `.ci/matrix_framework_full.yml`.
148
+
To test other versions in the nightly build, add them to `.ci/matrix_framework_full.yml`.
150
149
151
-
1. OPTIONAL: If you need a real service to test against (e.g. an actual foo database), add an entry in `tests/docker-compose.yml` under `services`:
150
+
1.OPTIONAL: If you need a real service to test against (e.g. an actual foo database), add an entry in `tests/docker-compose.yml` under `services`:
152
151
153
-
foo:
154
-
image: foobase:latest
152
+
foo:
153
+
image: foobase:latest
155
154
156
-
You'll also have to add a `DOCKER_DEPS` environment variable to `tests/scripts/envs/foo.sh` which tells the matrix
157
-
to spin up the given docker-compose service before running your tests.
158
-
You may also need to add things like hostname configuration here.
155
+
You'll also have to add a `DOCKER_DEPS` environment variable to `tests/scripts/envs/foo.sh` which tells the matrix
156
+
to spin up the given docker-compose service before running your tests.
157
+
You may also need to add things like hostname configuration here.
159
158
160
-
DOCKER_DEPS="foo"
161
-
FOO_CONNECTION_URL="http://foo:4711"
159
+
DOCKER_DEPS="foo"
160
+
FOO_CONNECTION_URL="http://foo:4711"
162
161
163
-
1. OPTIONAL: If your instrumented package does not support all Python versions we test with, you can exclude certain combinations by adding them to `.ci/matrix_exclude.yml`:
162
+
1.OPTIONAL: If your instrumented package does not support all Python versions we test with, you can exclude certain combinations by adding them to `.ci/matrix_exclude.yml`:
164
163
165
-
- PYTHON_VERSION: python-3.5 # foo doesn't support Python 3.5
166
-
FRAMEWORK: foo-newest
164
+
- PYTHON_VERSION: python-3.5 # foo doesn't support Python 3.5
165
+
FRAMEWORK: foo-newest
167
166
168
167
### Workflow
169
168
@@ -181,15 +180,15 @@ If you have commit access, the process is as follows:
181
180
1. Update `CHANGELOG.asciidoc`. Rename the `Unreleased` section to the correct version (`vX.X.X`), and nest under the appropriate sub-heading, e.g., `Python Agent version 5.x`.
182
181
1. For Majors: [Create an issue](https://github.com/elastic/website-requests/issues/new) to request an update of the [EOL table](https://www.elastic.co/support/eol).
183
182
1. For Majors: Add the new major version to `conf.yaml` in the [elastic/docs](https://github.com/elastic/docs) repo.
184
-
1. Commit changes with message `update CHANGELOG and bump version to X.Y.Z` where `X.Y.Z` is the version in `elasticapm/version.py`
183
+
1. Commit changes with message `update CHANGELOG and bump version to X.Y.Z`
184
+
where `X.Y.Z` is the version in `elasticapm/version.py`
185
+
1. Open a PR against `main` with these changes
186
+
1. Once the PR is merged, fetch and checkout `upstream/main`
185
187
1. Tag the commit with `git tag -a vX.Y.Z`, for example `git tag -a v1.2.3`.
186
188
Copy the changelog for the release to the tag message, removing any leading `#`.
187
189
1. Reset the current major branch (`1.x`, `2.x` etc) to point to the current main, e.g. `git branch -f 1.x main`
188
-
1. Push commits and tags upstream with `git push upstream main && git push upstream --tags` (and optionally to your own fork as well)
190
+
1. Push tag upstream with `git push upstream --tags` (and optionally to your own fork as well)
189
191
1. Update major branch, e.g. `1.x` on upstream with `git push upstream 1.x`
190
192
1. After tests pass, Jenkins will automatically build a source package, as well as binary wheels.
191
-
To upload them to PyPI, go to [Jenkins](https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-python%2Fapm-agent-python-mbp/activity)
192
-
and look for the build with the correct tag name (`vX.Y.Z`). Once the build is done, a dialog will be shown.
193
-
Note that you need to be logged in to trigger an upload.
194
193
1. Create a [Github release](https://github.com/elastic/apm-agent-python/releases)
195
194
targeting the new tag. Copy the changelog into the body of the release.
0 commit comments