Skip to content

Commit

Permalink
Pull from master
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthrajchaudhari-crest committed Oct 9, 2024
2 parents 4c3a574 + d1b8cc1 commit a837749
Show file tree
Hide file tree
Showing 2,069 changed files with 134,627 additions and 46,787 deletions.
15 changes: 8 additions & 7 deletions .builders/images/linux-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ RUN /opt/python/${PYTHON2_VERSION}/bin/python2.7 -m pip install --no-warn-script
&& /opt/python/${PYTHON2_VERSION}/bin/python2.7 -m virtualenv /py2

# openssl
RUN yum install -y perl-IPC-Cmd && \
RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
cpanp -i List::Util 1.66 && \
DOWNLOAD_URL="https://www.openssl.org/source/openssl-{{version}}.tar.gz" \
VERSION="3.0.13" \
SHA256="88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313" \
VERSION="3.3.2" \
SHA256="2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" \
RELATIVE_PATH="openssl-{{version}}" \
# https://docs.python.org/3/using/unix.html#custom-openssl
INSTALL_COMMAND="make install_sw" \
Expand All @@ -53,11 +54,11 @@ RUN yum install -y perl-IPC-Cmd && \
ldconfig

# Compile and install Python 3
ENV PYTHON3_VERSION=3.11.8
ENV PYTHON3_VERSION=3.12.6
RUN yum install -y libffi-devel && \
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
VERSION="${PYTHON3_VERSION}" \
SHA256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889" \
SHA256="85a4c1be906d20e5c5a69f2466b00da769c221d6a684acfd3a514dbf5bf10a66" \
RELATIVE_PATH="Python-{{version}}" \
bash install-from-source.sh \
--prefix=/opt/python/${PYTHON_VERSION} \
Expand Down Expand Up @@ -158,8 +159,8 @@ RUN \
# curl
RUN \
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
VERSION="8.7.1" \
SHA256="f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495" \
VERSION="8.9.1" \
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
RELATIVE_PATH="curl-{{version}}" \
bash install-from-source.sh \
--disable-manual \
Expand Down
45 changes: 38 additions & 7 deletions .builders/images/linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ RUN /opt/python/${PYTHON2_VERSION}/bin/python -m pip install --no-warn-script-lo
&& /opt/python/${PYTHON2_VERSION}/bin/python -m virtualenv /py2

# openssl
RUN yum install -y perl-IPC-Cmd && \
RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
cpanp -i List::Util 1.66 && \
DOWNLOAD_URL="https://www.openssl.org/source/openssl-{{version}}.tar.gz" \
VERSION="3.0.13" \
SHA256="88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313" \
VERSION="3.3.2" \
SHA256="2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" \
RELATIVE_PATH="openssl-{{version}}" \
# https://docs.python.org/3/using/unix.html#custom-openssl
INSTALL_COMMAND="make install_sw" \
Expand All @@ -51,11 +52,11 @@ RUN yum install -y perl-IPC-Cmd && \
ldconfig

# Compile and install Python 3
ENV PYTHON3_VERSION=3.11.8
ENV PYTHON3_VERSION=3.12.6
RUN yum install -y libffi-devel && \
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
VERSION="${PYTHON3_VERSION}" \
SHA256="d3019a613b9e8761d260d9ebe3bd4df63976de30464e5c0189566e1ae3f61889" \
SHA256="85a4c1be906d20e5c5a69f2466b00da769c221d6a684acfd3a514dbf5bf10a66" \
RELATIVE_PATH="Python-{{version}}" \
bash install-from-source.sh --prefix=/opt/python/${PYTHON_VERSION} --with-ensurepip=yes --enable-ipv6 --with-dbmliborder=
ENV PATH="/opt/python/${PYTHON_VERSION}/bin:${PATH}"
Expand All @@ -81,6 +82,36 @@ RUN \
RELATIVE_PATH="krb5-{{version}}/src" \
bash install-from-source.sh --without-keyutils --without-system-verto --without-libedit --disable-static

# libxml & libxslt for lxml
RUN \
DOWNLOAD_URL="https://download.gnome.org/sources/libxml2/2.12/libxml2-{{version}}.tar.xz" \
VERSION="2.12.6" \
SHA256="889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb" \
RELATIVE_PATH="libxml2-{{version}}" \
bash install-from-source.sh \
--without-iconv \
--without-python \
--without-icu \
--without-debug \
--without-mem-debug \
--without-run-debug \
--without-legacy \
--without-catalog \
--without-docbook \
--disable-static

