Skip to content

feat(sdk): monorepo repository to add new otel plugin package#397

Merged
SilanHe merged 19 commits into
mainfrom
feat/add-otel-package
May 29, 2026
Merged

feat(sdk): monorepo repository to add new otel plugin package#397
SilanHe merged 19 commits into
mainfrom
feat/add-otel-package

Conversation

@SilanHe
Copy link
Copy Markdown
Contributor

@SilanHe SilanHe commented May 22, 2026

Issue #, if available:

Description of changes:

Monorepo Restructure

The repo was converted from a single-package layout to a monorepo with a packages/ directory:

  • Core SDK moved from the repo root (src/, tests/, examples/, pyproject.toml) into packages/aws-durable-execution-sdk-python/
  • All source, tests, and examples were relocated (no content changes, just path moves)
  • I moved all hatch env "testing" scripts to the root pyproject.toml and only left the build/publishing artifacts in the per package pyproject.toml. Working environments are defined in root pyproject.toml.

New Package: OpenTelemetry Instrumentation

A new package was added at packages/aws-durable-execution-sdk-python-otel/ (v0.1.0):

CI & Workflow Updates

  • ci.yml — Loops over all packages/*/ directories for format checks, type checking, tests, and builds
  • ci-checks.sh — Iterates over a PACKAGES array instead of running checks at the repo root
  • pypi-publish.yml — Uses a matrix strategy to build and publish each package independently; per-package artifact names
  • sync-package.yml — Deleted (no longer needed)
  • deploy-examples.yml / integration-tests.yml — Minor path adjustments

Documentation

File Change
CONTRIBUTING.md Updated with monorepo structure overview; instructions to cd into package dirs before running hatch
RELEASING.md (new) Release process: per-package versioning, tagging convention (sdk-vX.Y.Z, otel-vX.Y.Z), PyPI publishing flow, release notes format, pre-publish checklist
Core SDK README.md (new) Package-level README inside the moved package directory

Misc

  • .gitignore — Relaxed example build/zip patterns from root-anchored to relative (works with nested layout)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SilanHe SilanHe force-pushed the feat/add-otel-package branch from 3b74d87 to 7bded69 Compare May 22, 2026 21:06
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I haven't actually tested this one but it looks quite reasonable. I had to work a little more closely with AI on this one.

@SilanHe SilanHe marked this pull request as ready for review May 25, 2026 21:17
Comment thread packages/aws-durable-execution-sdk-python/.coverage Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread RELEASING.md
Comment thread packages/aws-durable-execution-sdk-python-examples/pyproject.toml
Comment thread packages/aws-durable-execution-sdk-python-examples/pyproject.toml Outdated
@zhongkechen
Copy link
Copy Markdown
Contributor

linting and tests failed.

@SilanHe
Copy link
Copy Markdown
Contributor Author

SilanHe commented May 28, 2026

linting and tests failed.

Ah sorry, I was still working through the different worklows, there was an issue with a workflow which would check out the testing sdk into the root. Then the root testing scripts would pick up the testing sdk pyproject.toml

zhongkechen
zhongkechen previously approved these changes May 29, 2026
Copy link
Copy Markdown
Contributor

@yaythomas yaythomas left a comment

Choose a reason for hiding this comment

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

still have to do a full review, but worried about a few things

  1. ${{ github.event.release.target_commitish }} is the branch the release was created from (typically main). With this ref:, the build will check out the branch's HEAD at workflow run time rather than the tagged commit. That's a problem if main has moved on between when the operator pressed "Publish release" and when the workflow actually runs (concurrent merges, multi-package release windows): we'd ship whatever is on main, not the code at the tag.

  2. test:cov lost --cov-fail-under=98; CI no longer enforces 98

  3. .gitignore out ot date with new changes

  4. CONTRIBUTING guide out of data with new changes

@zhongkechen
Copy link
Copy Markdown
Contributor

zhongkechen commented May 29, 2026

out of date changes because this PR is open for too long. It's better to merge now than later and we can add the identified missing changes later. Otherwise we'll see more missing changes.

@SilanHe
Copy link
Copy Markdown
Contributor Author

SilanHe commented May 29, 2026

${{ github.event.release.target_commitish }} is the branch the release was created from (typically main). With this ref:, the build will check out the branch's HEAD at workflow run time rather than the tagged commit. That's a problem if main has moved on between when the operator pressed "Publish release" and when the workflow actually runs (concurrent merges, multi-package release windows): we'd ship whatever is on main, not the code at the tag.

woops sorry, I meant to pin it to the tag but picked the wrong variable. I had just noticed that the workflow never did that in the past so I figured I would fix it. Thanks for pointing this out, going to use github.event.release.tag_name instead.

test:cov lost --cov-fail-under=98; CI no longer enforces 98

spoke offline, we'll follow up

.gitignore out ot date with new changes

updated gitignore to use * instead of referencing the path directly

CONTRIBUTING guide out of data with new changes

use package name instead of examples

Comment thread .gitignore

/examples/build/*
/examples/*.zip
*/build/*
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.

not blocking, but fix in follow-up pls:

*/build/* doesn't match packages/<pkg>/build/<file> because * doesn't span / (gitignore(5)). Either **/build/* + **/*.zip, or (preferred — scoped to packages/) packages/*/build/ + packages/*/*.zip.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

