Skip to content

Conversation

alexrashed
Copy link
Member

@alexrashed alexrashed commented Aug 14, 2024

Motivation

With #10497 we changed the single-sourcing of the version to prepare for namespace packages.
With #11190 we switched to namespace packages.
We are soon going to start with separating the single namespace package into multiple namespace packages.
In addition, we also want to refactor our release processes such that we do not block the default branch anymore during releases.

This PR moves away from the VERSION files and introduces setuptools_scm as a preparation for both initiatives:

  • The VERSION file handling is cumbersome since it has to be done for each package.
    • The deterministic calculation of the version based on the distance to the latest version tag is automatically applies to all packages.
  • This makes it easier to release from any branch, because we determine the release based on the fact if the commit is tagged as a release.

Changes

  • Removes version.py, setup.py, and VERSION files and uses setuptools_scm instead.
  • Refactors the docker-helper.sh and the release-helper.sh to work with setuptools_scm.
  • Introduces tests for the release-helper.sh.

Testing

To test the functionality we can build the docker images and see that they pass our test suite still after the change.

For testing the release process we have the tests here, but also the manual test of the release workflow in the sister PR of a dependent repository.

TODO

  • Fix failing pipelines. Edit: Only tests that are failing at this point are tests that also showed flakes/fails recently in the main pipeline (e.g., this one)
  • Investigate caching implications.
  • Finish tests for the release-helper.sh.
  • Handle installation of prerequisites (setuptools_scm) for the helper scripts.
  • Fix breaking make publish in CircleCI on multiple builds of the same commit. Edit: fixed by introducing a make dev-publish which stops publishing should the current commit carry a tag.
  • Prepare upgrade of other users of the release-helper or docker-helper or implement backwards-compatibility.
  • Lots of testing.
  • Remove all dev releases for LocalStack since the last minor release.
  • Inform devs if there are any things they need to take care of / be aware of.

@alexrashed alexrashed added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Aug 14, 2024
@alexrashed alexrashed added this to the 3.8 milestone Aug 14, 2024
Copy link

github-actions bot commented Aug 14, 2024

Helper Script Tests

26 tests   26 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 4614aad.

♻️ This comment has been updated with latest results.

@alexrashed alexrashed force-pushed the switch-to-setuptools-scm branch from 5344d9d to c8cc693 Compare August 14, 2024 13:34
@silv-io silv-io force-pushed the switch-to-setuptools-scm branch 4 times, most recently from 56ca27f to 16060fe Compare August 19, 2024 13:24
Copy link

github-actions bot commented Aug 20, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 34m 47s ⏱️ -23s
3 412 tests ±0  3 014 ✅ ±0  398 💤 ±0  0 ❌ ±0 
3 414 runs  ±0  3 014 ✅ ±0  400 💤 ±0  0 ❌ ±0 

Results for commit 4614aad. ± Comparison against base commit 2cadbb2.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 21, 2024

S3 Image Test Results (AMD64 / ARM64)

  2 files    2 suites   3m 35s ⏱️
420 tests 368 ✅  52 💤 0 ❌
840 runs  736 ✅ 104 💤 0 ❌

Results for commit 4614aad.

♻️ This comment has been updated with latest results.

@silv-io silv-io force-pushed the switch-to-setuptools-scm branch from 70348f5 to cfde3e5 Compare August 21, 2024 12:18
@alexrashed alexrashed force-pushed the switch-to-setuptools-scm branch from 39bbe67 to 120e4b5 Compare August 21, 2024 14:37
@silv-io silv-io force-pushed the switch-to-setuptools-scm branch 2 times, most recently from e1078f0 to 9f0936b Compare August 23, 2024 08:33
@silv-io silv-io force-pushed the switch-to-setuptools-scm branch from 9f0936b to 68b259c Compare August 23, 2024 09:13
Copy link
Member Author

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

This is quite an awesome iteration, @silv-io! We're nearly there! Just found a few nitpicks and leftovers we need to tackle before merging ;) 🚀

@silv-io silv-io force-pushed the switch-to-setuptools-scm branch 2 times, most recently from 6a2bcd7 to 6104e2f Compare August 27, 2024 11:00
@alexrashed alexrashed force-pushed the switch-to-setuptools-scm branch from 6104e2f to 27a953b Compare August 27, 2024 11:01
@alexrashed alexrashed marked this pull request as ready for review August 27, 2024 11:32
Copy link
Member Author

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks, @silv-io for addressing the comments and questions! I think this is good to get looked at by another set of eyes, get a bit more testing, and then get merged! 🥳 💯

@alexrashed alexrashed modified the milestones: 3.8, 3.7 Aug 27, 2024
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Looks good, great push forward! I just had some minor nits regarding regexes and so on, but nothing major!

Comment on lines +52 to +55
# setuptools_scm will be installed transparently if not available, Python3 is expected to be present
if ! python3 -m pip -qqq list | grep -F "setuptools_scm"; then
python3 -m pip install -qqq setuptools_scm > /dev/null 2>&1
fi
Copy link
Member

Choose a reason for hiding this comment

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

I understand the reasoning for this, but I would like to discuss if this is something we can somehow avoid? Especially since developers might use make docker-build and use this script, and might not have the venv activated - it might lead to some modifications to the global / pyenv install users did not assume.

Same for the release-helper.sh

Copy link
Member

@silv-io silv-io Aug 27, 2024

Choose a reason for hiding this comment

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

I think we can avoid this specific issue by depending on the venv make target in the docker-build make targets and activating the venv before using the helper.

/cc @alexrashed

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we should couple the docker-helper or the release-helper to the Makefile, that's even tighter than this coupling with setuptools_scm.
I would propose to keep track of this and tackle this in the coming days (in the next iteration), after some discussion and playing around with possible ways to circumvent this.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI: This is being tackled in #11441 by @silv-io! 🚀

@silv-io silv-io merged commit 67e2b33 into master Aug 27, 2024
43 checks passed
@silv-io silv-io deleted the switch-to-setuptools-scm branch August 27, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants