Skip to content

Conversation

@RyanLettieri
Copy link
Contributor

@RyanLettieri RyanLettieri commented Mar 5, 2025

This PR adds in a new workflow yaml that will be responsible for publishing the durabletask scheduler package to pypi. It also adds in e2e tests for DTS

@RyanLettieri RyanLettieri changed the title Creating of pipeline to publish dts python package to pypi Creation of pipeline to publish dts python package to pypi Mar 5, 2025
Copy link
Member

@berndverst berndverst left a comment

Choose a reason for hiding this comment

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

A few more changes required to ensure we produce correct releases.

Note that we use tags of form azuremanaged-v* instead of v* -- this is because the latter should be reserved for the main durabletask python sdk which can have a separate and independent release cadence and cycle. We want to decouple the publishing of SDKs.

uses: actions/checkout@v4

- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag
run: echo "VERSION=${GITHUB_REF#refs/tags/azuremanaged-v}" >> $GITHUB_ENV # Extract version from the tag

Copy link
Member

Choose a reason for hiding this comment

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

FYI - right now we are not doing anything with the version. However, if we wanted to - we could use this version from the tag and DYNAMICALLY replace the value in pyproject.toml BEFORE running the build and publish commands. This way releasing a new SDK only requires tagging... otherwise what would be required is also a manual PR to change the version in pyproject -- and in fact what can happen is that the pyproject file version and the tag version are not aligned.

Consider having a script here that uses sed or similar to replace the version within the pyproject.toml

@RyanLettieri RyanLettieri marked this pull request as ready for review March 6, 2025 16:49
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
@RyanLettieri RyanLettieri force-pushed the lettieri/pypi-pipeline branch from 1428556 to 89373e2 Compare March 19, 2025 23:39
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics --exit-zero
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flake8 . --count --show-source --statistics --exit-zero
flake8 . --count --show-source --statistics

We want this step to fail if there are linter issues, so let's not use --exit-zero

Copy link
Member

Choose a reason for hiding this comment

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

I see that was there before - but let's actually change this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This leads to a lot of lint errors that were being ignored. I'll create an additional PR afterwards that removes this flag and addresses the linting problems so I don't clutter this PR too much

Copy link
Member

Choose a reason for hiding this comment

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

Ok, please do that! Just because existing linter errors exist doesn't mean we should leave them in place.

Copy link
Member

@berndverst berndverst left a comment

Choose a reason for hiding this comment

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

Left some comments - just some pipeline changes and dependency changes. Nothing major.

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
@berndverst berndverst merged commit 8ad3849 into main Mar 21, 2025
9 checks passed
@berndverst berndverst deleted the lettieri/pypi-pipeline branch March 21, 2025 18:22
acroca pushed a commit to acroca/dapr-durabletask-python that referenced this pull request Jun 17, 2025
)

* Creating of pipeline to publish dts python package to pypi

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Upgrading version of durabletask-azuremanaged from 0.1b1 to 0.1

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating versioning on packages

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Incrementing version to allign with pypi

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adressing majority of first round of feedback

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating pipeline to have linting

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating versions in pyproject.toml

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating working dirs in yml

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding requirements.txt

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Moving durabletask tests into specific dir and more

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing more paths

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* ATtemptign to ignore durabletask-azuremanaged folder

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* installing dts dependencies

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Changing path for requirements.txt

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Moving init.py

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating readme and some tests

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Running all dts tests in publish pipeline

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing PYTHONPATH and installing regular deps

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding timeout to dts orchestration e2e test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing suspend and continue as new tests from dts

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing raise event timeout tests

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Only runnign publish on tag push

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Changing dts action to run on tag creation

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating tag name

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adressing review feedback

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing run requirements in actions and adding exit-zero

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Update .github/workflows/publish-dts-sdk.yml

---------

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
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.

3 participants