Skip to content

fix(ci): key Python environment caches by resolved interpreter version - #134

Merged
jamesbhobbs merged 2 commits into
mainfrom
mb/python-environment-cache-keys
Oct 8, 2026
Merged

jamesbhobbs merged 2 commits into
mainfrom
mb/python-environment-cache-keys

Conversation

@m1so

@m1so m1so commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Runner image updates can restore virtual environments created with a different Python patch version, causing Poetry to recreate the environment and unit tests to fail with Command not found: pytest.

Key CI and CD environment caches by the resolved Python version, OS, and architecture. Dependency installation continues to be skipped on cache hits.

Validation: both workflow YAML files parse, cache step references checked, and git diff --check passed.

Summary by CodeRabbit

  • Chores
    • Updated dependency caching in automated checks and release workflows to account for the operating system, processor architecture, and Python version. Pull-request checks also distinguish dependencies by their source repository.
    • These workflow updates do not change app features or behavior.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c9eb2cd2-6436-4622-a59a-3a9aab82d82a
📥 Commits

Reviewing files that changed from the base of the PR and between 0a9cd3e and 4707ecc.

📒 Files selected for processing (2)
  • .github/workflows/cd.yml
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

CI and publishing workflow cache keys now include runner OS and architecture. Several CI keys use the Python version reported by setup-python. The mypy and unit-test setup steps now have IDs so their outputs can be referenced in those keys.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Suggested reviewers: mfranczel

Merge Risk: ⚪ Minimal · up to 4707e

The reviewed cache keys distinguish resolved Python versions where cached environments are reused, so no merge-blocking cache risk was identified.

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Updates Docs ✅ Passed PASS — The pull request changes only GitHub Actions cache-key logic in deepnote-toolkit; it does not implement a user-facing feature that requires documentation updates. No documentation or roadmap …
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: Python environment caches now use the resolved interpreter version. This matches the PR objectives and workflow changes.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

📦 Python package built successfully!

  • Version: 2.8.0.dev6+0fac9a3
  • Wheel: deepnote_toolkit-2.8.0.dev6+0fac9a3-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/2.8.0.dev6%2B0fac9a3/deepnote_toolkit-2.8.0.dev6%2B0fac9a3-py3-none-any.whl"

@m1so
m1so requested a review from jamesbhobbs October 8, 2026 10:32
@m1so
m1so marked this pull request as ready for review October 8, 2026 10:32
@m1so
m1so requested a review from a team as a code owner October 8, 2026 10:32
@m1so
m1so requested a review from tkislan October 8, 2026 10:32
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.26%. Comparing base (0a9cd3e) to head (4707ecc).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #134   +/-   ##
=======================================
  Coverage   77.26%   77.26%           
=======================================
  Files         115      115           
  Lines        6589     6589           
  Branches      961      961           
=======================================
  Hits         5091     5091           
  Misses       1186     1186           
  Partials      312      312           
Flag Coverage Δ
combined 77.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@deepnote-bot

Copy link
Copy Markdown

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-134
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
⏰ Last deployed 2026-10-08 10:50:45 (UTC)
📜 Deployed commit 28af18b1d030d895e236c8b40de117342035311f
🛠️ Toolkit version 0fac9a3

@jamesbhobbs
jamesbhobbs merged commit f07a89f into main Oct 8, 2026
38 checks passed
@jamesbhobbs
jamesbhobbs deleted the mb/python-environment-cache-keys branch October 8, 2026 10:52
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