Skip to content

Commit 789d21f

Browse files
authored
Merge branch 'main' into miketheman/valkey-local
2 parents 88bca6f + 7824278 commit 789d21f

File tree

1,457 files changed

+219129
-224697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,457 files changed

+219129
-224697
lines changed

.git-blame-ignore-revs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# .git-blame-ignore-revs
2+
# Reformatted codebase with black (#3367)
3+
40fbc32fef7c7ffe41cd18f3f8951578555db1aa
4+
# Collapsed license headers across codebase (#18217)
5+
f59df186dc62274b5831a72f639a1e92bbe3f94c
6+
# Reformatted templates with djlint (#18266)
7+
65f7039c1273ad54163cc3d4e01dc0803c87931a

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
3030
- name: Build image
3131
id: build
32-
uses: depot/build-push-action@636daae76684e38c301daa0c5eca1c095b24e780 # v1.14.0
32+
uses: depot/build-push-action@2583627a84956d07561420dcc1d0eb1f2af3fac0 # v1.15.0
3333
with:
3434
save: true
3535
build-args: |
@@ -68,7 +68,7 @@ jobs:
6868
id-token: write
6969
services:
7070
postgres:
71-
image: ${{ (matrix.name == 'Tests') && 'postgres:16.1' || '' }}
71+
image: ${{ (matrix.name == 'Tests') && 'postgres:17.5' || '' }}
7272
ports:
7373
- 5432:5432
7474
env:
@@ -111,7 +111,7 @@ jobs:
111111
id-token: write
112112
services:
113113
postgres:
114-
image: postgres:16.1
114+
image: postgres:17.5
115115
ports:
116116
- 5432:5432
117117
env:
@@ -133,6 +133,8 @@ jobs:
133133
path: dev/environment
134134
export-variables: true
135135
keys-case: upper
136+
- name: Install jq
137+
run: apt-get update && apt-get install -y jq
136138
- name: Check Database
137139
run: bin/db-check
138140
env:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Initializes the CodeQL tools for scanning.
5656
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
57+
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
5858
with:
5959
languages: ${{ matrix.language }}
6060
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
71+
uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
84+
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/node-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
persist-credentials: false
3333
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3434
with:
35-
node-version: 24.0.0
35+
node-version: 24.4.0
3636
cache: 'npm'
3737
- name: Install Node dependencies
3838
run: npm ci

.github/workflows/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Run zizmor
2929
run: pipx run zizmor --format sarif . > results.sarif
3030
- name: Upload SARIF file
31-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
31+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
3232
with:
3333
# Path to SARIF file relative to the root of the repository
3434
sarif_file: results.sarif

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.2
1+
3.13.5

Dockerfile

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# Set variables reused in Dockerfile
2+
ARG PYTHON_IMAGE_VERSION=3.13.5-slim-bookworm
3+
14
# First things first, we build an image which is where we're going to compile
25
# our static assets with. We use this stage in development.
3-
FROM node:24.0.0-bookworm AS static-deps
6+
FROM node:24.4.1-bookworm AS static-deps
47

58
WORKDIR /opt/warehouse/src/
69

@@ -38,7 +41,7 @@ RUN NODE_ENV=production npm run build
3841

3942

4043
# We'll build a light-weight layer along the way with just docs stuff
41-
FROM python:3.13.2-slim-bookworm AS docs
44+
FROM python:${PYTHON_IMAGE_VERSION} AS docs
4245

4346
# By default, Docker has special steps to avoid keeping APT caches in the layers, which
4447
# is good, but in our case, we're going to mount a special cache volume (kept between
@@ -47,14 +50,22 @@ RUN set -eux; \
4750
rm -f /etc/apt/apt.conf.d/docker-clean; \
4851
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache;
4952

50-
# Install System level build requirements, this is done before
51-
# everything else because these are rarely ever going to change.
53+
# Install System level build requirements, this is done before everything else
54+
# because these are rarely ever going to change.
55+
# Usages:
56+
# - build-essential: make
57+
# - git: mkdocs plugin uses this for created/updated
58+
# - libcairo2: mkdocs uses cairosvg
5259
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5360
--mount=type=cache,target=/var/lib/apt,sharing=locked \
5461
set -x \
5562
&& apt-get update \
5663
&& apt-get install --no-install-recommends -y \
57-
build-essential git libcairo2-dev libfreetype6-dev libjpeg-dev libpng-dev libz-dev
64+
build-essential \
65+
git \
66+
libcairo2 \
67+
&& apt-get clean \
68+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
5869

5970
# We create an /opt directory with a virtual environment in it to store our
6071
# application in.
@@ -105,7 +116,7 @@ USER docs
105116

106117
# Now we're going to build our actual application, but not the actual production
107118
# image that it gets deployed into.
108-
FROM python:3.13.2-slim-bookworm AS build
119+
FROM python:${PYTHON_IMAGE_VERSION} AS build
109120

110121
# Define whether we're building a production or a development image. This will
111122
# generally be used to control whether or not we install our development and
@@ -121,23 +132,6 @@ ARG CI=no
121132
# i.e. 'docker compose run --rm web python -m warehouse shell --type=ipython')
122133
ARG IPYTHON=no
123134

124-
# By default, Docker has special steps to avoid keeping APT caches in the layers, which
125-
# is good, but in our case, we're going to mount a special cache volume (kept between
126-
# builds), so we WANT the cache to persist.
127-
RUN set -eux; \
128-
rm -f /etc/apt/apt.conf.d/docker-clean; \
129-
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache;
130-
131-
# Install System level Warehouse build requirements, this is done before
132-
# everything else because these are rarely ever going to change.
133-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
134-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
135-
set -x \
136-
&& apt-get update \
137-
&& apt-get install --no-install-recommends -y \
138-
build-essential libffi-dev libxml2-dev libxslt-dev libpq-dev libcurl4-openssl-dev libssl-dev \
139-
$(if [ "$DEVEL" = "yes" ]; then echo 'libjpeg-dev'; fi)
140-
141135
# We create an /opt directory with a virtual environment in it to store our
142136
# application in.
143137
RUN set -x \
@@ -187,7 +181,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
187181

188182
# Now we're going to build our actual application image, which will eventually
189183
# pull in the static files that were built above.
190-
FROM python:3.13.2-slim-bookworm
184+
FROM python:${PYTHON_IMAGE_VERSION}
191185

192186
# Setup some basic environment variables that are ~never going to change.
193187
ENV PYTHONUNBUFFERED 1
@@ -205,23 +199,31 @@ ARG DEVEL=no
205199
# as well for the matrix!
206200
ARG CI=no
207201

208-
# This is a work around because otherwise postgresql-client bombs out trying
209-
# to create symlinks to these directories.
210-
RUN set -x \
211-
&& mkdir -p /usr/share/man/man1 \
212-
&& mkdir -p /usr/share/man/man7
202+
# By default, Docker has special steps to avoid keeping APT caches in the layers, which
203+
# is good, but in our case, we're going to mount a special cache volume (kept between
204+
# builds), so we WANT the cache to persist.
205+
RUN set -eux; \
206+
rm -f /etc/apt/apt.conf.d/docker-clean; \
207+
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache;
213208

214209
# Install System level Warehouse requirements, this is done before everything
215210
# else because these are rarely ever going to change.
211+
# Usages:
212+
# - build-essential: make
213+
# - postgresql-client: make initdb and friends
214+
# - oathtool: make totp
216215
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
217216
--mount=type=cache,target=/var/lib/apt,sharing=locked \
218217
set -x \
219-
&& apt-get update \
220-
&& apt-get install --no-install-recommends -y \
221-
libpq5 libxml2 libxslt1.1 libcurl4 \
222-
$(if [ "$DEVEL" = "yes" ]; then echo 'bash libjpeg62 postgresql-client build-essential libffi-dev libxml2-dev libxslt-dev libpq-dev libcurl4-openssl-dev libssl-dev vim oathtool'; fi) \
223-
&& apt-get clean \
224-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
218+
&& if [ "$DEVEL" = "yes" ]; then \
219+
apt-get update \
220+
&& apt-get install --no-install-recommends -y \
221+
build-essential \
222+
postgresql-client \
223+
oathtool \
224+
&& apt-get clean \
225+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
226+
fi
225227

226228
# Copy the directory into the container, this is done last so that changes to
227229
# Warehouse itself require the least amount of layers being invalidated from
@@ -236,4 +238,4 @@ COPY . /opt/warehouse/src/
236238
RUN tldextract --update
237239
# Load our module to pre-compile as much bytecode as we can easily.
238240
# Saves time collectively on container boot!
239-
RUN python -m warehouse
241+
RUN python -m warehouse db -h

babel.config.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
/* Licensed under the Apache License, Version 2.0 (the "License");
2-
* you may not use this file except in compliance with the License.
3-
* You may obtain a copy of the License at
4-
*
5-
* http://www.apache.org/licenses/LICENSE-2.0
6-
*
7-
* Unless required by applicable law or agreed to in writing, software
8-
* distributed under the License is distributed on an "AS IS" BASIS,
9-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
* See the License for the specific language governing permissions and
11-
* limitations under the License.
12-
*/
1+
/* SPDX-License-Identifier: Apache-2.0 */
132

143
module.exports = {
154
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],

bin/db-check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -ex
33

44
# When on GitHub Actions, if a label is present on the PR, skip the check.
55
if [ -n "$GITHUB_ACTIONS" ]; then

bin/depchecker.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# Licensed under the Apache License, Version 2.0 (the "License");
2-
# you may not use this file except in compliance with the License.
3-
# You may obtain a copy of the License at
4-
#
5-
# http://www.apache.org/licenses/LICENSE-2.0
6-
#
7-
# Unless required by applicable law or agreed to in writing, software
8-
# distributed under the License is distributed on an "AS IS" BASIS,
9-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
# See the License for the specific language governing permissions and
11-
# limitations under the License.import sys
1+
# SPDX-License-Identifier: Apache-2.0
122

133
import sys
144

0 commit comments

Comments
 (0)