Files
opentelemetry-python-contrib/scripts/build.sh
Riccardo Magliocchetti 88e5bfc630 Add a basic http OpAMP client (#3635)
* Add a basic http OpAMP client

* Add some docs and hook it into the system

Still not building content

* Add default value of 30 seconds to heartbeat message interval

* Fix docs build

* More docs improvements

* Fix spellcheck

* Remove local workaround

* Generate workflows and add to release script

* Fix typos in opamp lint commands

* Fix requirements for pylint

* Update opamp/opentelemetry-opamp-client/pyproject.toml

* Recreate requirements

* Add missing opentelemetry-api dependency

* Fix tox test commands

Drop opentelemetry api fixed version from requirements

* Fix tox

* Add baseline of vcrpy 7.0.0

* Ignore pb2 module in pylintrc

* Bump pylint to match the version in core

* Silence pylint warnings

* Don't trace opamp client own http requests

* Permit to pass a custom transport to client

And a custom session to RequestsTransport

* Don't bump pylint after all

* Fix pylint

* Try to typecheck opamp client

* Bump version after rebase

* Fix typecheck in client

* Please pyright in strict mode

* No need for functions and methods to be private since _opamp module is already private

* Add missing protobuf package installation for typecheck

* Fix docs generation

* Fix pyright exclusion rule for proto

Missed .pyi exclusion

* Feedback

* Don't flush the queue at exit

* Log transport send exceptions

* Update example to not assume that the config is in json format

* Fix typo in exception

* Looks like it's implementers

* Add timeout to stop to forward to threads join

* Clarify doc

* Fix typo in var name

* Add support for mTLS

* Add helpers for handling of ReportFullState ServerToAgent flag

Introducing basic handling of the ReportsEffectiveConfig capability

* Remove backup file

* Rewrite opamp_proto_codegen.sh to use uv

* Make the package releasable independently

* Send full state at connection

* Add 3.14 test run

* Add changelog entry

* Add missing ReportsEffectiveConfig capability in documentation

* Start version from 0.1b0 and re-record e2e tests

* Record tests against opentelemetry-go

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2026-03-05 16:36:54 +01:00

49 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# This script builds wheels for the API, SDK, and extension packages in the
# dist/ dir, to be uploaded to PyPI.
set -ev
# Get the latest versions of packaging tools
python3 -m pip install --upgrade pip build setuptools wheel
BASEDIR=$(dirname "$(readlink -f "$(dirname $0)")")
DISTDIR=dist
(
cd $BASEDIR
mkdir -p $DISTDIR
rm -rf ${DISTDIR:?}/*
for d in exporter/*/ opentelemetry-instrumentation/ opentelemetry-contrib-instrumentations/ opentelemetry-distro/ instrumentation/*/ processor/*/ propagator/*/ resource/*/ sdk-extension/*/ util/*/ opamp/*/ ; do
(
echo "building $d"
cd "$d"
# Some ext directories (such as docker tests) are not intended to be
# packaged. Verify the intent by looking for a pyproject.toml.
if [ -f pyproject.toml ]; then
python3 -m build --outdir "$BASEDIR/dist/"
fi
)
done
(
cd $DISTDIR
for x in * ; do
# FIXME: Remove this once opentelemetry-resource-detector-azure package goes 1.X
if echo "$x" | grep -Eq "^opentelemetry_(resource_detector_azure|util_genai).*(\.tar\.gz|\.whl)$"; then
echo "Skipping $x because of manual upload by Azure maintainers."
rm $x
# NOTE: We filter beta vs 1.0 package at this point because we can read the
# version directly from the .tar.gz/whl file
elif echo "$x" | grep -Eq "^opentelemetry_.*-0\..*(\.tar\.gz|\.whl)$"; then
:
else
echo "Skipping $x because it is not in pre-1.0 state and should be released using a tag."
rm $x
fi
done
)
)