Skip to content

Commit 4204ba3

Browse files
postcommit java singlestoreIO_IO (#28741)
* postcommit java singlestoreIO_IO * bump singlestore operator image
1 parent 8a31ffe commit 4204ba3

2 files changed

Lines changed: 106 additions & 1 deletion

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: PostCommit Java SingleStoreIO IT
19+
20+
on:
21+
issue_comment:
22+
types: [created]
23+
schedule:
24+
- cron: '0 */23 * * *'
25+
workflow_dispatch:
26+
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
27+
permissions:
28+
actions: write
29+
pull-requests: read
30+
checks: read
31+
contents: read
32+
deployments: read
33+
id-token: none
34+
issues: read
35+
discussions: read
36+
packages: read
37+
pages: read
38+
repository-projects: read
39+
security-events: read
40+
statuses: read
41+
42+
43+
# This allows a subsequently queued workflow run to interrupt previous runs
44+
concurrency:
45+
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login}}'
46+
cancel-in-progress: true
47+
48+
env:
49+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
50+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
51+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
52+
53+
jobs:
54+
beam_PostCommit_Java_SingleStoreIO_IT:
55+
name: ${{matrix.job_name}} (${{matrix.job_phrase}})
56+
runs-on: [self-hosted, ubuntu-20.04, main]
57+
timeout-minutes: 100
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
job_name: [beam_PostCommit_Java_SingleStoreIO_IT]
62+
job_phrase: [Run Java SingleStoreIO_IT]
63+
if: |
64+
github.event_name == 'push' ||
65+
github.event_name == 'schedule' ||
66+
github.event_name == 'workflow_dispatch' ||
67+
github.event.comment.body == 'Run Java SingleStoreIO_IT'
68+
steps:
69+
- uses: actions/checkout@v3
70+
- name: Setup repository
71+
uses: ./.github/actions/setup-action
72+
with:
73+
comment_phrase: ${{ matrix.job_phrase }}
74+
github_token: ${{ secrets.GITHUB_TOKEN }}
75+
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
76+
- name: Authenticate on GCP
77+
id: auth
78+
uses: google-github-actions/auth@v1
79+
with:
80+
credentials_json: ${{ secrets.GCP_SA_KEY }}
81+
project_id: ${{ secrets.GCP_PROJECT_ID }}
82+
- name: Set k8s access
83+
uses: ./.github/actions/setup-k8s-access
84+
with:
85+
cluster_name: io-datastores
86+
k8s_namespace: ${{ matrix.job_name }}-${{ github.run_id }}
87+
- name: Install Singlestore operator
88+
run: |
89+
kubectl apply -f ${{github.workspace}}/.test-infra/kubernetes/singlestore/sdb-rbac.yaml
90+
kubectl apply -f ${{github.workspace}}/.test-infra/kubernetes/singlestore/sdb-cluster-crd.yaml
91+
kubectl apply -f ${{github.workspace}}/.test-infra/kubernetes/singlestore/sdb-operator.yaml
92+
kubectl wait --for=condition=Ready pod -l name=sdb-operator --timeout=120s
93+
- name: Install Singlestore cluster
94+
id: install_singlestore
95+
run: |
96+
kubectl apply -f ${{github.workspace}}/.test-infra/kubernetes/singlestore/sdb-cluster.yaml
97+
kubectl wait --for=jsonpath='{.status.phase}'=Running memsqlclusters.memsql.com --all --timeout=120s
98+
kubectl wait svc/svc-sdb-cluster-ddl --for=jsonpath='{.status.loadBalancer.ingress[0].ip}' --timeout=120s
99+
loadbalancer_IP=$(kubectl get svc svc-sdb-cluster-ddl -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
100+
echo lb_ip=$loadbalancer_IP >> $GITHUB_OUTPUT
101+
- name: Run Java SingleStore IO IT
102+
uses: ./.github/actions/gradle-command-self-hosted-action
103+
with:
104+
gradle-command: :sdks:java:io:singlestore:integrationTest --tests org.apache.beam.sdk.io.singlestore.SingleStoreIODefaultMapperIT
105+
arguments: --info -DintegrationTestRunner=dataflow -DintegrationTestPipelineOptions='["--tempRoot=gs://temp-storage-for-perf-tests","--project=apache-beam-testing","--runner=DataflowRunner","--singleStoreUsername=admin","--singleStorePassword=secretpass","--singleStorePort=3306","--numberOfRecords=1000", "--singleStoreServerName=${{ steps.install_singlestore.outputs.lb_ip }}"]'

.test-infra/kubernetes/singlestore/sdb-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
serviceAccountName: sdb-operator
3333
containers:
3434
- name: sdb-operator
35-
image: singlestore/operator:3.0.32-db8f5aff
35+
image: singlestore/operator:3.0.98-156a0090
3636
imagePullPolicy: Always
3737
args: [
3838
# Cause the operator to merge rather than replace annotations on services

0 commit comments

Comments
 (0)