assert isinstance(parent_call[1]["value"], BatchResult)
finally:
importlib.reload(child)
assert parent_call[1]["value"] is result
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.

This assert ... is result is in the finally: clause (after importlib.reload(child)), not inside the try:/with patch(...) body. Asymmetric to parallel_test.py L1140 where the equivalent line is correctly inside the with block. As-is, if the try-body raises before parent_call binds, the finally raises UnboundLocalError and masks the original exception. Could you move this line back inside the with block (3-line indent fix)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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


```python
from aws_durable_execution_sdk_python import DurableContext, durable_execution
from aws_durable_execution_sdk_python_otel import instrument_durable_execution
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.

not blockling: these don't match the code ,__init__.py only re-exports __version__, instrument_durable_execution` doesn't exist yet, and the Features section below documents capabilities (auto span creation, replay-aware tracing, error recording) that aren't implemented.

maybe add something like DRAFT 'v0.1.0 reserves the package name; instrumentation lands in v0.2.0'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@@ -1,18 +1,62 @@

#!/bin/sh
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.

Not blocking: Shebang is sh #!/bin/sh but lines 39 and 45 use bash array syntax (PACKAGES=( ... ), "${PACKAGES[@]}").

Will fail under dash (the default /bin/sh on Debian/Ubuntu).

either amend sheabing to #!/usr/bin/env bash, or rewrite to sh compliant.

Copy link
Copy Markdown
Contributor Author

@SilanHe SilanHe May 29, 2026

Choose a reason for hiding this comment

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

@SilanHe SilanHe merged commit 0e30701 into main May 29, 2026
72 checks passed
@SilanHe SilanHe deleted the feat/add-otel-package branch May 29, 2026 18:48
Comment thread pyproject.toml
"SIM117",
"TRY301",
]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There are some warnings in the newest integration test CI workflow
packages/aws-durable-execution-sdk-python-examples/test/step/test_step.py:10
/home/runner/work/aws-durable-execution-sdk-python/aws-durable-execution-sdk-python/language-sdk/packages/aws-durable-execution-sdk-python-examples/test/step/test_step.py:10: PytestUnknownMarkWarning: Unknown pytest.mark.example - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.exampleIs this something caused by the mono repo change? There was no warning before (e.g. test run history) - @wangyb-A

hmm so I deleted these but moved them to the aws-durable-execution-sdk-python-examples pyproject.toml.

I think since I'm running the tests from the root, it's not reading the pyproject.toml from the package itself

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

4 participants