forked from opendatahub-io/data-science-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
289 lines (264 loc) · 11.6 KB
/
Copy pathapi-server-tests.yml
File metadata and controls
289 lines (264 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# This workflow runs tests to verify all the API Server REST Endpoints
name: API Server Tests
env:
API_TESTS_DIR: "./backend/test/v2/api"
TESTS_LABEL: "ApiServerTests"
NUMBER_OF_PARALLEL_NODES: 15
CLUSTER_NAME: "kfp"
NAMESPACE: "kubeflow"
USER_NAMESPACE: "kubeflow-user-example-com"
PYTHON_VERSION: "3.9"
CA_CERT_PATH: ""
on:
push:
branches:
- master
- main
- stable
- 'rhoai-*'
workflow_dispatch:
inputs:
test_label:
description: "Test label that you want to filter on and run"
default: 'ApiServerTests'
required: true
type: string
number_of_parallel_tests:
description: "Number of ginkgo nodes that you want run in parallel, it essentially is equivalent to number of parallel tests with some caveats"
default: 10
required: true
type: number
namespace:
description: "Namespace where you want to create your pipelines in"
default: "kubeflow"
required: true
type: string
pull_request:
paths:
- '.github/workflows/api-server-tests.yml'
- '.github/workflows/image-builds.yml'
- '.github/actions/create-cluster/**'
- '.github/actions/deploy/**'
- '.github/actions/test-and-report/**'
- '.github/actions/junit-summary/**'
- '.github/resources/**'
- 'backend/api/v2beta1/**'
- 'backend/src/**'
- 'backend/metadata_writer/**'
- 'backend/test/v2/api/**'
- 'manifests/kustomize/**'
- 'test_data/sdk_compiled_pipelines/**'
- '!**/*.md'
- '!**/OWNERS'
concurrency:
group: api-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
gatekeeper:
uses: ./.github/workflows/wait-for-gatekeeper.yml
build:
needs: gatekeeper
uses: ./.github/workflows/image-builds.yml
api-test-standalone:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
k8s_version: [ "v1.34.0" ]
cache_enabled: [ "true", "false" ]
pipeline_store: [ "database" ]
pod_to_pod_tls_enabled: [ "true" ]
include:
- k8s_version: "v1.29.2"
cache_enabled: "true"
pod_to_pod_tls_enabled: "true"
- k8s_version: "v1.29.2"
cache_enabled: "true"
pod_to_pod_tls_enabled: "false"
- k8s_version: "v1.31.0"
cache_enabled: "true"
pod_to_pod_tls_enabled: "false"
- k8s_version: "v1.34.0"
proxy: "true"
pod_to_pod_tls_enabled: "false"
fail-fast: false # So that failure in 1 type of parameterized job does not cause other jobs to terminate prematurely
name: KFP API Server tests Standalone - K8sVersion=${{ matrix.k8s_version }} argo_version=${{ matrix.argo_version }} cacheEnabled=${{ matrix.cache_enabled }} proxyEnabled=${{ matrix.proxy }} pod_to_pod_tls_enabled=${{ matrix.pod_to_pod_tls_enabled }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Create cluster
uses: ./.github/actions/create-cluster
id: create-cluster
with:
k8s_version: ${{ matrix.k8s_version }}
cluster_name: ${{ env.CLUSTER_NAME }}
- name: Deploy KFP
uses: ./.github/actions/deploy
id: deploy
if: ${{ steps.create-cluster.outcome == 'success' }}
with:
pipeline_store: ${{ matrix.pipeline_store }}
cache_enabled: ${{ matrix.cache_enabled }}
proxy: ${{ matrix.proxy }}
argo_version: ${{ matrix.argo_version }}
pod_to_pod_tls_enabled: ${{ matrix.pod_to_pod_tls_enabled }}
image_path: ${{ needs.build.outputs.IMAGE_PATH }}
image_tag: ${{ needs.build.outputs.IMAGE_TAG }}
image_registry: ${{ needs.build.outputs.IMAGE_REGISTRY }}
skip_operator_deployment: ${{ github.repository_owner != 'opendatahub-io' }}
- name: Configure Cluster CA Cert for TLS-Enabled Tests
shell: bash
if: ${{ matrix.pod_to_pod_tls_enabled == 'true'}}
run: |
kubectl get configmap openshift-service-ca.crt -n kubeflow -o jsonpath='{.data.service-ca\.crt}' > "${{ github.workspace }}/ca.crt"
echo "CA_CERT_PATH=${{ github.workspace }}/ca.crt" >> "$GITHUB_ENV"
- name: Configure Input Variables
shell: bash
id: configure
if: ${{ steps.deploy.outcome == 'success' }}
run: |
NUMBER_OF_NODES=${{ env.NUMBER_OF_PARALLEL_NODES }}
TEST_LABEL=${{ env.TESTS_LABEL }}
NAMESPACE=${{ env.NAMESPACE }}
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
NUMBER_OF_NODES=${{ inputs.number_of_parallel_tests }}
TEST_LABEL=${{ inputs.test_label }}
NAMESPACE=${{ inputs.namespace }}
fi
PROXY=${{ matrix.proxy }}
if [ -z "${PROXY:-}" ]; then
PROXY=false
fi
{
echo "NUMBER_OF_NODES=$NUMBER_OF_NODES"
echo "TEST_LABEL=$TEST_LABEL"
echo "NAMESPACE=$NAMESPACE"
} >> "$GITHUB_OUTPUT"
- name: Run Tests
uses: ./.github/actions/test-and-report
if: ${{ steps.configure.outcome == 'success' }}
id: test-run
with:
pipeline_store: ${{ matrix.pipeline_store }}
cache_enabled: ${{ matrix.cache_enabled }}
proxy: ${{ matrix.proxy }}
test_directory: ${{ env.API_TESTS_DIR }}
test_label: ${{ steps.configure.outputs.TEST_LABEL }}
num_parallel_nodes: ${{ steps.configure.outputs.NUMBER_OF_NODES }}
default_namespace: ${{ steps.configure.outputs.NAMESPACE }}
python_version: ${{ env.PYTHON_VERSION }}
report_name: "Standalone_k8sVersion=${{ matrix.k8s_version }}_pipelineStore=${{ matrix.pipeline_store }}_cacheEnabled=${{ matrix.cache_enabled }}_proxyEnabled=${{ matrix.proxy }}_podToPodTlsEnabled=${{ matrix.pod_to_pod_tls_enabled }}"
tls_enabled: ${{ matrix.pod_to_pod_tls_enabled }}
ca_cert_path: ${{ env.CA_CERT_PATH }}
# Deployment metadata from deploy action
deployment_name: ${{ steps.deploy.outputs.deployment_name }}
deployment_service_account_name: ${{ steps.deploy.outputs.service_account_name }}
deployment_mode: ${{ steps.deploy.outputs.deployment_mode }}
api-test-k8s-native:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
k8s_version: [ "v1.34.0", "v1.29.2" ]
cache_enabled: [ "true" ]
uploadPipelinesWithKubernetesClient: [ "true", "false" ]
pipeline_store: [ "kubernetes" ]
pod_to_pod_tls_enabled: [ "true" ]
include:
- k8s_version: "v1.34.0"
cache_enabled: "true"
pipeline_store: "kubernetes"
pod_to_pod_tls_enabled: "false"
uploadPipelinesWithKubernetesClient: "false"
fail-fast: false # So that failure in 1 type of parameterized job does not cause other jobs to terminate prematurely
name: KFP API Server tests K8s Native API - K8sVersion=${{ matrix.k8s_version }} podToPodTlsEnabled=${{ matrix.pod_to_pod_tls_enabled }} cacheEnabled=${{ matrix.cache_enabled }} argoVersion=${{ matrix.argo_version }} uploadPipelinesWithKubernetesClient=${{ matrix.uploadPipelinesWithKubernetesClient }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Create cluster
uses: ./.github/actions/create-cluster
id: create-cluster
with:
k8s_version: ${{ matrix.k8s_version }}
cluster_name: ${{ env.CLUSTER_NAME }}
- name: Deploy KFP
uses: ./.github/actions/deploy
id: deploy
if: ${{ steps.create-cluster.outcome == 'success' }}
with:
pipeline_store: ${{ matrix.pipeline_store }}
cache_enabled: ${{ matrix.cache_enabled }}
argo_version: ${{ matrix.argo_version }}
image_path: ${{ needs.build.outputs.IMAGE_PATH }}
image_tag: ${{ needs.build.outputs.IMAGE_TAG }}
image_registry: ${{ needs.build.outputs.IMAGE_REGISTRY }}
pod_to_pod_tls_enabled: ${{ matrix.pod_to_pod_tls_enabled }}
skip_operator_deployment: ${{ github.repository_owner != 'opendatahub-io' }}
- name: Run Tests
uses: ./.github/actions/test-and-report
if: ${{ steps.deploy.outcome == 'success' }}
id: test-run
with:
pipeline_store: ${{ matrix.pipeline_store }}
cache_enabled: ${{ matrix.cache_enabled }}
upload_pipelines_with_kubernetes_client: ${{ matrix.uploadPipelinesWithKubernetesClient }}
test_directory: ${{ env.API_TESTS_DIR }}
test_label: ${{ env.TESTS_LABEL }}
num_parallel_nodes: ${{ env.NUMBER_OF_PARALLEL_NODES }}
default_namespace: ${{ env.NAMESPACE }}
python_version: ${{ env.PYTHON_VERSION }}
tls_enabled: ${{ matrix.pod_to_pod_tls_enabled }}
report_name: "K8Native_k8sVersion=${{ matrix.k8s_version }}_cacheEnabled=${{ matrix.cache_enabled }}_uploadPipelinesWithKubernetesClient=${{ matrix.uploadPipelinesWithKubernetesClient }}_pipelineStore=${{ matrix.pipeline_store}}_podToPodTlsEnabled=${{ matrix.pod_to_pod_tls_enabled }}"
# Deployment metadata from deploy action
deployment_name: ${{ steps.deploy.outputs.deployment_name }}
deployment_service_account_name: ${{ steps.deploy.outputs.service_account_name }}
deployment_mode: ${{ steps.deploy.outputs.deployment_mode }}
api-test-multi-user:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
k8s_version: [ "v1.34.0"]
cache_enabled: [ "true", "false" ]
multi_user: [ "true" ]
fail-fast: false # So that failure in 1 type of parameterized job does not cause other jobs to terminate prematurely
name: KFP API Server Multi User Tests - K8sVersion=${{ matrix.k8s_version }} cacheEnabled=${{ matrix.cache_enabled }} multiUser=${{ matrix.multi_user }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Create cluster
uses: ./.github/actions/create-cluster
id: create-cluster
with:
k8s_version: ${{ matrix.k8s_version }}
cluster_name: ${{ env.CLUSTER_NAME }}
- name: Deploy KFP
uses: ./.github/actions/deploy
id: deploy
if: ${{ steps.create-cluster.outcome == 'success' }}
with:
cache_enabled: ${{ matrix.cache_enabled }}
multi_user: ${{ matrix.multi_user }}
image_path: ${{ needs.build.outputs.IMAGE_PATH }}
image_tag: ${{ needs.build.outputs.IMAGE_TAG }}
image_registry: ${{ needs.build.outputs.IMAGE_REGISTRY }}
- name: Run Tests
uses: ./.github/actions/test-and-report
id: test-run
if: ${{ steps.deploy.outcome == 'success' }}
env:
LOCAL_API_SERVER: "true"
with:
cache_enabled: ${{ matrix.cache_enabled }}
test_directory: ${{ env.API_TESTS_DIR }}
test_label: ${{ env.TESTS_LABEL }}
num_parallel_nodes: ${{ env.NUMBER_OF_PARALLEL_NODES }}
default_namespace: ${{ env.NAMESPACE }}
python_version: ${{ env.PYTHON_VERSION }}
user_namespace: ${{ env.USER_NAMESPACE }}
multi_user: ${{ matrix.multi_user }}
report_name: "MultiUser_k8sVersion=${{ matrix.k8s_version }}_cacheEnabled=${{ matrix.cache_enabled }}_multiUser=${{ matrix.multi_user }}"
# Deployment metadata from deploy action
deployment_name: ${{ steps.deploy.outputs.deployment_name }}
deployment_service_account_name: ${{ steps.deploy.outputs.service_account_name }}
deployment_mode: ${{ steps.deploy.outputs.deployment_mode }}