Repository navigation
ci: smoke-test examples in CI and keep their versions in sync - #358
Merged
Merged
Conversation
Without a DSN the global providers are no-op proxies without shutdown(), so example/basic crashed with AttributeError.
…s-http run - fastapi, pyramid: pin opentelemetry-instrumentation-logging, otherwise pip picks 0.66b2 and fails to resolve against the 0.66b0 instrumentations - pyramid: bump to 2.1; 2.0.2 imports pkg_resources removed from setuptools - django-postgresql: use psycopg2-binary so no pg_config is needed - otlp-traces-http: the HTTP exporter takes headers as a dict
- scripts/run_example.py installs and runs each example (script, daemon or HTTP server checks) against the local uptrace source - scripts/sync_examples.py syncs uptrace/OpenTelemetry pins from pyproject.toml; CI runs it with --check - examples workflow runs on PRs, master and weekly - dependabot updates third-party example deps
…arden example runner - force_flush() had the same no-op proxy issue as shutdown() - run_example.py: report a missing command or a connection error as a failure with output, always kill the whole process group, don't leak the temporary requirements file - examples workflow: read-only token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing ran the examples before, so they went stale without anyone noticing (e.g. #357). This adds a CI workflow that installs and runs every example, plus a script that keeps their uptrace/OpenTelemetry pins in sync with
pyproject.toml.CI
scripts/run_example.py NAMEinstalls (--install) and smoke-tests an example against the local uptrace source:scripts/sync_examples.pyrewrites theuptrace/opentelemetry-*pins inexample/*/requirements.txt; CI runs it with--check. It replaces the manual step inRELEASING.md..github/workflows/examples.ymlruns on PRs, on master and weekly, with one matrix job per example; Postgres is a service container for django-postgresql.make examplesruns everything locally, each example in its own venv under.venv-examples/.Bugs it found
uptrace.shutdown()raisedAttributeErrorwhen Uptrace is disabled (no DSN), which crashedexample/basic. Fixed, with a regression test.pip install uptrace==1.45.0 opentelemetry-instrumentation-pyramid==0.66b0fails to resolve unlessopentelemetry-instrumentation-logging==0.66b0is pinned too. Pinned it, as the other examples already do.pkg_resources, which current setuptools no longer has → bumped to 2.1.psycopg2==2.9.5needspg_configto build →psycopg2-binary.Testing
make testpasses.