Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor plugin setup #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jd
Copy link
Member

@jd jd commented Dec 20, 2024

I found out you can actually pass plugin instance to pytester when
running it inline: this means we can grab the list of spans in a
sub-pytest if we run it inline.

This simplifies the overall architecture to split the tests in two mode:

  • either we run them in a subprocess to test the whole lifecycle (e.g.
    upload errors are printed)
  • either we run them inprocess and we can read the list of spans

This will make it easier in the future to replace pytest-opentelemetry
and test the spans that are emitted.

Copy link

mergify bot commented Dec 20, 2024

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Approval

This rule is failing.
  • #approved-reviews-by >= 1

🔴 🔎 Reviews

This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

🟢 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = test (3.10)
    • check-success = test (3.11)
    • check-success = test (3.12)
    • check-success = test (3.13)

🟢 Changelog requirements

Wonderful, this rule succeeded.
  • any of:
    • -title ~= ^feat
    • label = need changelog
    • label = skip changelog

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

@jd jd force-pushed the devs/jd/fix-subprocessmaybe/I75fd5057fef668c8e6dcbfe1f240f260df7e0bde branch from b7356b8 to 805345a Compare December 20, 2024 17:34
@mergify mergify bot requested a review from a team December 20, 2024 17:35
@jd jd force-pushed the devs/jd/fix-subprocessmaybe/I75fd5057fef668c8e6dcbfe1f240f260df7e0bde branch from 805345a to d602afb Compare December 21, 2024 09:50
I found out you can actually pass plugin instance to pytester when
running it inline: this means we can grab the list of spans in a
sub-pytest if we run it inline.

This simplifies the overall architecture to split the tests in two mode:
- either we run them in a subprocess to test the whole lifecycle (e.g.
  upload errors are printed)
- either we run them inprocess and we can read the list of spans

This will make it easier in the future to replace pytest-opentelemetry
and test the spans that are emitted.

Change-Id: I75fd5057fef668c8e6dcbfe1f240f260df7e0bde
@jd jd force-pushed the devs/jd/fix-subprocessmaybe/I75fd5057fef668c8e6dcbfe1f240f260df7e0bde branch from d602afb to 9b4a807 Compare December 21, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant