Skip to content

Commit 785ae74

Browse files
committed
feat: add Status to the report overview table and parse data from report files on update
1 parent a536ea2 commit 785ae74

File tree

3 files changed

+56
-13
lines changed

3 files changed

+56
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
date: "2025-07-04T16:56:35+02:00"
3+
gatewayAPIChannel: standard
4+
gatewayAPIVersion: v1.3.0
5+
implementation:
6+
contact:
7+
- '@istio/maintainers'
8+
organization: istio
9+
project: istio
10+
url: https://istio.io
11+
version: 1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7
12+
kind: ConformanceReport
13+
mode: default
14+
profiles:
15+
- core:
16+
result: success
17+
statistics:
18+
Failed: 0
19+
Passed: 9
20+
Skipped: 0
21+
name: Gateway
22+
summary: Core tests succeeded.

conformance/reports/v0.4.0/gateway/istio/Makefile

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,25 +347,46 @@ update-readme:
347347
exit 1; \
348348
fi; \
349349
echo "Found reports: $$REPORTS"; \
350-
echo "Building table entries..."; \
350+
echo "Building table entries from YAML content..."; \
351351
TABLE_ENTRIES=""; \
352352
for report in $$REPORTS; do \
353353
echo "Processing $$report..."; \
354-
IMPL_VERSION=$$(echo "$$report" | sed 's/-[^-]*-[^-]*-report\.yaml$$//'); \
355-
MODE=$$(echo "$$report" | sed 's/.*-\([^-]*\)-[^-]*-report\.yaml$$/\1/'); \
356-
PROFILE_LOWER=$$(echo "$$report" | sed 's/.*-\([^-]*\)-report\.yaml$$/\1/'); \
357-
PROFILE_UPPER=$$(echo "$$PROFILE_LOWER" | sed 's/^./\U&/'); \
358-
EXTENSION_VERSION="$(INFERENCE_EXTENSION_VERSION)"; \
359-
TABLE_ENTRY="| $$EXTENSION_VERSION | $$PROFILE_UPPER | $$IMPL_VERSION | $$MODE | [$$report](./$$report) |"; \
354+
if [ ! -f "$$report" ]; then \
355+
echo "Warning: Report file $$report not found, skipping"; \
356+
continue; \
357+
fi; \
358+
GATEWAY_API_VERSION=$$(grep '^gatewayAPIVersion:' "$$report" | sed 's/gatewayAPIVersion: *//'); \
359+
IMPL_VERSION=$$(grep '^ version:' "$$report" | sed 's/ version: *//'); \
360+
MODE=$$(grep '^mode:' "$$report" | sed 's/mode: *//'); \
361+
PROFILE_NAME=$$(grep '^- name:' "$$report" | sed 's/- name: *//'); \
362+
DATE=$$(grep '^date:' "$$report" | sed 's/date: *"//' | sed 's/".*//'); \
363+
PASSED=$$(grep '^ Passed:' "$$report" | sed 's/ Passed: *//'); \
364+
FAILED=$$(grep '^ Failed:' "$$report" | sed 's/ Failed: *//'); \
365+
SKIPPED=$$(grep '^ Skipped:' "$$report" | sed 's/ Skipped: *//'); \
366+
RESULT=$$(grep '^ result:' "$$report" | sed 's/ result: *//'); \
367+
if [ -z "$$GATEWAY_API_VERSION" ]; then GATEWAY_API_VERSION="$(GATEWAY_API_VERSION)"; fi; \
368+
if [ -z "$$IMPL_VERSION" ]; then IMPL_VERSION="unknown"; fi; \
369+
if [ -z "$$MODE" ]; then MODE="default"; fi; \
370+
if [ -z "$$PROFILE_NAME" ]; then PROFILE_NAME="Gateway"; fi; \
371+
if [ -z "$$DATE" ]; then DATE="unknown"; fi; \
372+
if [ -z "$$PASSED" ]; then PASSED="0"; fi; \
373+
if [ -z "$$FAILED" ]; then FAILED="0"; fi; \
374+
if [ -z "$$SKIPPED" ]; then SKIPPED="0"; fi; \
375+
if [ -z "$$RESULT" ]; then RESULT="unknown"; fi; \
376+
STATUS="NOT"; \
377+
if [ "$$RESULT" = "success" ]; then \
378+
STATUS="PASS"; \
379+
fi; \
380+
TABLE_ENTRY="| $$GATEWAY_API_VERSION | $$PROFILE_NAME | $$IMPL_VERSION | $$MODE | [$$report](./$$report) | $$STATUS |"; \
360381
if [ -z "$$TABLE_ENTRIES" ]; then \
361382
TABLE_ENTRIES="$$TABLE_ENTRY"; \
362383
else \
363384
TABLE_ENTRIES="$$TABLE_ENTRIES\n$$TABLE_ENTRY"; \
364385
fi; \
365386
done; \
366387
echo "Updating README.md..."; \
367-
sed -i '/^| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report |$$/,/^| \.\.\. *| \.\.\. *| \.\.\. *| \.\.\. *| \.\.\. *|$$/{//!d;}' README.md; \
368-
sed -i '/^| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report |$$/a\|--------------------------|----------------|------------------------|---------|----------------------------------------------------------------------------|\n'"$$TABLE_ENTRIES" README.md; \
388+
sed -i '/^| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report | Status |$$/,/^| \.\.\. *| \.\.\. *| \.\.\. *| \.\.\. *| \.\.\. *| \.\.\. *|$$/{//!d;}' README.md; \
389+
sed -i '/^| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report | Status |$$/a\|--------------------------|----------------|------------------------|---------|--------|--------|\n'"$$TABLE_ENTRIES" README.md; \
369390
echo "README table updated successfully!"
370391

371392
# Clean up resources

conformance/reports/v0.4.0/gateway/istio/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
## Table of Contents
55

6-
| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report |
7-
|--------------------------|----------------|------------------------|---------|----------------------------------------------------------------------------|
8-
| v0.4.0 | Gateway | 1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7 | default | [1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7-default-gateway-report.yaml](./1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7-default-gateway-report.yaml) |
9-
| ... | ... | ... | ... | ... |
6+
| Extension Version Tested | Profile Tested | Implementation Version | Mode | Report | Status |
7+
|--------------------------|----------------|------------------------|---------|--------|--------|
8+
| v1.3.0 | Gateway | 1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7 | default | [1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7-default-gateway-report.yaml](./1.27-alpha.0551127f00634403cddd4634567e65a8ecc499a7-default-gateway-report.yaml) | PASS |
9+
| ... | ... | ... | ... | ... | ... |
1010

1111
## Reproduce
1212

0 commit comments

Comments
 (0)