Skip to content

Commit f4c697e

Browse files
authored
Merge branch 'master' into okta_workflows-assets-V1.0.0
2 parents b0477e8 + 3287d5a commit f4c697e

File tree

1,354 files changed

+97293
-4751
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,354 files changed

+97293
-4751
lines changed

.builders/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def build_macos():
118118
'DD_PY2_BUILDENV_PATH': builder_root / 'py2' / 'bin' / 'python',
119119
# Path where we'll install libraries that we build
120120
'DD_PREFIX_PATH': prefix_path,
121+
'PATH': f'{prefix_path}/bin:{os.environ["PATH"]}',
121122
# Common compilation flags
122123
'LDFLAGS': f'-L{prefix_path}/lib',
123124
'CFLAGS': f'-I{prefix_path}/include -O2',

.builders/deps/build_dependencies.txt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
hatchling==1.21.1; python_version > '3.0'
2-
hatchling==0.25.1; python_version < '3.0'
3-
setuptools==66.1.1; python_version > '3.0'
4-
setuptools==40.9.0; python_version < '3.0'
5-
wheel==0.38.4; python_version > '3.0'
6-
wheel==0.37.1; python_version < '3.0'
7-
setuptools-scm; python_version > '3.0'
8-
setuptools-scm==5.0.2; python_version < '3.0'
9-
setuptools-rust>=1.7.0; python_version > '3.0'
10-
maturin; python_version > '3.0'
1+
hatchling==1.21.1
2+
setuptools==75.6.0
3+
wheel==0.38.4
4+
setuptools-scm
5+
setuptools-rust>=1.7.0
6+
maturin
117
cffi>=1.12
128
cython==3.0.11
13-
tomli>=2.0.1; python_version > '3.0'
9+
tomli>=2.0.1

.builders/images/linux-aarch64/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@ RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
3636
ldconfig
3737

3838
# Compile and install Python 3
39-
ENV PYTHON3_VERSION=3.12.6
39+
ENV PYTHON3_VERSION=3.12.8
4040
RUN yum install -y libffi-devel && \
4141
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
4242
VERSION="${PYTHON3_VERSION}" \
43-
SHA256="85a4c1be906d20e5c5a69f2466b00da769c221d6a684acfd3a514dbf5bf10a66" \
43+
SHA256="5978435c479a376648cb02854df3b892ace9ed7d32b1fead652712bee9d03a45" \
4444
RELATIVE_PATH="Python-{{version}}" \
4545
bash install-from-source.sh \
46-
--prefix=/opt/python/${PYTHON_VERSION} \
46+
--prefix=/opt/python/${PYTHON3_VERSION} \
4747
--with-ensurepip=yes \
4848
--enable-ipv6 \
4949
--with-dbmliborder=
50-
ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}"
50+
ENV PATH="/opt/python/${PYTHON3_VERSION}/bin:${PATH}"
5151
# Set up virtual environment for Python 3
52-
RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location --upgrade pip \
53-
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location virtualenv \
54-
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m virtualenv /py3
52+
RUN /opt/python/${PYTHON3_VERSION}/bin/python3 -m pip install --no-warn-script-location --upgrade pip \
53+
&& /opt/python/${PYTHON3_VERSION}/bin/python3 -m pip install --no-warn-script-location virtualenv \
54+
&& /opt/python/${PYTHON3_VERSION}/bin/python3 -m virtualenv /py3
5555

5656
# krb5 for dependencies that require kerberos support
5757
RUN \
@@ -141,8 +141,8 @@ RUN \
141141
# curl
142142
RUN \
143143
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
144-
VERSION="8.9.1" \
145-
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
144+
VERSION="8.11.1" \
145+
SHA256="a889ac9dbba3644271bd9d1302b5c22a088893719b72be3487bc3d401e5c4e80" \
146146
RELATIVE_PATH="curl-{{version}}" \
147147
bash install-from-source.sh \
148148
--disable-manual \
@@ -159,6 +159,7 @@ RUN \
159159
--without-gnutls \
160160
--without-librtmp \
161161
--without-libssh2 \
162+
--without-libpsl \
162163
--with-ssl=/usr/local \
163164
&& rm /usr/local/bin/curl
164165

.builders/images/linux-aarch64/build_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then
2121
LDFLAGS="${LDFLAGS} -L/usr/local/lib -lkrb5 -lgssapi_krb5 -llmdb" \
2222
DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \
2323
VERSION="${kafka_version}" \
24-
SHA256="0ddf205ad8d36af0bc72a2fec20639ea02e1d583e353163bf7f4683d949e901b" \
24+
SHA256="5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25" \
2525
RELATIVE_PATH="librdkafka-{{version}}" \
2626
bash install-from-source.sh --enable-sasl --enable-curl
2727
always_build+=("confluent-kafka")

.builders/images/linux-x86_64/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
3535
ldconfig
3636

3737
# Compile and install Python 3
38-
ENV PYTHON3_VERSION=3.12.6
38+
ENV PYTHON3_VERSION=3.12.8
3939
RUN yum install -y libffi-devel && \
4040
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
4141
VERSION="${PYTHON3_VERSION}" \
42-
SHA256="85a4c1be906d20e5c5a69f2466b00da769c221d6a684acfd3a514dbf5bf10a66" \
42+
SHA256="5978435c479a376648cb02854df3b892ace9ed7d32b1fead652712bee9d03a45" \
4343
RELATIVE_PATH="Python-{{version}}" \
44-
bash install-from-source.sh --prefix=/opt/python/${PYTHON_VERSION} --with-ensurepip=yes --enable-ipv6 --with-dbmliborder=
45-
ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}"
44+
bash install-from-source.sh --prefix=/opt/python/${PYTHON3_VERSION} --with-ensurepip=yes --enable-ipv6 --with-dbmliborder=
45+
ENV PATH="/opt/python/${PYTHON3_VERSION}/bin:${PATH}"
4646
# Set up virtual environment for Python 3
47-
RUN /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location --upgrade pip \
48-
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --no-warn-script-location virtualenv \
49-
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m virtualenv /py3
47+
RUN /opt/python/${PYTHON3_VERSION}/bin/python3 -m pip install --no-warn-script-location --upgrade pip \
48+
&& /opt/python/${PYTHON3_VERSION}/bin/python3 -m pip install --no-warn-script-location virtualenv \
49+
&& /opt/python/${PYTHON3_VERSION}/bin/python3 -m virtualenv /py3
5050

5151
# MQ Client library required by pymqi
5252
ENV IBM_MQ_VERSION="9.2.4.0"
@@ -145,8 +145,8 @@ RUN \
145145
# curl
146146
RUN \
147147
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
148-
VERSION="8.9.1" \
149-
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
148+
VERSION="8.11.1" \
149+
SHA256="a889ac9dbba3644271bd9d1302b5c22a088893719b72be3487bc3d401e5c4e80" \
150150
RELATIVE_PATH="curl-{{version}}" \
151151
bash install-from-source.sh \
152152
--disable-manual \
@@ -163,6 +163,7 @@ RUN \
163163
--without-gnutls \
164164
--without-librtmp \
165165
--without-libssh2 \
166+
--without-libpsl \
166167
--with-ssl=/usr/local \
167168
&& rm /usr/local/bin/curl
168169

.builders/images/linux-x86_64/build_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then
1818
LDFLAGS="${LDFLAGS} -L/usr/local/lib -lkrb5 -lgssapi_krb5 -llmdb" \
1919
DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \
2020
VERSION="${kafka_version}" \
21-
SHA256="0ddf205ad8d36af0bc72a2fec20639ea02e1d583e353163bf7f4683d949e901b" \
21+
SHA256="5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25" \
2222
RELATIVE_PATH="librdkafka-{{version}}" \
2323
bash install-from-source.sh --enable-sasl --enable-curl
2424
always_build+=("confluent-kafka")

.builders/images/macos-x86_64/builder_setup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ RELATIVE_PATH="libxslt-{{version}}" \
7171

7272
# curl
7373
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
74-
VERSION="8.9.1" \
75-
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
74+
VERSION="8.11.1" \
75+
SHA256="a889ac9dbba3644271bd9d1302b5c22a088893719b72be3487bc3d401e5c4e80" \
7676
RELATIVE_PATH="curl-{{version}}" \
7777
install-from-source \
7878
--disable-manual \
@@ -89,6 +89,7 @@ RELATIVE_PATH="curl-{{version}}" \
8989
--without-gnutls \
9090
--without-librtmp \
9191
--without-libssh2 \
92+
--without-libpsl \
9293
--with-ssl="${DD_PREFIX_PATH}"
9394
# Remove the binary installed so that we consistenly use the same original `curl` binary
9495
rm "${DD_PREFIX_PATH}/bin/curl"

