Skip to content

Commit 6cf9be1

Browse files
committed
add posting artifact
Signed-off-by: kaikaila <[email protected]>
1 parent e39ad65 commit 6cf9be1

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

.github/workflows/api-server-test-Postgres.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- master
7-
- feature/replace-str-with-largetext-WIP # temporarily for Github Actions on for repo
7+
- feature/postgres-integration # temporarily for Github Actions on for repo
88
pull_request:
99
paths:
1010
- "backend/**"
@@ -117,6 +117,12 @@ jobs:
117117
kubectl -n "$NAMESPACE" port-forward svc/ml-pipeline 8888:8888 &
118118
sleep 20
119119
echo "✅ Port-forwarding for ml-pipeline is active."
120+
- name: Port-forward ML Metadata service
121+
run: |
122+
# V2 integration tests (cache_test.go) need to connect to MLMD to verify execution states
123+
kubectl -n "$NAMESPACE" port-forward svc/metadata-grpc-service 8080:8080 &
124+
sleep 5
125+
echo "✅ Port-forwarding for metadata-grpc-service is active."
120126
# Exclude upgrade tests for the following reasons:
121127
# 1. Responsibility: Upgrade tests are handled by the dedicated `upgrade-test.yml` workflow.
122128
# 2. Incompatibility: This workflow runs tests against a single, clean deployment. It cannot
@@ -146,6 +152,21 @@ jobs:
146152
# Execute the test command with arguments
147153
$TEST_CMD -args $TEST_ARGS
148154
155+
- name: Collect pod logs
156+
if: always()
157+
run: |
158+
mkdir -p /tmp/kfp-logs
159+
echo "Collecting logs from all pods in $NAMESPACE namespace..."
160+
for pod in $(kubectl get pods -n "$NAMESPACE" -o jsonpath='{.items[*].metadata.name}'); do
161+
echo "Collecting logs for pod: $pod"
162+
kubectl logs -n "$NAMESPACE" "$pod" --all-containers=true > "/tmp/kfp-logs/${pod}.log" 2>&1 || true
163+
done
164+
echo "Collecting logs from all pods in $POSTGRES_NAMESPACE namespace..."
165+
for pod in $(kubectl get pods -n "$POSTGRES_NAMESPACE" -o jsonpath='{.items[*].metadata.name}'); do
166+
echo "Collecting logs for pod: $pod"
167+
kubectl logs -n "$POSTGRES_NAMESPACE" "$pod" --all-containers=true > "/tmp/kfp-logs/${pod}.log" 2>&1 || true
168+
done
169+
149170
- name: Cleanup
150171
if: always()
151172
run: |
@@ -157,3 +178,10 @@ jobs:
157178
kubectl -n "$POSTGRES_NAMESPACE" get pods -o wide || true
158179
echo "==== Postgres Events ($POSTGRES_NAMESPACE) ===="
159180
kubectl -n "$POSTGRES_NAMESPACE" get events --sort-by=.lastTimestamp | tail -n 100 || true
181+
182+
- name: Upload test artifacts
183+
if: always()
184+
uses: actions/upload-artifact@v4
185+
with:
186+
name: api-server-postgres-test-artifacts-cache-${{ matrix.cache_enabled }}
187+
path: /tmp/kfp-logs/*

.github/workflows/integration-tests-v1-postgres.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- master
7-
- feature/replace-str-with-largetext-WIP # temporarily for Github Actions on for repo
7+
- feature/postgres-integration # temporarily for Github Actions on for repo
88
pull_request:
99
paths:
1010
- "backend/**"
@@ -103,6 +103,21 @@ jobs:
103103
env:
104104
DBCONFIG_POSTGRESQLCONFIG_HOST: ${{ env.DB_FORWARD_IP }}
105105

106+
- name: Collect pod logs
107+
if: always()
108+
run: |
109+
mkdir -p /tmp/kfp-logs
110+
echo "Collecting logs from all pods in $NAMESPACE namespace..."
111+
for pod in $(kubectl get pods -n "$NAMESPACE" -o jsonpath='{.items[*].metadata.name}'); do
112+
echo "Collecting logs for pod: $pod"
113+
kubectl logs -n "$NAMESPACE" "$pod" --all-containers=true > "/tmp/kfp-logs/${pod}.log" 2>&1 || true
114+
done
115+
echo "Collecting logs from all pods in $POSTGRES_NAMESPACE namespace..."
116+
for pod in $(kubectl get pods -n "$POSTGRES_NAMESPACE" -o jsonpath='{.items[*].metadata.name}'); do
117+
echo "Collecting logs for pod: $pod"
118+
kubectl logs -n "$POSTGRES_NAMESPACE" "$pod" --all-containers=true > "/tmp/kfp-logs/${pod}.log" 2>&1 || true
119+
done
120+
106121
- name: Cleanup
107122
if: always()
108123
run: |
@@ -114,3 +129,10 @@ jobs:
114129
kubectl -n "$POSTGRES_NAMESPACE" get pods -o wide || true
115130
echo "==== Postgres Events ($POSTGRES_NAMESPACE) ===="
116131
kubectl -n "$POSTGRES_NAMESPACE" get events --sort-by=.lastTimestamp | tail -n 100 || true
132+
133+
- name: Upload test artifacts
134+
if: always()
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: integration-tests-v1-postgres-artifacts
138+
path: /tmp/kfp-logs/*

.github/workflows/legacy-v2-api-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- master
7-
- feature/replace-str-with-largetext-WIP
7+
- feature/postgres-integration # lyk
88

99
pull_request:
1010
paths:

0 commit comments

Comments
 (0)