mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-22 15:38:06 +00:00
Reduce cache timeouts to ensure faster builds on timeout. (#9619)
The current timeouts are too long, and mean that if the GitHub cache decides to act up, jobs get bogged down for 15min at a time. This has happened 2-3 times already this week -- a tiny fraction of our total workflows but really annoying when it happens to you. We can do better. Installing deps on cache miss takes about ~4min, so it's not worth waiting more than 4min for the deps cache. The black and mypy caches save 1 and 2min, respectively, so wait only up to that long to download them.
This commit is contained in:
parent
a1e89aa8d5
commit
acb54d8b9d
4
.github/actions/poetry_setup/action.yml
vendored
4
.github/actions/poetry_setup/action.yml
vendored
@ -41,7 +41,7 @@ runs:
|
|||||||
id: cache-pip
|
id: cache-pip
|
||||||
name: Cache Pip ${{ inputs.python-version }}
|
name: Cache Pip ${{ inputs.python-version }}
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4"
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/pip
|
~/.cache/pip
|
||||||
@ -69,7 +69,7 @@ runs:
|
|||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
id: cache-poetry
|
id: cache-poetry
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4"
|
||||||
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}
|
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
8
.github/workflows/_lint.yml
vendored
8
.github/workflows/_lint.yml
vendored
@ -84,7 +84,7 @@ jobs:
|
|||||||
id: cache-pip
|
id: cache-pip
|
||||||
name: Cache langchain editable pip install - ${{ matrix.python-version }}
|
name: Cache langchain editable pip install - ${{ matrix.python-version }}
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4"
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/pip
|
~/.cache/pip
|
||||||
@ -95,7 +95,7 @@ jobs:
|
|||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4"
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: poetry
|
cache: poetry
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
CACHE_BASE: black-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', env.WORKDIR)) }}
|
CACHE_BASE: black-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', env.WORKDIR)) }}
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "1"
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ env.WORKDIR }}/.black_cache
|
${{ env.WORKDIR }}/.black_cache
|
||||||
@ -127,7 +127,7 @@ jobs:
|
|||||||
- name: Get .mypy_cache to speed up mypy
|
- name: Get .mypy_cache to speed up mypy
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "2"
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ env.WORKDIR }}/.mypy_cache
|
${{ env.WORKDIR }}/.mypy_cache
|
||||||
|
Loading…
Reference in New Issue
Block a user