Skip to content

Commit 90224e5

Browse files
committed
OPCT-226: cmd/report UX enhancements for CLI and Web report
This change introduce several improvements in the UX while reviewing the report by: - creationg an intuitive HTML report allowing users to quickly see issues and navigate to the logs for each test failure - introduce several gates/SLO/checks to be used as post-processor and get better visibility in the results, based in existing knowledge base/CI data or external ssytems See the PR with details of improvements: #76 ---- fix sippy query in the flake filter create a rank of tags, adding percentage of counters create html report saving data to json improve report html add log links and rank by error count update camgi tab add waiting interval support status: improve message field with plugin phase report: generating filter.html file with failures table renameing vfs path for html templates report html - update rank and output as json using report as data source of CLI report; apply docs add timers to the runtime report update report collecting more env information report: update html templates to improve filters adding suite errors menu Update suite error menu using native js create a rank of error counters adding an option to extract errors from must-gather extracting must-gather event filters adding a tab to the report adding the structure of report checks introducing dynamic checks moving report to summary Adding checks with acceptance values from baseline adding alert pop to Checks menu parallelism processing must-gather, loweing 3 times proc time adding support to all plugins in report http file server to serve report review: documenting and linking check rules reorg mkdocs/todo report: embeding etcd error parser to json report report/must-gather: consolidating etd parser report: supporting etcd, network check and embed data remove codegen script / not used distributing report to packages parsing meta/run.log extracting runtime information introducing new parsers: opct and meta config renaming sippy to its package renaming packages and cleanup review report html and threasholds review timers for plugins add etcd checks ; cleanup review thresholds bumping plugins image review documentation and doc strings update check platform type fix tests in tags fix dev docs dev/report: adding initial flow of report Fix Containerfile for CI when releasing Fix windows build update makefile to fix windows build isolating status watch interval from #87 reverting unrelated docs changes improving unit tests adding metaconfig unit tests and test data adding tests for meta-run.log parser adding parsers and tests for config maps fixes in the opct metrics report gen metrics report adding sample document to generate batch reports Review checks to support attributes review report to improve checks increasing the error pattern information for etcd taking notes for report dev doc adding plugin log extraction and link to the plugin name collecting node info extracting install-config review report html and metrics with adm parse cmd adding charts with ploty remove comments when plotting fix log save opct adm parse-etcd-logs to quickly access parsed logs (#4) increasing documentation coverage bump to use new quay.io org create target directory before extractors rename title of checks on report cli fixes in the report check prevent empty data fix/report/cli: show other plugin than k8s report/check: 012 - check plugin failure fixes after rebase rename namespace Supporting PDB to opct server add new gen openshift-tests plugin based in go allow custom openshift-tests image to devel w/ kind working version with entrypoint for plugin plugin manifests fixes to support remote entrypoint to tests image update plugin manifests to new plugin version refact CLI UI tables to enhance results intro yamllint and fixing yaml assets/manifests plugins working version the default flow enhance pre-run checks for missing config create local log file for all levels updatem plugins according to the latest goplugin version add collector image to the manifest template review packages / moving to report package using ETL-like cleanup must-gather/extractor packages refact/must-gather: isolate and tune leaky bucket processor cmd/run: fix flag to use full image path to allow CI presubmits review the result filter pipeline OPCT-292: cmd/publish - add experimental publish used in CI Add a experimental command to allow Prow CI to publish results in the opct-storage (S3) without needing to install dependencies in the test step, preventing failures. OPCT-292: cmd/publish - add metadata option when publishing artifact doc: add review/support documentations feat: upload baseline artifact on s3 report/feat: opct adm baseline (get|list|indexer|publish) review baseline reitrieving summary/baseline from service/API feat: add replay to filter pipeline feat: introduce adm setup-ndoe to helper in tests review plugin filter order fix checks to good tresholds
1 parent ed7ee37 commit 90224e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+9422
-2225
lines changed

.github/workflows/go.yaml

Lines changed: 93 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "OPCT"
23

34
on:
@@ -49,8 +50,8 @@ jobs:
4950
name: go-test
5051
runs-on: ubuntu-latest
5152
needs:
52-
- go-lint
53-
- go-static
53+
- go-lint
54+
- go-static
5455
steps:
5556
- uses: actions/checkout@v4
5657
- uses: actions/setup-go@v5
@@ -63,8 +64,8 @@ jobs:
6364
name: "go-vet"
6465
runs-on: ubuntu-latest
6566
needs:
66-
- go-lint
67-
- go-static
67+
- go-lint
68+
- go-static
6869
steps:
6970
- uses: actions/checkout@v4
7071
- uses: actions/setup-go@v5
@@ -77,8 +78,8 @@ jobs:
7778
name: "build-artifact"
7879
runs-on: ubuntu-latest
7980
needs:
80-
- go-test
81-
- go-vet
81+
- go-test
82+
- go-vet
8283
steps:
8384
- uses: actions/checkout@v4
8485
- uses: actions/setup-go@v5
@@ -121,8 +122,7 @@ jobs:
121122
e2e-cmd_report:
122123
name: "e2e-cmd_report"
123124
runs-on: ubuntu-latest
124-
needs:
125-
- build
125+
needs: [build]
126126
steps:
127127
- name: Download artifacts
128128
uses: actions/download-artifact@v4
@@ -132,24 +132,30 @@ jobs:
132132

133133
- name: Running report
134134
env:
135-
RESULT_ARTIFACT_URL: "https://openshift-provider-certification.s3.us-west-2.amazonaws.com"
136-
RESULT_ARTIFACT_VERSION: "v0.4.0/default/4.15.0-20240228-HighlyAvailable-vsphere-None.tar.gz"
137-
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
135+
BUCKET: openshift-provider-certification
136+
REGION: us-west-2
137+
OPCT_MODE: v0.4.0/default
138+
EXEC_MODE: default
139+
ARTIFACT: 4.15.0-20240228-HighlyAvailable-vsphere-None.tar.gz
140+
OPCT: /tmp/build/opct-linux-amd64
138141
run: |
139-
echo "> Downloading sample artifact: ${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
140-
wget -qO /tmp/result.tar.gz "${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
142+
URI=${OPCT_MODE}/${ARTIFACT}
143+
URL=https://${BUCKET}.s3.${REGION}.amazonaws.com/${URI}
144+
145+
echo "> Downloading sample artifact: ${URL}"
146+
wget -qO /tmp/result.tar.gz "${URL}"
141147
142148
echo "> Setting run permissions to OPCT:"
143-
chmod u+x ${CUSTOM_BUILD_PATH}
149+
chmod u+x ${OPCT}
144150
145151
echo "> Running OPCT report:"
146-
${CUSTOM_BUILD_PATH} report /tmp/result.tar.gz
152+
${OPCT} report /tmp/result.tar.gz
147153
148154
e2e-cmd_adm-parse-etcd-logs:
149155
name: "e2e-cmd_adm-parse-etcd-logs"
150156
runs-on: ubuntu-latest
151157
needs:
152-
- build
158+
- build
153159
steps:
154160
- name: Download artifacts
155161
uses: actions/download-artifact@v4
@@ -159,14 +165,16 @@ jobs:
159165

