Just a quick warning to maybe save someone some ti...
# flyte-support
s
Just a quick warning to maybe save someone some time. I was running into the following traceback, but only on this one machine. After way too much head scratching, and not understanding why this was only broken when using
uv
, but not
poetry
or just
pip install
in venv I finally figured out that
uv
had cached a version of
flyteidl
which claimed to be 0.15.1, but had a diff compared to a cleanly installed 0.15.1 (at least for
/flyteidl/core/workflow_pb2.py
). So I have no idea what actually happened here, but one possible explanation would be if there was a 0.15.1 release with this bug, and flyte maintainers made a new release without bumping the version number and I just got very unlucky. But it could also be something completely else, I'm not really interested in assigning blame here. (Also I didn't keep a copy of the bad lib, I was more interested in getting unblocked) As for the fix, just running
uv cache clean
and then nuking any
.venv
folders with the bad release seems to have fixed things. So no followup needed as far as I'm concerned.
Copy code
... 
 File ".../.venv/lib/python3.11/site-packages/flytekit/__init__.py", line 225, in <module>
    from flytekit.core.array_node_map_task import map_task
  File ".../.venv/lib/python3.11/site-packages/flytekit/core/array_node_map_task.py", line 14, in <module>
    from flytekit.core.array_node import array_node
  File "/.../.venv/lib/python3.11/site-packages/flytekit/core/array_node.py", line 35, in <module>
    class ArrayNode:
  File ".../.venv/lib/python3.11/site-packages/flytekit/core/array_node.py", line 146, in ArrayNode
    def data_mode(self) -> _core_workflow.ArrayNode.DataMode:
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: DataMode
Correction, I do still have a venv with the bad version, where running the following crashes. So just let me know if I should open a github issue and attach a zipped copy for debuging.
Copy code
❯ uv run python
Cannot read termcap database;
using dumb terminal settings.
Python 3.11.6 (main, Oct  3 2023, 01:26:22) [Clang 17.0.1 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from flyteidl.core import workflow_pb2
>>> workflow_pb2.ArrayNode.DataMode       
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: DataMode
>>>
a
hey Thomas. Sorry, not sure I follow, I see
1.15.1
as the latest flyteidl release
s
I don't know how, but somehow I had a 1.15.1 installed from the local uv's cache that does not match the released 1.15.1. This could be a uv bug, this could be explained by 1.15.1 being released, downloaded to my local cache and then being re-released with different content (but I have no evidence of this, it is just speculation that could explain what I observed), or something completely else. I know it was broken, I know clearing out all my local caches and reinstalling in a new venv fixed the problem.
Though if nobody else gets that traceback this can just be ignored IMO
But I've kept a copy of a broken venv if anybody wants to dig into it, just in case
a
yeah that's strange. I cut the 1.15.1 release but the process wouldn't allow republishing on the same semVer
s
Yeah, it made no sense, and took way too long to debug and isolate. So I just wanted to share this on the off chance that it saves someone else some time. I don't want to waste your or other maintainers time on debugging this 😃
a
@stale-barista-80787 this was indeed a hole in the release process for 1.15.1. We just bumped to 1.15.3 with the corresponding flyteidl release and updated the release process docs to make sure this doesn't happen again
sorry for the inconveniences, and let us know if bumping to the new version works for you
s
No worries, glad you figured out what happened at least 🙂 We've not really had any issues other than me locally in our switch to uv branch, for whatever reason