redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.12k stars 112 forks source link

Update cache restore to include python version #479

Open YaraslauZhylko opened 1 year ago

YaraslauZhylko commented 1 year ago

Description

Use separate .venv cache for each Python version because poetry install does put Python executable into the .venv directory thus propagating the the version of the first install into other matrix tests.

Validation

image

Related Issues

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.01 :tada:

Comparison is base (eb14537) 78.92% compared to head (2610d3f) 78.94%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #479 +/- ## ========================================== + Coverage 78.92% 78.94% +0.01% ========================================== Files 14 14 Lines 1177 1178 +1 ========================================== + Hits 929 930 +1 Misses 248 248 ``` | Flag | Coverage Δ | | |---|---|---| | unit | `78.94% <ø> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://codecov.io/gh/redis/redis-om-python/pull/479/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

YaraslauZhylko commented 1 year ago

pypy-3.7 failure seems to be unrelated to the change and may be a good example of errors that were hidden because of the initial bug: https://github.com/redis/redis-om-python/actions/runs/4162876200/jobs/7202607098#step:7:397

YaraslauZhylko commented 1 year ago

pypy-3.7 failure seems to be unrelated to the change

https://github.com/nashant/kopf/commit/ab5377b6803a5be8c866a4402d07b24cd287f118#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552R17-R18

YaraslauZhylko commented 1 year ago

@chayim @dvora-h This one is ready for review.

But I do not know what's the best way to fix the issue with pypy-3.7. Deprecate pypy-3.7? Find some replacement for typed-ast? Limit mypy dependency to cpython implementation only (like this)?

chayim commented 1 year ago

@YaraslauZhylko The only issue with the flow currently is the reliance on a single cache (definitely a bug!). However, poetry's install addresses that. You'll note that the python versions, are installed appropriately via the action. However, the cache key could include ${{ matrix.pyver }} as mentioned in the review.

YaraslauZhylko commented 1 year ago

@chayim Fixed the ${{ matrix.pyver }} part (see review comment above).

But what should we do with mypy and types-ast for pypy-3.7?

YaraslauZhylko commented 1 year ago

@chayim Now Dependency Audit fails as well. 😅

Will merging #483 fix that? All GitHub actions seem to be green for it.

YaraslauZhylko commented 1 year ago

@chayim Limited mypy to cpython implementation only to solve the types-ast issue. Please let me know if we should handle this differently.