spectacles-ci / spectacles

A continuous integration tool for Looker and LookML.
https://spectacles.dev
MIT License
217 stars 35 forks source link

Latest version not installing monotonic #760

Closed camtr0n closed 9 months ago

camtr0n commented 9 months ago

Our CI runs are failing due to missing monotonic module after using pip install spectacles to set up our environment. Seeing this locally as well.

Failure:

Run bash ../etc/ci.run-spectacles-lookml.sh prod
Running Spectacles: LookML validation
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.18/x64/bin/spectacles", line 5, in <module>
    from spectacles.cli import main
  File "/opt/hostedtoolcache/Python/3.9.[18](https://github.com/replicatedhq/data/actions/runs/7738160085/job/21098442542#step:5:19)/x64/lib/python3.9/site-packages/spectacles/cli.py", line [19](https://github.com/replicatedhq/data/actions/runs/7738160085/job/21098442542#step:5:20), in <module>
    import spectacles.tracking as tracking
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/spectacles/tracking.py", line 5, in <module>
    import analytics
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/analytics/__init__.py", line 3, in <module>
    from analytics.client import Client
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/analytics/client.py", line 11, in <module>
    from analytics.consumer import Consumer
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/analytics/consumer.py", line 3, in <module>
    import monotonic
ModuleNotFoundError: No module named 'monotonic'
Error: Process completed with exit code 1.

Will paste pip install spectacles output into a comment

camtr0n commented 9 months ago

pip install spectacles output:

Run pip install spectacles
Collecting spectacles
  Downloading spectacles-2.4.0-py3-none-any.whl.metadata (4.8 kB)
Collecting PyYAML<7.0.0,>=6.0.1 (from spectacles)
  Downloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting aiocache<0.13.0,>=0.12.2 (from spectacles)
  Downloading aiocache-0.12.2-py2.py3-none-any.whl.metadata (8.3 kB)
Collecting backoff<3.0,>=2.1 (from spectacles)
  Downloading backoff-2.2.1-py3-none-any.whl (15 kB)
Collecting colorama<0.5.0,>=0.4.6 (from spectacles)
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting httpx<0.27.0,>=0.26.0 (from spectacles)
  Downloading httpx-0.26.0-py3-none-any.whl.metadata (7.6 kB)
Collecting pydantic<3.0.0,>=2.5.3 (from spectacles)
  Downloading pydantic-2.6.0-py3-none-any.whl.metadata (81 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.8/81.8 kB 12.8 MB/s eta 0:00:00
Collecting segment-analytics-python<3.0.0,>=2.2.3 (from spectacles)
  Downloading segment_analytics_python-2.3.0-py2.py3-none-any.whl.metadata (1.6 kB)
Collecting tabulate<0.10.0,>=0.9.0 (from spectacles)
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting typing-extensions<5.0.0,>=4.9.0 (from spectacles)
  Downloading typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Collecting anyio (from httpx<0.27.0,>=0.26.0->spectacles)
  Downloading anyio-4.2.0-py3-none-any.whl.metadata (4.6 kB)
Collecting certifi (from httpx<0.27.0,>=0.26.0->spectacles)
  Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Collecting httpcore==1.* (from httpx<0.27.0,>=0.26.0->spectacles)
  Downloading httpcore-1.0.2-py3-none-any.whl.metadata (20 kB)
Collecting idna (from httpx<0.27.0,>=0.26.0->spectacles)
  Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting sniffio (from httpx<0.27.0,>=0.26.0->spectacles)
  Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<0.27.0,>=0.26.0->spectacles)
  Downloading h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 10.8 MB/s eta 0:00:00
Collecting annotated-types>=0.4.0 (from pydantic<3.0.0,>=2.5.3->spectacles)
  Downloading annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Collecting pydantic-core==2.16.1 (from pydantic<3.0.0,>=2.5.3->spectacles)
  Downloading pydantic_core-2.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.5 kB)
