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 <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
Signed-off-by: Ryan Lettieri <[email protected]>
@RyanLettieri RyanLettieri force-pushed the lettieri/pypi-pipeline branch from 1428556 to 89373e2 Compare March 19, 2025 23:39
Signed-off-by: Ryan Lettieri <[email protected]>
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.

@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 <[email protected]>

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

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating versioning on packages

Signed-off-by: Ryan Lettieri <[email protected]>

* Incrementing version to allign with pypi

Signed-off-by: Ryan Lettieri <[email protected]>

* Adressing majority of first round of feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating pipeline to have linting

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating versions in pyproject.toml

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating working dirs in yml

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding requirements.txt

Signed-off-by: Ryan Lettieri <[email protected]>

* Moving durabletask tests into specific dir and more

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing more paths

Signed-off-by: Ryan Lettieri <[email protected]>

* ATtemptign to ignore durabletask-azuremanaged folder

Signed-off-by: Ryan Lettieri <[email protected]>

* installing dts dependencies

Signed-off-by: Ryan Lettieri <[email protected]>

* Changing path for requirements.txt

Signed-off-by: Ryan Lettieri <[email protected]>

* Moving init.py

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating readme and some tests

Signed-off-by: Ryan Lettieri <[email protected]>

* Running all dts tests in publish pipeline

Signed-off-by: Ryan Lettieri <[email protected]>

* Removing PYTHONPATH and installing regular deps

Signed-off-by: Ryan Lettieri <[email protected]>

* Adding timeout to dts orchestration e2e test

Signed-off-by: Ryan Lettieri <[email protected]>

* Removing suspend and continue as new tests from dts

Signed-off-by: Ryan Lettieri <[email protected]>

* Removing raise event timeout tests

Signed-off-by: Ryan Lettieri <[email protected]>

* Only runnign publish on tag push

Signed-off-by: Ryan Lettieri <[email protected]>

* Changing dts action to run on tag creation

Signed-off-by: Ryan Lettieri <[email protected]>

* Updating tag name

Signed-off-by: Ryan Lettieri <[email protected]>

* Adressing review feedback

Signed-off-by: Ryan Lettieri <[email protected]>

* Fixing run requirements in actions and adding exit-zero

Signed-off-by: Ryan Lettieri <[email protected]>

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

---------

Signed-off-by: Ryan Lettieri <[email protected]>
Co-authored-by: Bernd Verst <[email protected]>
Signed-off-by: Albert Callarisa <[email protected]>
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