Closed johnkerl closed 3 months ago
Re-assigning to @ryan-williams
At a minimum, actions/setup-python is doing something buggy, I filed https://github.com/actions/setup-python/issues/919.
This issue is live on #2853, until we find a work-around, so I'm reopening it.
Issue persists with setup-python
cache disabled (and no pre-commit cache found/restored), on both macos and ubuntu. Very strange.
I believe I've root-caused this:
setup.py
) is unpinned, as is our pandas-stub
(in .pre-commit-config.yaml
), meaning we can end up with Pandas 1.x or 2.x (and likewise for the "stub" types in mypy).pd.Series[Any]
, pd.Index[Any]
), but must not in Pandas 1.x (pd.Series
, pd.Index
).pandas{,-stub}>=2
, and type-checking would pass, as HEAD
is compatible with Pandas 2.x types.setup-python
is (incorrectly, afaict, per setup-python#919) loading old cached environments containing Pandas 1.x, causing the 2.x-compatible types in the codebase to error, failing some GHAs (as well as local environments using.I believe #2854 actually fixes it; we can keep an eye on setup-python
caching behavior as well.
Here is a little script I wrote that mimics the GHA hashFiles
helper (used in setup-python and in some of our actions/cache invocations):
#!/usr/bin/env python
import hashlib
import sys
sha256 = hashlib.sha256()
for path in sys.argv[1:]:
file_sha256 = hashlib.sha256()
with open(path, "rb") as f:
for byte_block in iter(lambda: f.read(4096), b""):
file_sha256.update(byte_block)
sha256.update(file_sha256.digest())
print(sha256.hexdigest())
To be investigated:
On the one hand this might seem to be a minor annoyance; on the other, it's clouding CI just when we're trying to make the TileDB-SOMA 1.13.0 release. Thus we should solve this sooner than later.
See also #2838 (just created) which has significant narrative by @ryan-williams on it.
Some background info (something that's been in place for a year now, I am reading up on now):
[sc-52471]