Skip to content

ci: reuse OpenTelemetry conformance workflows - #69

Merged
zhongkechen merged 12 commits into
mainfrom
codex/reusable-otel-workflows
Aug 7, 2026
Merged

ci: reuse OpenTelemetry conformance workflows#69
zhongkechen merged 12 commits into
mainfrom
codex/reusable-otel-workflows

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace duplicated Java, Python, and JavaScript OTel suite and long-running workflows with shared reusable workers
  • use one language-neutral orchestrator that resolves SDK and conformance revisions once, then launches suite and long-running views
  • give each language workflow one reusable-workflow entry job while preserving language-owned toolchain, contract, and handler preparation hooks
  • use language as the single runtime/resource key and rename TypeScript runtime-facing paths to JavaScript
  • launch rollover inside the existing long-running worker and remove conditional follow-up workflow calls

Testing

  • hatch run test:all (341 passed)
  • focused workflow tests (93 passed)
  • hatch run types:check
  • hatch fmt --check
  • actionlint .github/workflows/*.yml
  • YAML parse and git diff --check
  • JavaScript npm run typecheck
  • JavaScript npm run build

@zhongkechen
zhongkechen temporarily deployed to ai-pr-review-runtime August 5, 2026 22:09 — with GitHub Actions Inactive
@zhongkechen
zhongkechen temporarily deployed to ai-pr-review-runtime August 5, 2026 22:09 — with GitHub Actions Inactive
Comment thread .github/workflows/opentelemetry-long-running.yml
Comment thread .github/workflows/opentelemetry-long-running.yml
Comment thread .github/workflows/opentelemetry-suite.yml Outdated
@github-actions

This comment has been minimized.

Comment thread .github/workflows/opentelemetry-long-running.yml
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Claude AI review

This PR replaces the duplicated per-language OTel workflows (Java/Python/TypeScript) with three shared reusable workflows (opentelemetry.yml orchestrator, opentelemetry-suite.yml, opentelemetry-long-running.yml) plus a prepare-otel-example composite action, keyed on a single language input and renaming TypeScript runtime paths to JavaScript. The refactor is largely mechanical and the accompanying contract tests were updated to match.

One confirmed regression: the long-running worker does not define EXAMPLES_DIR, which the Java and JavaScript prepare_command hooks reference. The suite worker defines it at workflow-level env:, but the long-running worker omits it, so its Java/JS prepare hooks fail under set -euo pipefail (unbound variable). These long-running short-phase jobs run on every PR/push and on launch/rollover, so Java and JavaScript long-running runs break; Python is unaffected because it has no prepare hook.

Residual test risk: the workflow contract tests only parse/assert YAML text and never execute the reusable workflows, so a missing runtime environment variable such as EXAMPLES_DIR is not detected by the test suite.

Reviewed commit 9ce256b91edc2597b813923e12f97fa1823191ed. Workflow run

@zhongkechen
zhongkechen had a problem deploying to ai-pr-review-runtime August 5, 2026 22:56 — with GitHub Actions Failure
@zhongkechen
zhongkechen temporarily deployed to ai-pr-review-runtime August 5, 2026 22:56 — with GitHub Actions Inactive
@zhongkechen
zhongkechen marked this pull request as draft August 5, 2026 22:56
@zhongkechen zhongkechen self-assigned this Aug 5, 2026
…orkflows

# Conflicts:
#	.github/workflows/opentelemetry-suite.yml
#	packages/aws-durable-execution-conformance-tests-otel/tests/test_java_examples.py
@zhongkechen
zhongkechen marked this pull request as ready for review August 6, 2026 17:07
@zhongkechen
zhongkechen had a problem deploying to ai-pr-review-runtime August 6, 2026 17:07 — with GitHub Actions Failure
@zhongkechen
zhongkechen temporarily deployed to ai-pr-review-runtime August 6, 2026 17:07 — with GitHub Actions Inactive
OTEL_VIEW: ${{ inputs.view }}
STATE_ARTIFACT: python-otel-long-running-${{ inputs.view }}-${{ inputs.aws_region || 'us-west-2' }}-state
TEST_NAME: p-olr-${{ inputs.view == 'invocation' && 'i' || 'e' }}${{ inputs.phase == 'short' && '-short' || '' }}
STATE_ARTIFACT: ${{ inputs.language }}-otel-long-running-${{ inputs.view }}-${{ inputs.aws_region || 'us-west-2' }}-state

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex AI review

High: The JavaScript preset now searches for javascript-otel-long-running-*, but the deleted workflow stored active runs as typescript-otel-long-running-* with a typescript-otel-long-running-state.json payload. The first post-merge daily run will miss that state, launch a new js-olr-* stack, and leave the existing t-olr-* execution unchecked. Add a legacy artifact/file-key input, fall back to and migrate the TypeScript artifact before choosing launch, and test this transition.

collector_compatible_runtime: nodejs22.x
collector_otlp_endpoint: http://localhost:4318
# Clean up rolled-back stacks created before the JavaScript rename.
legacy_stack_prefix: durable-execution-conformance-tests-typescript

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex AI review

Medium: This preserves only the older durable-execution-conformance-tests-typescript-* fallback. The workflow being removed owns conformance-tests-typescript-{backend}-{inv|exec}, and the S3 job does not consume this input. Those stable --no-cleanup stacks will become unreachable, including rollback-complete stacks that the old workflow would retire. Preserve a separate stable resource key or explicitly handle the actual TypeScript backend/view and S3 names during migration.

Comment on lines +84 to +90
if [[ ! "$LANGUAGE" =~ ^[a-z][a-z0-9-]{0,19}$ ]]; then
echo "language must contain 1-20 lowercase resource-safe characters"
exit 1
fi
if [[ ! "$RESOURCE_PREFIX" =~ ^[a-z][a-z0-9-]{0,11}$ ]]; then
echo "resource_prefix must contain 1-12 lowercase resource-safe characters"
exit 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex AI review

Medium: These accepted lengths exceed Lambda's 64-character function-name limit. The mandatory Dash0 invocation suite generates conformance-tests-${language}-dash0-inv-otel-invocation-18-target, allowing at most 10 language characters, while a short long-running run allows at most 7 resource_prefix characters. Datadog is stricter still. Derive resource names from a validated short key or tighten validation per enabled backend/phase, and add boundary tests for every generated function name.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

Found three workflow issues affecting JavaScript migration and reusable input safety. Live GitHub Actions/AWS behavior remains a residual risk because review was read-only.

Reviewed commit 183d4ed256f518cb5df730e39386b2a9ec0a9be0. Workflow run

@zhongkechen
zhongkechen merged commit e2bbb70 into main Aug 7, 2026
43 of 73 checks passed
@zhongkechen
zhongkechen deleted the codex/reusable-otel-workflows branch August 7, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants