diff --git a/config/jobs/kubernetes/kops/build_jobs.py b/config/jobs/kubernetes/kops/build_jobs.py index c6dce3a78614..55c83d6d99b4 100644 --- a/config/jobs/kubernetes/kops/build_jobs.py +++ b/config/jobs/kubernetes/kops/build_jobs.py @@ -118,6 +118,10 @@ def build_test(cloud='aws', if instance_groups_overrides is None: instance_groups_overrides = [] + kops_image = None + kops_ssh_user = None + kops_ssh_key_path = None + if cloud == 'aws': kops_image = aws_distro_images[distro] kops_ssh_user = aws_distros_ssh_user[distro] @@ -326,6 +330,10 @@ def presubmit_test(branch='master', alert_num_failures=None, instance_groups_overrides=None): # pylint: disable=too-many-statements,too-many-branches,too-many-arguments + kops_image = None + kops_ssh_user = None + kops_ssh_key_path = None + if cloud == 'aws': if distro == "channels": kops_image = None diff --git a/config/testgrids/generated-test-config.yaml b/config/testgrids/generated-test-config.yaml index 45e431693064..9e51e11f3148 100644 --- a/config/testgrids/generated-test-config.yaml +++ b/config/testgrids/generated-test-config.yaml @@ -15,13 +15,6 @@ test_groups: - configuration_value: master_os_image - configuration_value: Commit - configuration_value: infra-commit -- name: ci-kubernetes-e2e-gce-cos-k8sbeta-ingress - gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sbeta-ingress - column_header: - - configuration_value: node_os_image - - configuration_value: master_os_image - - configuration_value: Commit - - configuration_value: infra-commit - name: ci-kubernetes-e2e-gce-cos-k8sbeta-reboot gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sbeta-reboot column_header: @@ -57,13 +50,6 @@ test_groups: - configuration_value: master_os_image - configuration_value: Commit - configuration_value: infra-commit -- name: ci-kubernetes-e2e-gce-cos-k8sstable1-ingress - gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable1-ingress - column_header: - - configuration_value: node_os_image - - configuration_value: master_os_image - - configuration_value: Commit - - configuration_value: infra-commit - name: ci-kubernetes-e2e-gce-cos-k8sstable1-reboot gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable1-reboot column_header: @@ -99,13 +85,6 @@ test_groups: - configuration_value: master_os_image - configuration_value: Commit - configuration_value: infra-commit -- name: ci-kubernetes-e2e-gce-cos-k8sstable2-ingress - gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable2-ingress - column_header: - - configuration_value: node_os_image - - configuration_value: master_os_image - - configuration_value: Commit - - configuration_value: infra-commit - name: ci-kubernetes-e2e-gce-cos-k8sstable2-reboot gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable2-reboot column_header: @@ -141,13 +120,6 @@ test_groups: - configuration_value: master_os_image - configuration_value: Commit - configuration_value: infra-commit -- name: ci-kubernetes-e2e-gce-cos-k8sstable3-ingress - gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable3-ingress - column_header: - - configuration_value: node_os_image - - configuration_value: master_os_image - - configuration_value: Commit - - configuration_value: infra-commit - name: ci-kubernetes-e2e-gce-cos-k8sstable3-reboot gcs_prefix: kubernetes-ci-logs/logs/ci-kubernetes-e2e-gce-cos-k8sstable3-reboot column_header: diff --git a/config/testgrids/kubernetes/sig-network/config.yaml b/config/testgrids/kubernetes/sig-network/config.yaml index 6b846eb66116..8696fc28a050 100644 --- a/config/testgrids/kubernetes/sig-network/config.yaml +++ b/config/testgrids/kubernetes/sig-network/config.yaml @@ -24,24 +24,6 @@ dashboards: - name: sig-network-external-dns - name: sig-network-gce dashboard_tab: - - name: gce-cos-1.11-ingress - test_group_name: ci-kubernetes-e2e-gce-cos-k8sstable3-ingress - alert_options: - alert_mail_to_addresses: kubernetes-sig-network-test-failures@googlegroups.com - - name: gce-cos-1.12-ingress - test_group_name: ci-kubernetes-e2e-gce-cos-k8sstable2-ingress - alert_options: - alert_mail_to_addresses: kubernetes-sig-network-test-failures@googlegroups.com - - name: gce-cos-1.13-ingress - test_group_name: ci-kubernetes-e2e-gce-cos-k8sstable1-ingress - alert_options: - alert_mail_to_addresses: kubernetes-sig-network-test-failures@googlegroups.com - # TODO(1.30): Uncomment this when adding jobs for release-1.30 branch. - # TODO(1.29): comment this out when we move 1.29 to stable1 - - name: gce-cos-1.14-ingress - test_group_name: ci-kubernetes-e2e-gce-cos-k8sbeta-ingress - alert_options: - alert_mail_to_addresses: kubernetes-sig-network-test-failures@googlegroups.com - name: gci-gce-ipvs test_group_name: ci-kubernetes-e2e-gci-gce-ipvs description: network gci-gce e2e tests in ipvs proxier mode diff --git a/hack/make-rules/py-test/activate-python_venv.sh b/hack/make-rules/py-test/activate-python_venv.sh index cdf3886b50b7..b08670856009 100755 --- a/hack/make-rules/py-test/activate-python_venv.sh +++ b/hack/make-rules/py-test/activate-python_venv.sh @@ -24,7 +24,12 @@ cd "${REPO_ROOT}" # Trick from https://pythonspeed.com/articles/activate-virtualenv-dockerfile/ export VIRTUAL_ENV="${REPO_ROOT}/.python_virtual_env" -if [[ ! -f "${VIRTUAL_ENV}/bin/activate" ]]; then +# Check if the virtual environment exists and matches the current python version +CURRENT_PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') +VENV_PYTHON_VERSION_DIR="${VIRTUAL_ENV}/lib/python${CURRENT_PYTHON_VERSION}" + +if [[ ! -d "${VENV_PYTHON_VERSION_DIR}" || ! -f "${VIRTUAL_ENV}/bin/activate" ]]; then + rm -rf "${VIRTUAL_ENV}" python3 -m venv "${VIRTUAL_ENV}" fi diff --git a/hack/run-in-python-container.sh b/hack/run-in-python-container.sh index c77c70b61fc4..1dc00e4ded51 100755 --- a/hack/run-in-python-container.sh +++ b/hack/run-in-python-container.sh @@ -24,10 +24,10 @@ cd "${REPO_ROOT}" # Use ARM version of Python image when on ARM architecture if [[ "$(uname -m)" == "arm64" ]]; then - PY_IMAGE='python:3.9-slim-buster' + PY_IMAGE='python:3.14-slim-trixie' PLATFORM_FLAG="--platform=linux/arm64" else - PY_IMAGE='python:3.9-slim-buster' + PY_IMAGE='python:3.14-slim-trixie' PLATFORM_FLAG="" fi diff --git a/kettle/make_json.py b/kettle/make_json.py index d46b80759407..8ec90733da9e 100755 --- a/kettle/make_json.py +++ b/kettle/make_json.py @@ -28,7 +28,7 @@ try: import defusedxml.ElementTree as ET except ImportError: - import xml.etree.cElementTree as ET + import xml.etree.ElementTree as ET import model diff --git a/kettle/make_json_test.py b/kettle/make_json_test.py index f6c088bbe977..94f63036fe58 100755 --- a/kettle/make_json_test.py +++ b/kettle/make_json_test.py @@ -588,7 +588,7 @@ def expect(args, needles, negneedles, expected_ret=None): for needle in negneedles: # Only match negative needles in the middle of a word, to avoid # failures on timestamps that happen to contain a short number. - self.assertNotRegexpMatches(result, r'\b%s\b' % needle) # pylint: disable=deprecated-method + self.assertNotRegex(result, r'\b%s\b' % needle) # pylint: disable=deprecated-method add_build('some-job/123', last_month, last_month + 10, 'SUCCESS', junits) add_build('some-job/456', now - 10, now, 'FAILURE', junits) diff --git a/metrics/bigquery.py b/metrics/bigquery.py index 5a1026415e9f..f515513872ad 100755 --- a/metrics/bigquery.py +++ b/metrics/bigquery.py @@ -19,7 +19,7 @@ import argparse import glob import os -import pipes +import shlex import re import subprocess import sys @@ -34,7 +34,7 @@ def check(cmd, **kwargs): """Logs and runs the command, raising on errors.""" - print('Run:', ' '.join(pipes.quote(c) for c in cmd), end=' ', file=sys.stderr) + print('Run:', ' '.join(shlex.quote(c) for c in cmd), end=' ', file=sys.stderr) if hasattr(kwargs.get('stdout'), 'name'): print(' > %s' % kwargs['stdout'].name, file=sys.stderr) else: diff --git a/pylintrc b/pylintrc index eb217bc90296..7dab4b3208fa 100644 --- a/pylintrc +++ b/pylintrc @@ -1,5 +1,5 @@ [MESSAGES CONTROL] -disable=fixme,locally-disabled,locally-enabled,relative-import,too-few-public-methods,missing-docstring,ungrouped-imports,too-many-lines,too-many-locals,invalid-name,superfluous-parens +disable=fixme,locally-disabled,locally-enabled,relative-import,too-few-public-methods,missing-docstring,ungrouped-imports,too-many-lines,too-many-locals,invalid-name,superfluous-parens,consider-using-f-string,unspecified-encoding,consider-using-with,missing-timeout,consider-using-from-import,too-many-positional-arguments,unnecessary-lambda-assignment,use-dict-literal,broad-exception-raised,consider-using-enumerate,consider-using-in,inconsistent-return-statements,no-else-raise,f-string-without-interpolation,format-string-without-interpolation,consider-iterating-dictionary,useless-option-value,consider-using-max-builtin [REPORTS] reports=no diff --git a/releng/generate_tests.py b/releng/generate_tests.py index e8518c611ce5..04c0f6a67a49 100755 --- a/releng/generate_tests.py +++ b/releng/generate_tests.py @@ -415,7 +415,8 @@ def main(yaml_config_path, output_dir, testgrid_output_path): if __name__ == '__main__': PARSER = argparse.ArgumentParser( description='Create test definitions from the given yaml config') - PARSER.add_argument('--yaml-config-path', help='Path to config.yaml') + PARSER.add_argument('--yaml-config-path', help='Path to config.yaml', + default='releng/test_config.yaml') PARSER.add_argument( '--output-dir', help='Prowjob config output dir', diff --git a/releng/test_config.yaml b/releng/test_config.yaml index 427162b42e12..aa3aa9d64263 100644 --- a/releng/test_config.yaml +++ b/releng/test_config.yaml @@ -45,10 +45,6 @@ jobs: interval: 1h sigOwners: [sig-cloud-provider-gcp] releaseBlocking: true - ci-kubernetes-e2e-gce-cos-k8sbeta-ingress: - interval: 1h - sigOwners: [sig-cloud-provider-gcp] - releaseBlocking: true ci-kubernetes-e2e-gce-cos-k8sbeta-default: interval: 1h sigOwners: [sig-cloud-provider-gcp] @@ -77,10 +73,6 @@ jobs: interval: 2h sigOwners: [sig-cloud-provider-gcp] releaseBlocking: true - ci-kubernetes-e2e-gce-cos-k8sstable1-ingress: - interval: 2h - sigOwners: [sig-cloud-provider-gcp] - releaseBlocking: true ci-kubernetes-e2e-gce-cos-k8sstable1-default: interval: 2h sigOwners: [sig-cloud-provider-gcp] @@ -109,10 +101,6 @@ jobs: interval: 6h sigOwners: [sig-cloud-provider-gcp] releaseBlocking: true - ci-kubernetes-e2e-gce-cos-k8sstable2-ingress: - interval: 6h - sigOwners: [sig-cloud-provider-gcp] - releaseBlocking: true ci-kubernetes-e2e-gce-cos-k8sstable2-default: interval: 6h sigOwners: [sig-cloud-provider-gcp] @@ -141,10 +129,6 @@ jobs: interval: 24h sigOwners: [sig-cloud-provider-gcp] releaseBlocking: true - ci-kubernetes-e2e-gce-cos-k8sstable3-ingress: - interval: 24h - sigOwners: [sig-cloud-provider-gcp] - releaseBlocking: true ci-kubernetes-e2e-gce-cos-k8sstable3-default: interval: 24h sigOwners: [sig-cloud-provider-gcp] @@ -345,11 +329,6 @@ testSuites: - --test_args=--ginkgo.focus=\[Flaky\] --ginkgo.skip=\[Driver:.gcepd\]|\[Feature:.+\] --minStartupPods=8 cluster: k8s-infra-prow-build - ingress: - args: - - --timeout=150m - - --test_args=--ginkgo.focus=\[Feature:Ingress\] --minStartupPods=8 - cluster: k8s-infra-prow-build reboot: args: - --timeout=180m diff --git a/requirements3.txt b/requirements3.txt index 6b257b702ad4..3bf81bfec059 100644 --- a/requirements3.txt +++ b/requirements3.txt @@ -1,10 +1,10 @@ -astroid==2.3.3 +astroid==3.3.5 backports.functools_lru_cache==1.6.1 configparser==4.0.2 chardet==4.0.0 -isort==4.3.21 +isort==5.13.2 Jinja2==3.1.5 -pylint==2.4.4 +pylint==3.3.1 parameterized==0.7.4 PyYAML==5.3 requests==2.28.1 @@ -12,3 +12,9 @@ ruamel.yaml==0.16.5 setuptools==44.0.0 sh==1.12.14 singledispatch==3.4.0.3 +mccabe==0.7.0 +platformdirs==4.3.6 +dill==0.3.9 +tomlkit==0.13.2 +typing-extensions==4.12.2 +wrapt==1.17.0