Skip to content

Conversation

@ttypic
Copy link
Contributor

@ttypic ttypic commented Sep 25, 2025

Resolves #630

Added missed sync folder to the wheel package

Summary by CodeRabbit

  • Bug Fixes
    • Ensures the package includes the previously missing sync folder in both wheel and source distributions for full functionality after install.
  • Chores
    • Strengthened release pipeline with automated checks that fail early if required package contents are missing.
    • Bumped library version to 2.1.1.
  • Documentation
    • Updated changelog with v2.1.1 details.

@coderabbitai
Copy link

coderabbitai bot commented Sep 25, 2025

Walkthrough

Release workflow updated to add artifact validation for the ably/sync/ path in wheel and sdist. Poetry setup version adjusted. Package version bumped to 2.1.1 across pyproject and init. Changelog updated with v2.1.1 entry noting inclusion of the sync folder in the wheel.

Changes

Cohort / File(s) Summary
Release workflow validation
.github/workflows/release.yml
Adjusts Poetry setup version (2.1.4 → 1.8.5). Adds steps to inspect the first built wheel and tarball for the ably/sync/ path and fail if missing.
Version bump
ably/__init__.py, pyproject.toml
Increments package version from 2.1.0 to 2.1.1 in code and Poetry metadata.
Changelog update
CHANGELOG.md
Adds v2.1.1 section noting the added sync folder in the wheel package and links to full changelog.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Maintainer
  participant GH as GitHub Actions: release.yml
  participant Build as Build & Package
  participant Check as Artifact Validator
  participant Registry as Package Registry

  Dev->>GH: Push tag / trigger release
  GH->>Build: Install Poetry (setup 1.8.5)
  Build->>Build: Build wheel and sdist
  Build-->>GH: Upload artifacts
  GH->>Check: Inspect wheel for ably/sync/
  Check-->>GH: Pass/Fail
  GH->>Check: Inspect sdist for ably/sync/
  Check-->>GH: Pass/Fail
  alt Validation passes
    GH->>Registry: Publish artifacts
    Registry-->>Dev: Release available
  else Validation fails
    GH-->>Dev: Workflow fails early
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump the ground—release day cheer!
A sync-y path now crystal clear.
Wheels and tarballs, checked with care,
If folders hide, we stop right there.
Version hops to two-one-one—
Carrot raised: another run done! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Release 2.1.1” directly reflects the primary purpose of the changeset, which is to bump the version and publish the 2.1.1 release, and it is concise and specific enough for teammates to understand the main update at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/2.1.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 15:55 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 16:03 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 16:06 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 16:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 16:19 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/631/features September 25, 2025 16:20 Inactive
Newest releases of poetry somehow miss the ` sync ` folder. Added tests that check that `sync` exists
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
pyproject.toml (1)

26-28: Prefer Poetry “packages” over “include” for reliable packaging of generated sync modules.

Using “include = ['ably/**/*.py']” is non‑idiomatic and may be brittle for generated code. Let Poetry discover the ably package explicitly.

Apply this diff:

-include = [
-  'ably/**/*.py'
-]
+packages = [{ include = "ably" }]

Please confirm ably/sync has init.py files after unasync so it’s recognized as a package at build time.

CHANGELOG.md (1)

3-10: Trim trailing whitespace.

Minor nit on Line 9.

-* Added missed `sync` folder to the wheel package 
+* Added missed `sync` folder to the wheel package
.github/workflows/release.yml (1)

59-79: Harden the artifact validation step (safer globbing, strict mode, clearer failures).

Prevents false negatives when no files are present and improves diagnostics. Keeps unzip/tar approach.

-      - name: Check that wheel and tarball contains ably/sync/
-        run: |
-          # Check wheel
-          WHEEL=$(ls dist/*.whl | head -n 1)
-          echo "Checking wheel: $WHEEL"
-          if unzip -l "$WHEEL" | grep -q "ably/sync/"; then
-            echo "✅ Found ably/sync/ in wheel"
-          else
-            echo "❌ ably/sync/ not found in wheel"
-            exit 1
-          fi
-          
-          # Check tarball
-          TARBALL=$(ls dist/*.tar.gz | head -n 1)
-          echo "Checking tarball: $TARBALL"
-          if tar -tzf "$TARBALL" | grep -q "ably/sync/"; then
-            echo "✅ Found ably/sync/ in tarball"
-          else
-            echo "❌ ably/sync/ not found in tarball"
-            exit 1
-          fi
+      - name: Check that wheel and tarball contain ably/sync/
+        shell: bash
+        run: |
+          set -euo pipefail
+
+          # Check wheel
+          shopt -s nullglob || true
+          wheels=(dist/*.whl)
+          if [ ${#wheels[@]} -eq 0 ]; then
+            echo "❌ No wheel files found in dist/"
+            exit 1
+          fi
+          WHEEL="${wheels[0]}"
+          echo "Checking wheel: $WHEEL"
+          if unzip -l "$WHEEL" | grep -q 'ably/sync/'; then
+            echo "✅ Found ably/sync/ in wheel"
+          else
+            echo "❌ ably/sync/ not found in wheel"
+            exit 1
+          fi
+
+          # Check tarball
+          tarballs=(dist/*.tar.gz)
+          if [ ${#tarballs[@]} -eq 0 ]; then
+            echo "❌ No tarball files found in dist/"
+            exit 1
+          fi
+          TARBALL="${tarballs[0]}"
+          echo "Checking tarball: $TARBALL"
+          if tar -tzf "$TARBALL" | grep -q 'ably/sync/'; then
+            echo "✅ Found ably/sync/ in tarball"
+          else
+            echo "❌ ably/sync/ not found in tarball"
+            exit 1
+          fi

Optional: Move this check before the upload-artifact step to fail earlier in the build job.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9ec513b and 7e67dc3.

📒 Files selected for processing (4)
  • .github/workflows/release.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
  • ably/__init__.py (1 hunks)
  • pyproject.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: check (3.13)
  • GitHub Check: check (3.10)
  • GitHub Check: check (3.9)
  • GitHub Check: check (3.8)
  • GitHub Check: check (3.7)
  • GitHub Check: check (3.11)
  • GitHub Check: check (3.12)
🔇 Additional comments (3)
ably/__init__.py (1)

19-19: Version bump aligned with release.

Matches pyproject and changelog updates.

pyproject.toml (1)

3-3: Version bump looks good.

Consistent with ably/init.py and the release workflow.

.github/workflows/release.yml (1)

27-27: Pinning Poetry 1.8.5 is fine.

Good for reproducibility. Ensure lockfile compatibility if regenerated locally with a different Poetry version.

Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

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

Lgtm

@ttypic ttypic merged commit 8021524 into main Sep 25, 2025
10 checks passed
@ttypic ttypic deleted the release/2.1.1 branch September 25, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Version 2.1.0 does not have sync when installed from pip

3 participants