RUN \
DOWNLOAD_URL="https://download.gnome.org/sources/libxslt/1.1/libxslt-{{version}}.tar.xz" \
VERSION="1.1.39" \
SHA256="2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0" \
RELATIVE_PATH="libxslt-{{version}}" \
bash install-from-source.sh \
--without-python \
--without-crypto \
--without-profiler \
--without-debugger \
--disable-static

# libpq and pg_config as needed by psycopg2
RUN \
DOWNLOAD_URL="https://ftp.postgresql.org/pub/source/v{{version}}/postgresql-{{version}}.tar.bz2" \
Expand Down Expand Up @@ -131,8 +162,8 @@ RUN \
# curl
RUN \
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
VERSION="8.7.1" \
SHA256="f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495" \
VERSION="8.9.1" \
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
RELATIVE_PATH="curl-{{version}}" \
bash install-from-source.sh \
--disable-manual \
Expand Down
12 changes: 4 additions & 8 deletions .builders/images/macos-x86_64/builder_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ set -euxo pipefail
"${DD_PYTHON3}" -m pip install --no-warn-script-location virtualenv
"${DD_PYTHON3}" -m virtualenv py3

"${DD_PYTHON2}" -m pip install --no-warn-script-location --upgrade pip
"${DD_PYTHON2}" -m pip install --no-warn-script-location virtualenv
"${DD_PYTHON2}" -m virtualenv py2

# Install always with our own prefix path
mkdir -p "${DD_PREFIX_PATH}"
cp "${DD_MOUNT_DIR}/build_context/install-from-source.sh" .
Expand All @@ -27,8 +23,8 @@ cp -R /opt/mqm "${DD_PREFIX_PATH}"

# openssl
DOWNLOAD_URL="https://www.openssl.org/source/openssl-{{version}}.tar.gz" \
VERSION="3.0.13" \
SHA256="88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313" \
VERSION="3.3.2" \
SHA256="2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" \
RELATIVE_PATH="openssl-{{version}}" \
CONFIGURE_SCRIPT="./config" \
install-from-source \
Expand Down Expand Up @@ -75,8 +71,8 @@ RELATIVE_PATH="libxslt-{{version}}" \

# curl
DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \
VERSION="8.7.1" \
SHA256="f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495" \
VERSION="8.9.1" \
SHA256="291124a007ee5111997825940b3876b3048f7d31e73e9caa681b80fe48b2dcd5" \
RELATIVE_PATH="curl-{{version}}" \
install-from-source \
--disable-manual \
Expand Down
12 changes: 6 additions & 6 deletions .builders/images/windows-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ RUN Get-RemoteFile `
Approve-File -Path $($Env:USERPROFILE + '\.cargo\bin\rustc.exe') -Hash $Env:RUSTC_HASH

# Install Python 3
ENV PYTHON_VERSION="3.11.7"
ENV PYTHON_VERSION="3.12.6"
RUN Get-RemoteFile `
-Uri https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe `
-Path python-$Env:PYTHON_VERSION-amd64.exe `
-Hash 'c117c6444494bbe4cc937e8a5a61899d53f7f5c5bc573c5d130304e457d54024'; `
-Hash '5914748e6580e70bedeb7c537a0832b3071de9e09a2e4e7e3d28060616045e0a'; `
Start-Process -Wait python-$Env:PYTHON_VERSION-amd64.exe -ArgumentList '/quiet', 'InstallAllUsers=1'; `
Remove-Item python-$Env:PYTHON_VERSION-amd64.exe; `
& 'C:\Program Files\Python311\python.exe' -m pip install --no-warn-script-location --upgrade pip; `
& 'C:\Program Files\Python311\python.exe' -m pip install --no-warn-script-location virtualenv; `
& 'C:\Program Files\Python311\python.exe' -m virtualenv 'C:\py3'; `
Add-ToPath -Append 'C:\Program Files\Python311'
& 'C:\Program Files\Python312\python.exe' -m pip install --no-warn-script-location --upgrade pip; `
& 'C:\Program Files\Python312\python.exe' -m pip install --no-warn-script-location virtualenv; `
& 'C:\Program Files\Python312\python.exe' -m virtualenv 'C:\py3'; `
Add-ToPath -Append 'C:\Program Files\Python312'

# Install Python 2
ENV PYTHON_VERSION="2.7.18"
Expand Down
25 changes: 21 additions & 4 deletions .builders/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ def default_python_version() -> str:
return match.group(1)


@cache
def target_python_for_major(python_major: str):
return '2.7' if python_major == '2' else default_python_version()