160166
- name: Preparing testdata
161167
env:
162-
RESULT_ARTIFACT_URL: "https://openshift-provider-certification.s3.us-west-2.amazonaws.com"
163-
RESULT_ARTIFACT_VERSION: "testdata/must-gather-etcd-logs.tar.gz"
168+
BUCKET: openshift-provider-certification
169+
REGION: us-west-2
170+
VERSION: "testdata/must-gather-etcd-logs.tar.gz"
164171
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
165172
LOCAL_TEST_DATA: /tmp/must-gather.tar.gz
166173
LOCAL_TEST_DATA_DIR: /tmp/must-gather
167174
run: |
168-
echo "> Downloading sample artifact: ${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
169-
wget -qO ${LOCAL_TEST_DATA} "${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
175+
URL=https://${BUCKET}.s3.${REGION}.amazonaws.com
176+
echo "> Downloading sample artifact: ${URL}/${VERSION}"
177+
wget -qO ${LOCAL_TEST_DATA} "${URL}/${VERSION}"
170178
171179
echo "> Setting run permissions to OPCT:"
172180
chmod u+x ${CUSTOM_BUILD_PATH}
@@ -178,37 +186,43 @@ jobs:
178186
- name: "e2e stdin reader: cat <etcd pod logs> | opct adm parse-etcd-logs"
179187
env:
180188
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
181-
LOCAL_TEST_DATA_DIR: /tmp/must-gather
189+
TEST_DATA_DIR: /tmp/must-gather
190+
NS_PATH_ETCD: namespaces/openshift-etcd/pods
191+
LOG_PATH: etcd/etcd/logs
182192
run: |
183-
cat ${LOCAL_TEST_DATA_DIR}/*/*/namespaces/openshift-etcd/pods/*/etcd/etcd/logs/*.log | \
193+
cat ${TEST_DATA_DIR}/*/*/${NS_PATH_ETCD}/*/${LOG_PATH}/*.log | \
184194
${CUSTOM_BUILD_PATH} adm parse-etcd-logs
185195
186196
- name: "e2e must-gather dir: opct adm parse-etcd-logs <must-gather-dir>"
187197
env:
188198
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
189-
LOCAL_TEST_DATA_DIR: /tmp/must-gather
199+
TEST_DATA_DIR: /tmp/must-gather
190200
run: |
191-
${CUSTOM_BUILD_PATH} adm parse-etcd-logs ${LOCAL_TEST_DATA_DIR}
201+
${CUSTOM_BUILD_PATH} adm parse-etcd-logs ${TEST_DATA_DIR}
192202
193-
- name: "e2e aggregate by hour: opct adm parse-etcd-logs --aggregator hour <must-gather-dir>"
203+
- name: |
204+
e2e aggregate by hour: opct adm parse-etcd-logs
205+
--aggregator hour <must-gather-dir>
194206
env:
195-
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
196-
LOCAL_TEST_DATA_DIR: /tmp/must-gather
207+
OPCT: /tmp/build/opct-linux-amd64
208+
TEST_DATA_DIR: /tmp/must-gather
197209
run: |
198-
${CUSTOM_BUILD_PATH} adm parse-etcd-logs --aggregator hour ${LOCAL_TEST_DATA_DIR}
210+
${OPCT} adm parse-etcd-logs --aggregator hour ${TEST_DATA_DIR}
199211
200-
- name: "e2e ignore error counters: opct adm parse-etcd-logs --skip-error-counter=true <must-gather-dir>"
212+
- name: |
213+
e2e ignore error counters: opct adm parse-etcd-logs
214+
--skip-error-counter=true <must-gather-dir>
201215
env:
202-
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
203-
LOCAL_TEST_DATA_DIR: /tmp/must-gather
216+
OPCT: /tmp/build/opct-linux-amd64
217+
TEST_DATA_DIR: /tmp/must-gather
204218
run: |
205-
${CUSTOM_BUILD_PATH} adm parse-etcd-logs --skip-error-counter=true ${LOCAL_TEST_DATA_DIR}
219+
${OPCT} adm parse-etcd-logs \
220+
--skip-error-counter=true ${TEST_DATA_DIR}
206221
207222
e2e-cmd_adm-parse-metrics:
208223
name: "e2e-cmd_adm-parse-metrics"
209224
runs-on: ubuntu-latest
210-
needs:
211-
- build
225+
needs: [build]
212226
steps:
213227
- name: Download artifacts
214228
uses: actions/download-artifact@v4
@@ -218,21 +232,60 @@ jobs:
218232

219233
- name: Preparing testdata
220234
env:
221-
RESULT_ARTIFACT_URL: "https://openshift-provider-certification.s3.us-west-2.amazonaws.com"
222-
RESULT_ARTIFACT_VERSION: "testdata/ci-external-aws-ccm_1757495441294888960-artifacts_must-gather-metrics.tar.xz"
235+
BUCKET: openshift-provider-certification
236+
REGION: us-west-2
237+
PREFIX: testdata/ci-external-aws-ccm_
238+
VERSION: 1757495441294888960-artifacts_must-gather-metrics.tar.xz
223239
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
224240
LOCAL_TEST_DATA: /tmp/opct-metrics.tar.xz
225241
run: |
226-
echo "> Downloading sample artifact: ${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
227-
wget -qO ${LOCAL_TEST_DATA} "${RESULT_ARTIFACT_URL}/${RESULT_ARTIFACT_VERSION}"
242+
DATA_VERSION=${PREFIX}${VERSION}
243+
URL=https://${BUCKET}.s3.${REGION}.amazonaws.com
244+
echo "> Downloading sample artifact: ${URL}/${DATA_VERSION}"
245+
wget -qO ${LOCAL_TEST_DATA} "${URL}/${DATA_VERSION}"
228246
229-
echo "> Setting run permissions to OPCT:"
247+
echo "> Setting exec permissions to OPCT:"
230248
chmod u+x ${CUSTOM_BUILD_PATH}
231249
232250
- name: "e2e parse metrics: opct adm parse-etcd-logs <must-gather-dir>"
233251
env:
234252
CUSTOM_BUILD_PATH: /tmp/build/opct-linux-amd64
235253
LOCAL_TEST_DATA: /tmp/opct-metrics.tar.xz
236254
run: |
237-
${CUSTOM_BUILD_PATH} adm parse-metrics --input ${LOCAL_TEST_DATA} --output /tmp/metrics
255+
${CUSTOM_BUILD_PATH} adm parse-metrics \
256+
--input ${LOCAL_TEST_DATA} --output /tmp/metrics
238257
tree /tmp/metrics
258+
259+
e2e-cmd_adm-baseline:
260+
name: "e2e-cmd_adm-baseline"
261+
runs-on: ubuntu-latest
262+
needs: [build]
263+
steps:
264+
- name: Download artifacts
265+
uses: actions/download-artifact@v4
266+
with:
267+
name: opct-linux-amd64
268+
path: /tmp/build/
269+
270+
- name: Preparing testdata
271+
env:
272+
OPCT: /tmp/build/opct-linux-amd64
273+
run: |
274+
echo "> Setting exec permissions to OPCT:"
275+
chmod u+x ${OPCT}
276+
277+
- name: "e2e adm baseline: opct adm baseline (list|get)"
278+
env:
279+
OPCT: /tmp/build/opct-linux-amd64
280+
run: |
281+
echo -e "\n\t#>> List latest baseline results"
282+
${OPCT} adm baseline list
283+
284+
echo -e "\n\t#>> List all baseline results"
285+
${OPCT} adm baseline list --all
286+
287+
echo -e "\n\t#>> Retrieve a baseline result by name"
288+
${OPCT} adm baseline get --name 4.16_None_latest --dump
289+
290+
echo -e "\n\t#>> Retrieve a baseline result by release and platform"
291+
${OPCT} adm baseline get --release 4.15 --platform None

.github/workflows/lint-yaml.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Lint YAML
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- release-*
9+
pull_request:
10+
branches:
11+
- main
12+
- release-*
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Install yamllint
23+
run: pip install yamllint
24+
25+
- name: Lint YAML files
26+
run: |
27+
echo ">> Running YAML lint on data/templates/plugins/"
28+
yamllint data/templates/plugins/

.github/workflows/release.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: OPCT Release
23

34
on:
@@ -48,7 +49,9 @@ jobs:
4849
podman login -u="${QUAY_USER}" -p="${QUAY_PASS}" quay.io
4950
5051
echo "> Build container image:"
51-
podman build -t ${CONTAINER_REPO}:${RELEASE_TAG} -f hack/Containerfile.ci .
52+
podman build \
53+
-t ${CONTAINER_REPO}:${RELEASE_TAG} \
54+
-f hack/Containerfile.ci .
5255
5356
echo "> Publish container image:"
5457
podman push ${CONTAINER_REPO}:${RELEASE_TAG}
@@ -83,6 +86,6 @@ jobs:
8386
body: |
8487
## Changelog
8588
${{steps.github_release.outputs.changelog}}
86-
89+
8790
## Container Images
8891
- [${{ env.CONTAINER_REPO }}:${{ env.RELEASE_TAG }}](https://quay.io/repository/ocp-cert/opct?tab=tags)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ kubeconfig
55

66
# build files
77
dist/
8+
build/
89

910
# changelog is generated automaticaly by hack/generate-changelog.sh
1011
# available only in the rendered webpage (built by mkdocs).

Makefile

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,30 @@ build-darwin-arm64: build
5757
linux-amd64-container: build-linux-amd64
5858
podman build -t $(IMG):latest -f hack/Containerfile --build-arg=RELEASE_TAG=$(RELEASE_TAG) .
5959

60-
.PHONY: image-mirror-sonobuoy
61-
image-mirror-sonobuoy:
62-
./hack/image-mirror-sonobuoy/mirror.sh
63-
64-
# Utils dev
65-
.PHONY: update-go
66-
update-go:
67-
go get -u
68-
go mod tidy
60+
# Publish devel binaries (non-official). Must be used only for troubleshooting in development/support.
61+
.PHONY: publish-amd64-devel
62+
publish-amd64-devel: build-linux-amd64
63+
aws s3 cp $(BUILD_DIR)/opct-linux-amd64 s3://openshift-provider-certification/bin/opct-linux-amd64-devel
64+
65+
.PHONY: publish-darwin-arm64-devel
66+
publish-darwin-arm64-devel: build-darwin-arm64
67+
aws s3 cp $(BUILD_DIR)/opct-darwin-arm64 s3://openshift-provider-certification/bin/opct-darwin-arm64-devel
68+
69+
.PHONY: publish-devel
70+
publish-devel: publish-amd64-devel
71+
publish-devel: publish-darwin-arm64-devel
72+
73+
#
74+
# Test
75+
#
76+
77+
.PHONY: test-lint
78+
test-lint:
79+
@echo "Running linting tools"
80+
# Download https://github.com/golangci/golangci-lint/releases/tag/v1.59.1
81+
golangci-lint run --timeout=10m
82+
# yamllint: pip install yamllint
83+
yamllint .github/workflows/*.yaml
6984

7085
.PHONY: test
7186
test:
@@ -90,3 +105,13 @@ build-changelog:
90105
.PHONY: build-docs
91106
build-docs: build-changelog
92107
mkdocs build --site-dir ./site
108+
109+
.PHONY: image-mirror-sonobuoy
110+
image-mirror-sonobuoy:
111+
./hack/image-mirror-sonobuoy/mirror.sh
112+
113+
# Utils dev
114+
.PHONY: update-go
115+
update-go:
116+
go get -u
117+
go mod tidy

0 commit comments

Comments
 (0)