Collecting requests~=2.7 (from segment-analytics-python<3.0.0,>=2.2.3->spectacles)
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting python-dateutil~=2.2 (from segment-analytics-python<3.0.0,>=2.2.3->spectacles)
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 38.7 MB/s eta 0:00:00
Collecting six>=1.5 (from python-dateutil~=2.2->segment-analytics-python<3.0.0,>=2.2.3->spectacles)
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting charset-normalizer<4,>=2 (from requests~=2.7->segment-analytics-python<3.0.0,>=2.2.3->spectacles)
  Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
Collecting urllib3<3,>=1.21.1 (from requests~=2.7->segment-analytics-python<3.0.0,>=2.2.3->spectacles)
  Downloading urllib3-2.2.0-py3-none-any.whl.metadata (6.4 kB)
Collecting exceptiongroup>=1.0.2 (from anyio->httpx<0.27.0,>=0.26.0->spectacles)
  Downloading exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB)
Downloading spectacles-2.4.0-py3-none-any.whl (46 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.3/46.3 kB 9.2 MB/s eta 0:00:00
Downloading aiocache-0.12.2-py2.py3-none-any.whl (28 kB)
Downloading httpx-0.26.0-py3-none-any.whl (75 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.9/75.9 kB 14.8 MB/s eta 0:00:00
Downloading httpcore-1.0.2-py3-none-any.whl (76 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.9/76.9 kB 14.2 MB/s eta 0:00:00
Downloading pydantic-2.6.0-py3-none-any.whl (394 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 394.2/394.2 kB 47.1 MB/s eta 0:00:00
Downloading pydantic_core-2.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 70.3 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (738 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 738.9/738.9 kB 60.4 MB/s eta 0:00:00
Downloading segment_analytics_python-2.3.0-py2.py3-none-any.whl (37 kB)
Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 12.7 MB/s eta 0:00:00
Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.5/162.5 kB 29.4 MB/s eta 0:00:00
Downloading idna-3.6-py3-none-any.whl (61 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 12.1 MB/s eta 0:00:00
Downloading anyio-4.2.0-py3-none-any.whl (85 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.5/85.5 kB 16.5 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.3/142.3 kB 27.1 MB/s eta 0:00:00
Downloading exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Downloading urllib3-2.2.0-py3-none-any.whl (120 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.9/120.9 kB 24.0 MB/s eta 0:00:00
Installing collected packages: aiocache, urllib3, typing-extensions, tabulate, sniffio, six, PyYAML, idna, h11, exceptiongroup, colorama, charset-normalizer, certifi, backoff, annotated-types, requests, python-dateutil, pydantic-core, httpcore, anyio, segment-analytics-python, pydantic, httpx, spectacles
Successfully installed PyYAML-6.0.1 aiocache-0.12.2 annotated-types-0.6.0 anyio-4.2.0 backoff-2.2.1 certifi-2023.11.17 charset-normalizer-3.3.2 colorama-0.4.6 exceptiongroup-1.2.0 h11-0.14.0 httpcore-1.0.2 httpx-0.26.0 idna-3.6 pydantic-2.6.0 pydantic-core-2.16.1 python-dateutil-2.8.2 requests-2.31.0 segment-analytics-python-2.3.0 six-1.16.0 sniffio-1.3.0 spectacles-2.4.0 tabulate-0.9.0 typing-extensions-4.9.0 urllib3-2.2.0
camtr0n commented 9 months ago

current workaround is to update all our workflows to use pip install spectacles monotonic==1.6

joshtemple commented 9 months ago

Thanks @camtr0n for the report. This is resolved in v2.4.1.

joshtemple commented 9 months ago

This actually seems to have created a different issue, also with the segment-analytics-python package. Pinning to a previous version should fix it, but I'm going to yank 2.4.1 from PyPI while I make this next fix.

joshtemple commented 9 months ago

Okay, v2.4.2 should do it. Let me know if you have any issues installing.