def is_compatible_wheel(
target_name: str,
target_python_major: str,
Expand All @@ -44,7 +49,7 @@ def is_compatible_wheel(
platform: str,
) -> bool:
if interpreter.startswith('cp'):
target_python = '2.7' if target_python_major == '2' else default_python_version()
target_python = target_python_for_major(target_python_major)
expected_tag = f'cp{target_python_major}' if abi == 'abi3' else f'cp{target_python}'.replace('.', '')
if expected_tag not in interpreter:
return False
Expand All @@ -59,8 +64,17 @@ def is_compatible_wheel(
return True


def generate_lock_file(requirements_file: Path, lock_file: Path) -> None:
target, _, python_version = lock_file.stem.rpartition('_')
def generate_lock_file(
requirements_file: Path,
lock_file_folder: Path,
target: str,
python_version: str,
) -> None:
python_target = target_python_for_major(python_version)
# The lockfiles contain the major.minor Python version
# so that the Agent can transition safely
lock_file = lock_file_folder / f'{target}_{python_target}.txt'

python_major = python_version[-1]

dependencies: dict[str, str] = {}
Expand Down Expand Up @@ -135,7 +149,10 @@ def main():
for python_version in target.iterdir():
if python_version.name.startswith('py'):
generate_lock_file(
python_version / 'frozen.txt', LOCK_FILE_DIR / f'{target.name}_{python_version.name}.txt'
python_version / 'frozen.txt',
LOCK_FILE_DIR,
target.name,
python_version.name.strip('py'),
)

if (image_digest_file := target / 'image_digest').is_file():
Expand Down
54 changes: 45 additions & 9 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ coverage:
target: 75
flags:
- apache
Appgate_SDP:
target: 75
flags:
- appgate_sdp
ArangoDB:
target: 75
flags:
Expand Down Expand Up @@ -310,6 +314,18 @@ coverage:
target: 75
flags:
- kong
KubeVirt_Handler:
target: 75
flags:
- kubevirt_handler
KubeVirt_Controller:
target: 75
flags:
- kubevirt_controller
KubeVirt_API:
target: 75
flags:
- kubevirt_api
Kube_DNS:
target: 75
flags:
Expand All @@ -322,6 +338,10 @@ coverage:
target: 75
flags:
- kube_metrics_server
Kubeflow:
target: 75
flags:
- kubeflow
Kubelet:
target: 75
flags:
Expand Down Expand Up @@ -438,10 +458,6 @@ coverage:
target: 75
flags:
- openstack_controller
Oracle_Database:
target: 75
flags:
- oracle
PDH:
target: 75
flags:
Expand Down Expand Up @@ -739,6 +755,11 @@ flags:
paths:
- apache/datadog_checks/apache
- apache/tests
appgate_sdp:
carryforward: true
paths:
- appgate_sdp/datadog_checks/appgate_sdp
- appgate_sdp/tests
arangodb:
carryforward: true
paths:
Expand Down Expand Up @@ -1134,6 +1155,11 @@ flags:
paths:
- kube_scheduler/datadog_checks/kube_scheduler
- kube_scheduler/tests
kubeflow:
carryforward: true
paths:
- kubeflow/datadog_checks/kubeflow
- kubeflow/tests
kubelet:
carryforward: true
paths:
Expand All @@ -1149,6 +1175,21 @@ flags:
paths:
- kubernetes_state/datadog_checks/kubernetes_state
- kubernetes_state/tests
kubevirt_handler:
carryforward: true
paths:
- kubevirt_handler/datadog_checks/kubevirt_handler
- kubevirt_handler/tests
kubevirt_controller:
carryforward: true
paths:
- kubevirt_controller/datadog_checks/kubevirt_controller
- kubevirt_controller/tests
kubevirt_api:
carryforward: true
paths:
- kubevirt_api/datadog_checks/kubevirt_api
- kubevirt_api/tests
kyototycoon:
carryforward: true
paths:
Expand Down Expand Up @@ -1269,11 +1310,6 @@ flags:
paths:
- openstack_controller/datadog_checks/openstack_controller
- openstack_controller/tests
oracle:
carryforward: true
paths:
- oracle/datadog_checks/oracle
- oracle/tests
pdh_check:
carryforward: true
paths:
Expand Down
20 changes: 0 additions & 20 deletions .ddev/ci/scripts/oracle/linux/55_docker_login.sh

This file was deleted.

This file was deleted.

Loading

0 comments on commit a837749

Please sign in to comment.