.builders/images/macos-x86_64/extra_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then
1313
LDFLAGS="${LDFLAGS} -L${DD_PREFIX_PATH}/lib -lgssapi_krb5 -llmdb" \
1414
DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \
1515
VERSION="${kafka_version}" \
16-
SHA256="0ddf205ad8d36af0bc72a2fec20639ea02e1d583e353163bf7f4683d949e901b" \
16+
SHA256="5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25" \
1717
RELATIVE_PATH="librdkafka-{{version}}" \
1818
bash install-from-source.sh --prefix="${DD_PREFIX_PATH}" --enable-sasl --enable-curl
1919

.builders/images/windows-x86_64/Dockerfile

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ RUN curl -SL --output PowerShell-%POWERSHELL_VERSION%-win-x64.msi https://github
3535
COPY helpers.ps1 C:\helpers.ps1
3636
SHELL ["pwsh", "-Command", ". C:\\helpers.ps1;"]
3737

38+
# Enable long paths
39+
# https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#registry-setting-to-enable-long-paths
40+
RUN New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
41+
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
42+
# Reduce the chance of hitting path limits (the MSVC compiler cl.exe doesn't seem to respect that optioin)
43+
# This variable is honored by pip
44+
ENV TMP="C:\tmp" `
45+
TEMP="C:\tmp"
46+
3847
# Install 7-Zip ZS
3948
ENV 7ZIP_VERSION="22.01" `
4049
7ZIP_ZS_VERSION="1.5.5-R3"
@@ -73,11 +82,11 @@ RUN Get-RemoteFile `
7382
Approve-File -Path $($Env:USERPROFILE + '\.cargo\bin\rustc.exe') -Hash $Env:RUSTC_HASH
7483

7584
# Install Python 3
76-
ENV PYTHON_VERSION="3.12.6"
85+
ENV PYTHON_VERSION="3.12.8"
7786
RUN Get-RemoteFile `
7887
-Uri https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe `
7988
-Path python-$Env:PYTHON_VERSION-amd64.exe `
80-
-Hash '5914748e6580e70bedeb7c537a0832b3071de9e09a2e4e7e3d28060616045e0a'; `
89+
-Hash '71bd44e6b0e91c17558963557e4cdb80b483de9b0a0a9717f06cf896f95ab598'; `
8190
Start-Process -Wait python-$Env:PYTHON_VERSION-amd64.exe -ArgumentList '/quiet', 'InstallAllUsers=1'; `
8291
Remove-Item python-$Env:PYTHON_VERSION-amd64.exe; `
8392
& 'C:\Program Files\Python312\python.exe' -m pip install --no-warn-script-location --upgrade pip; `
@@ -95,10 +104,38 @@ RUN Get-RemoteFile `
95104
Remove-Item $Env:IBM_MQ_VERSION-IBM-MQC-Redist-Win64.zip; `
96105
setx /M MQ_FILE_PATH 'C:\ibm_mq'
97106

107+
# Perl
108+
ENV PERL_VERSION="5.40.0.1"
109+
RUN Get-RemoteFile `
110+
-Uri https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-$Env:PERL_VERSION-64bit-portable.zip `
111+
-Path "strawberry-perl-$Env:PERL_VERSION-64bit.zip" `
112+
-Hash '754f3e2a8e473dc68d1540c7802fb166a025f35ef18960c4564a31f8b5933907' && `
113+
7z x "strawberry-perl-$Env:PERL_VERSION-64bit.zip" -o"C:\perl" && `
114+
Add-ToPath -Append "C:\perl\perl\bin" && `
115+
Remove-Item "strawberry-perl-$Env:PERL_VERSION-64bit.zip"
116+
117+
ENV OPENSSL_VERSION="3.3.2"
118+
119+
ENV CURL_VERSION="8.11.1"
120+
98121
# Set up runner
99122
COPY runner_dependencies.txt C:\runner_dependencies.txt
100123
RUN python -m pip install --no-warn-script-location -r C:\runner_dependencies.txt
101124

125+
COPY build_script.ps1 C:\build_script.ps1
126+
COPY update_librdkafka_manifest.py C:\update_librdkafka_manifest.py
127+
ENV DD_BUILD_COMMAND="pwsh C:\build_script.ps1"
128+
129+
# Python packages that we want to build regardless of whether prebuilt versions exist on PyPI
130+
ENV PIP_NO_BINARY="confluent_kafka"
131+
# Where to find native dependencies when building extensions and for wheel repairing
132+
RUN New-Item -Path "C:\include" -ItemType Directory
133+
RUN New-Item -Path "C:\lib" -ItemType Directory
134+
RUN New-Item -Path "C:\bin" -ItemType Directory
135+
ENV INCLUDE="C:\include"
136+
ENV LIB="C:\lib"
137+
RUN Add-ToPath -Append "C:\bin"
138+
102139
# Restore the default Windows shell for correct batch processing.
103140
SHELL ["cmd", "/S", "/C"]
104141

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
$ErrorActionPreference = 'Stop'
2+
$PSNativeCommandUseErrorActionPreference = $true
3+
4+
. C:\helpers.ps1
5+
6+
# The librdkafka version needs to stay in sync with the confluent-kafka version,
7+
# thus we extract the version from the requirements file
8+
$kafka_version = Get-Content 'C:\mnt\requirements.in' | perl -nE 'say/^\D*(\d+\.\d+\.\d+)\D*$/ if /confluent-kafka==/'
9+
Write-Host "Will build librdkafka $kafka_version"
10+
11+
# Download and unpack the source
12+
Get-RemoteFile `
13+
-Uri "https://github.com/confluentinc/librdkafka/archive/refs/tags/v${kafka_version}.tar.gz" `
14+
-Path "librdkafka-${kafka_version}.tar.gz" `
15+
-Hash '5bd1c46f63265f31c6bfcedcde78703f77d28238eadf23821c2b43fc30be3e25'
16+
7z x "librdkafka-${kafka_version}.tar.gz" -o"C:\"
17+
7z x "C:\librdkafka-${kafka_version}.tar" -o"C:\librdkafka"
18+
Remove-Item "librdkafka-${kafka_version}.tar.gz"
19+
20+
# Build librdkafka
21+
# Based on this job from upstream:
22+
# https://github.com/confluentinc/librdkafka/blob/cb8c19c43011b66c4b08b25e5150455a247e1ff3/.semaphore/semaphore.yml#L265
23+
# Install vcpkg
24+
$triplet = "x64-windows"
25+
$vcpkg_dir = "C:\vcpkg"
26+
$librdkafka_dir = "C:\librdkafka\librdkafka-${kafka_version}"
27+
# We set the desired tag to the latest release tag to ensure that we are building with the latest stable version.
28+
# The desired tag should be updated periodically or when critical fixes or features are released.
29+
$desired_tag = "2024.12.16"
30+
31+
# Clone and configure vcpkg
32+
if (-Not (Test-Path -Path "$vcpkg_dir\.git")) {
33+
git clone https://github.com/Microsoft/vcpkg.git $vcpkg_dir
34+
}
35+
36+
Set-Location $vcpkg_dir
37+
git checkout $desired_tag
38+
39+
Write-Host "Bootstrapping vcpkg..."
40+
.\bootstrap-vcpkg.bat
41+
42+
# Get deps
43+
Set-Location "$librdkafka_dir"
44+
# Patch the the vcpkg manifest to to override the OpenSSL version and CURL version
45+
python C:\update_librdkafka_manifest.py vcpkg.json --set-version openssl:${Env:OPENSSL_VERSION} --set-version curl:${Env:CURL_VERSION}
46+
47+
C:\vcpkg\vcpkg integrate install
48+
C:\vcpkg\vcpkg --feature-flags=versions install --triplet $triplet
49+
# Build
50+
& .\win32\msbuild.ps1 -platform x64
51+
52+
# Copy outputs to where they can be found
53+
# This is partially inspired by
54+
# https://github.com/confluentinc/librdkafka/blob/cb8c19c43011b66c4b08b25e5150455a247e1ff3/win32/package-zip.ps1
55+
$toolset = "v142"
56+
$platform = "x64"
57+
$config = "Release"
58+
$srcdir = "win32\outdir\${toolset}\${platform}\$config"
59+
$bindir = "C:\bin"
60+
$libdir = "C:\lib"
61+
$includedir = "C:\include"
62+
63+
Copy-Item "${srcdir}\librdkafka.dll","${srcdir}\librdkafkacpp.dll",
64+
"${srcdir}\libcrypto-3-x64.dll","${srcdir}\libssl-3-x64.dll",
65+
"${srcdir}\zlib1.dll","${srcdir}\zstd.dll","${srcdir}\libcurl.dll" -Destination $bindir
66+
Copy-Item "${srcdir}\librdkafka.lib","${srcdir}\librdkafkacpp.lib" -Destination $libdir
67+
68+
New-Item -Path $includedir\librdkafka -ItemType Directory
69+
Copy-Item -Path ".\src\*" -Filter *.h -Destination $includedir\librdkafka
70+

0 commit comments

Comments
 (0)