Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7a40034
feat: Implement Kubernetes job client and service
javanlacerda Dec 17, 2025
ea8463e
test: Add end-to-end test for Kubernetes service
javanlacerda Dec 17, 2025
82895b3
test: Add unit tests for KubernetesJobClient
javanlacerda Dec 17, 2025
97362a0
fix: Pin Kubernetes version to latest stable
javanlacerda Dec 17, 2025
28c2fe7
ci: Add GitHub Action for Kubernetes e2e tests
javanlacerda Dec 17, 2025
5151a86
refactor: Move Kubernetes service to new internal directory
javanlacerda Dec 17, 2025
5639dad
feat: Add Bazel build files for Kubernetes internal package
javanlacerda Dec 17, 2025
914e282
fix(ci): Correct kind installation path in e2e test script
javanlacerda Dec 17, 2025
2874646
use butler to run the test
javanlacerda Dec 17, 2025
67f74c5
fix(ci): Force pipenv to use Python 3.11 in e2e test script
javanlacerda Dec 17, 2025
096d261
refactor: Consolidate Kubernetes job creation logic
javanlacerda Dec 17, 2025
5148971
move yaml to spec
javanlacerda Dec 17, 2025
18f656c
fix(ci): Correct kind installation and fix e2e test
javanlacerda Dec 17, 2025
4b491d9
fix(ci): Re-add pipenv installation to e2e test script
javanlacerda Dec 17, 2025
de68915
fix lint
javanlacerda Dec 17, 2025
bf44e82
fix(e2e): Improve kind binary discovery in test
javanlacerda Dec 17, 2025
eef0e95
add step to install kind for all tests
javanlacerda Dec 17, 2025
d93eb86
fix(ci): Add kind installation to 'Run basic tests' workflow
javanlacerda Dec 17, 2025
fbdb8c0
fix(ci): Remove duplicate python-version config in kubernetes-e2e-tes…
javanlacerda Dec 18, 2025
3cec4c8
fix
javanlacerda Dec 18, 2025
3a5ba7f
refactor: Merge GCP Batch client logic into service
javanlacerda Dec 18, 2025
0717d13
fix
javanlacerda Dec 18, 2025
0219e3b
Refactor: Remove batch.py and introduce RemoteTaskGate
javanlacerda Dec 18, 2025
014dd98
Refactor RemoteTask and fix Kubernetes E2E test
javanlacerda Dec 20, 2025
18f3ef4
Fix lint errors, formatting, and update tests for API changes.
javanlacerda Dec 20, 2025
23cf5a4
Update run_remote_task.py and run_bot.py to use new RemoteTask and Gc…
javanlacerda Dec 20, 2025
75eacca
Add missing license headers to __init__.py files
javanlacerda Dec 20, 2025
118ac71
Skip k8s e2e tests by default, enable only in CI
javanlacerda Dec 20, 2025
98dc13e
Refactor KubernetesService to use KubernetesJobConfig and update tests
javanlacerda Dec 22, 2025
4396e5d
Update tests to include is_kata argument
javanlacerda Dec 22, 2025
92f6e16
Update tests to use is_kata=True
javanlacerda Dec 22, 2025
69a7f23
Revert is_kata to False in e2e tests
javanlacerda Dec 22, 2025
f06cfea
Implement task routing between GCP Batch and Kubernetes
javanlacerda Dec 22, 2025
8e4c171
Update utask-main-scheduler to use RemoteTaskGate
javanlacerda Dec 22, 2025
e172050
Update Kubernetes service pod spec and fix batch service test
javanlacerda Dec 23, 2025
69ebef5
Update Kubernetes service pod spec and fix batch service test
javanlacerda Dec 23, 2025
6ca6ca5
Update Kubernetes service pod spec and fix batch service test
javanlacerda Dec 23, 2025
00a3eb0
Update Kubernetes service pod spec and fix batch service test
javanlacerda Dec 23, 2025
7d5a67f
fix lint
javanlacerda Dec 23, 2025
08fee87
Update Kubernetes service pod spec and fix batch service test
javanlacerda Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/kubernetes-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Run Kubernetes e2e tests
on: [pull_request]

permissions: read-all

jobs:
build:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v3
- run: | # Needed for git diff to work.
git fetch origin master --depth 1
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master

- name: Setup python environment
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5
with:
python-version: 3.11

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'

- name: Run Kubernetes e2e tests
run: ./local/tests/kubernetes_e2e_test.bash
13 changes: 13 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ future = "==0.17.1"
protobuf = "==4.23.4"
psutil = "==5.9.4"
google-cloud-ndb = "==2.3.4"
kubernetes = "==34.1.0"
google-api-python-client = "==2.93.0"
aiohttp = "==3.10.5"
google-cloud-storage = "==2.10.0"
google-cloud-secret-manager = "==2.17.0"
google-cloud-logging = "==3.6.0"
google-cloud-monitoring = "==2.15.1"
google-cloud-datastore = "==2.16.1"
oauth2client = "==4.1.3"
requests = "==2.21.0"
PyYAML = "==6.0"
httplib2 = "==0.19.0"
google-auth-oauthlib = "==0.4.1"

[dev-packages]
Fabric = "==1.14.1"
Expand Down
2,001 changes: 1,457 additions & 544 deletions Pipfile.lock

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions ...clusterfuzz/_internal/batch/kubernetes.py → local/tests/kubernetes_e2e_test.bash
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash -ex
#
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -11,17 +13,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Kubernetes batch client."""
from clusterfuzz._internal.remote_task import RemoteTaskInterface

# This script is for running the Kubernetes end-to-end test in CI.

pip install pipenv

# Install dependencies.
pipenv --python 3.11
pipenv install

class KubernetesJobClient(RemoteTaskInterface):
"""A remote task execution client for Kubernetes.

This class is a placeholder for a future implementation of a remote task
execution client that uses Kubernetes. It is not yet implemented.
"""
./local/install_deps.bash

def create_job(self, spec, input_urls):
"""Creates a Kubernetes job."""
raise NotImplementedError('Kubernetes batch client is not implemented yet.')
# Run the test.
export K8S_E2E=1
pipenv run python butler.py py_unittest -t core -p k8s_service_e2e_test.py
7 changes: 7 additions & 0 deletions out.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Running in dry-run mode, no datastore writes are committed. For permanent modifications, re-run with --non-dry-run.
Attempting to combine batch tasks.
Combining 2901 batch tasks.
K8s result: ['libfuzzer-chrome-asan-debug-7ca9c46f']

Please remember to run the migration individually on all projects.

1 change: 1 addition & 0 deletions src/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ google-crc32c = "==1.5.0"
grpcio = "==1.62.2"
httplib2 = "==0.19.0"
jira = "==2.0.0"
kubernetes = "==34.1.0"
mozprocess = "==1.3.1"
oauth2client = "==4.1.3"
psutil = "==5.9.4"
Expand Down
50 changes: 0 additions & 50 deletions src/clusterfuzz/_internal/batch/data_structures.py

This file was deleted.

200 changes: 0 additions & 200 deletions src/clusterfuzz/_internal/batch/gcp.py

This file was deleted.

Loading
Loading