-
Notifications
You must be signed in to change notification settings - Fork 12
Smoke v2 #1283
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
Merged
Merged
Smoke v2 #1283
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
91f8def
new smoke v2 starting with otel-js
ibolmo 75eee94
interim: start of moving over the deno tests.
ibolmo 9eddfb0
deno complains if the core/js is some how still in our workspaces
ibolmo 8cd7dea
set a name/version in root package.json to avoid deno warnings
ibolmo 86ebf9d
use deno latest since 2.1 is no longer maintained
ibolmo a9adaee
more links usage to avoid building the shared tests
ibolmo 2c35d14
remove build we no longer need
ibolmo fed226c
add deno-browser based on deno-node
ibolmo dfa72c7
update readmes with latests lessons
ibolmo d70b4a9
add nextjs instrumentation test
ibolmo e175204
avoid using dist/index.mjs
ibolmo 7bc048c
add cloudflare worker node compat scenario
ibolmo ba052d1
add node compat with a fix to error serialization
ibolmo 75cb358
add cloudflare worker browser no compat
ibolmo 244738a
add browser compat
ibolmo 2edb3d5
support xfail state and make cloudflare tests call individual prompt …
ibolmo 46e8119
fix deno node test
ibolmo ad2a47f
move over the json attachment testing in v1
ibolmo bc04b3d
migrate playwright browser test
ibolmo 2610f26
cleanup the nunjucks test to avoid conditionals
ibolmo 417ea19
add jest-node
ibolmo 3058ee6
add cloudflare vite hono
ibolmo 5d7c1b5
add back in the vite-dev.test.mjs that didn't get migrated
ibolmo f027082
add github job and cleanup makefile to avoid work if possible
ibolmo 90b5ca3
skip smoke-v2
ibolmo 6b2812e
drop package lock
ibolmo ecfaf45
standardize output and fix deno tests
ibolmo 46ff97c
fix tests
ibolmo e82e036
more fix tests and missign standardizationg
ibolmo b44a700
fix deno
ibolmo f681668
fix deno
ibolmo 66448d8
more denof ixes
ibolmo b41a3dc
temp disable stuff to hurry up ci check loop
ibolmo b7c1ef1
move smoke-v2 to smoke
ibolmo 38bc39b
reenable
ibolmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # Auto-discover scenarios (any folder in scenarios/ with a Makefile) | ||
| SCENARIOS := $(shell find scenarios -mindepth 1 -maxdepth 1 -type d -exec test -f {}/Makefile \; -print | sed 's|scenarios/||' | sort) | ||
|
|
||
| .PHONY: help setup test list clean | ||
|
|
||
| # ============================================================================= | ||
| # Help | ||
| # ============================================================================= | ||
|
|
||
| help: | ||
| @echo "Smoke-v2 Test Infrastructure" | ||
| @echo "" | ||
| @echo "Available targets:" | ||
| @echo " make test - Run all scenarios (builds SDK once if needed)" | ||
| @echo " make test <scenario> - Run specific scenario (e.g., make test otel-v1)" | ||
| @echo " make setup - Ensure SDK artifacts + shared package are ready" | ||
| @echo " make clean - Remove all build artifacts (force rebuild)" | ||
| @echo " make list - List discovered scenarios" | ||
| @echo "" | ||
| @echo "Environment variables:" | ||
| @echo " BRAINTRUST_TAR - Path to braintrust tarball (auto-set by parent when running locally)" | ||
| @echo " BRAINTRUST_OTEL_TAR - Path to otel tarball (auto-set by parent when running locally)" | ||
| @echo " SMOKE_V2_SHARED_DIST - Path to shared package dist (auto-set by parent when running locally)" | ||
| @echo "" | ||
| @echo "Running individual scenarios:" | ||
| @echo " cd scenarios/otel-v1 && make test - Runs standalone, builds if needed" | ||
| @echo "" | ||
| @echo "Discovered scenarios:" | ||
| @for scenario in $(SCENARIOS); do echo " - $$scenario"; done | ||
|
|
||
| # ============================================================================= | ||
| # Setup - Build SDK + shared package | ||
| # ============================================================================= | ||
|
|
||
| setup: | ||
| @echo "==> Setting up smoke-v2" | ||
| @mkdir -p ../artifacts | ||
|
|
||
| @# Build SDK and create tarball if not provided | ||
| @if [ -n "$(BRAINTRUST_TAR)" ] && [ -f "$(BRAINTRUST_TAR)" ]; then \ | ||
| echo "==> Using provided BRAINTRUST_TAR: $(BRAINTRUST_TAR)"; \ | ||
| else \ | ||
| echo "==> Building SDK and creating tarball"; \ | ||
| cd ../../.. && pnpm exec turbo build --filter=braintrust && pnpm --filter=braintrust pack --pack-destination sdk/js/artifacts; \ | ||
| \ | ||
| for f in sdk/js/artifacts/braintrust-*.tgz; do \ | ||
| if [ "$$(basename $$f)" != "braintrust-latest.tgz" ] && \ | ||
| [ "$$(basename $$f)" != "braintrust-otel-latest.tgz" ]; then \ | ||
| cp "$$f" sdk/js/artifacts/braintrust-latest.tgz; \ | ||
| break; \ | ||
| fi; \ | ||
| done; \ | ||
| fi | ||
|
|
||
| @# Build shared package if not provided | ||
| @if [ -n "$(SMOKE_V2_SHARED_DIST)" ] && [ -d "$(SMOKE_V2_SHARED_DIST)" ]; then \ | ||
| echo "==> Using provided SMOKE_V2_SHARED_DIST: $(SMOKE_V2_SHARED_DIST)"; \ | ||
| else \ | ||
| if [ ! -d shared/dist ]; then \ | ||
| echo "==> Building shared package"; \ | ||
| cd shared && npm ci && npm run build; \ | ||
| else \ | ||
| echo "==> Shared package already built"; \ | ||
| fi; \ | ||
| fi | ||
|
|
||
| # ============================================================================= | ||
| # Clean - Remove all build artifacts | ||
| # ============================================================================= | ||
|
|
||
| clean: | ||
| @echo "==> Cleaning smoke-v2 artifacts" | ||
| rm -rf ../artifacts/*.tgz | ||
| rm -rf shared/dist shared/node_modules | ||
|
|
||
| # ============================================================================= | ||
| # Test - Run scenarios | ||
| # ============================================================================= | ||
|
|
||
| test: | ||
| @REQUESTED="$(filter-out test,$(MAKECMDGOALS))"; \ | ||
| \ | ||
| if [ -z "$$REQUESTED" ]; then \ | ||
| SCENARIOS_TO_RUN="$(SCENARIOS)"; \ | ||
| echo "==> Running all scenarios"; \ | ||
| else \ | ||
| SCENARIOS_TO_RUN=""; \ | ||
| for scenario in $$REQUESTED; do \ | ||
| if [ ! -d "scenarios/$$scenario" ]; then \ | ||
| echo "Error: Scenario '$$scenario' not found"; \ | ||
| echo "Available scenarios:"; \ | ||
| for s in $(SCENARIOS); do echo " - $$s"; done; \ | ||
| exit 1; \ | ||
| fi; \ | ||
| SCENARIOS_TO_RUN="$$SCENARIOS_TO_RUN $$scenario"; \ | ||
| done; \ | ||
| echo "==> Running scenarios:$$SCENARIOS_TO_RUN"; \ | ||
| fi; \ | ||
| \ | ||
| $(MAKE) setup; \ | ||
| \ | ||
| : $${BRAINTRUST_TAR:=../artifacts/braintrust-latest.tgz}; \ | ||
| : $${BRAINTRUST_OTEL_TAR:=../artifacts/braintrust-otel-latest.tgz}; \ | ||
| : $${SMOKE_V2_SHARED_DIST:=shared/dist}; \ | ||
| export BRAINTRUST_TAR BRAINTRUST_OTEL_TAR SMOKE_V2_SHARED_DIST; \ | ||
| \ | ||
| for scenario in $$SCENARIOS_TO_RUN; do \ | ||
| echo ""; \ | ||
| echo "=== Testing $$scenario ==="; \ | ||
| $(MAKE) -C scenarios/$$scenario test || exit 1; \ | ||
| done; \ | ||
| \ | ||
| echo ""; \ | ||
| echo "✓ All requested scenarios passed" | ||
|
|
||
| # ============================================================================= | ||
| # List - Show discovered scenarios | ||
| # ============================================================================= | ||
|
|
||
| list: | ||
| @echo "Discovered scenarios:" | ||
| @for scenario in $(SCENARIOS); do echo " - $$scenario"; done | ||
|
|
||
| # ============================================================================= | ||
| # Make scenario names valid targets (no-ops to support "make test otel-v1") | ||
| # ============================================================================= | ||
|
|
||
| $(SCENARIOS): | ||
| @: |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.