-
Notifications
You must be signed in to change notification settings - Fork 54
OCPBUGS-95281: Synchronize From Upstream Repositories #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d0252d4
6a28728
8013292
6655994
395bb86
7461774
a918ca8
60f2706
b7926dc
abd8c4a
dd78f2f
be16a0a
dbc9b4a
e5bac06
c63b183
e5877d7
8877ba0
ca2945a
507310b
61c439f
7909550
8f70eec
df9190e
a595b1e
8d0c773
3cc31b7
234a2ff
5205ef8
4c2092d
1183773
478d64c
063cd32
703a0cc
6101e76
0925810
c831784
c082c1d
f67b88a
87533ea
94c4937
f3d1334
c52fcb3
05f3f31
9bd1744
8853304
2960bb9
af896e1
46f9f12
9299a8f
27535ac
409d9fa
945ca24
6250f27
d15a7d4
bb0c19d
db3b4ac
df4ff0e
bdcee4d
0fe257f
997449a
ddfd44b
0a95832
8295192
eba159e
10903d7
569bad0
e0c6c89
f6fd4b0
875d5f4
9579cc5
d79d58a
3f17a17
32ba12e
2a43bf6
d1853b7
b997f62
a25c654
8e35285
ca99dee
aabd743
5dcfa72
2ecf4e7
79a882b
b712239
d41c1b9
e3b548a
367e95c
2501a7b
e2e9121
1406484
c7f622f
c768546
4bcce79
7e393b8
5a70686
431d7d4
e21b0eb
1c39d9e
b35c073
67dd561
12cd7e1
a765669
5db3a42
10dc690
d7df3e0
7ae6d8b
e812c9c
d8939ef
ffac438
70617fb
0b457c8
8c61e1f
2ab646d
81b39c6
f51b29c
9ba257e
42dc93d
3f71813
b5429b9
c5f1b99
a16839d
df3b407
088272c
978dd47
4469d4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -404,7 +404,6 @@ else | |||||||||||||||||||||||||||||||||||||||||||||||||
| endif | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: e2e-run-% | ||||||||||||||||||||||||||||||||||||||||||||||||||
| e2e-run-%: E2E_TIMEOUT ?= 20m | ||||||||||||||||||||||||||||||||||||||||||||||||||
| e2e-run-%: GODOG_ARGS ?= | ||||||||||||||||||||||||||||||||||||||||||||||||||
| e2e-run-%: prometheus-% | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ifeq ($(strip $(GODOG_ARGS)),) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -414,11 +413,11 @@ ifeq ($(strip $(GODOG_ARGS)),) | |||||||||||||||||||||||||||||||||||||||||||||||||
| set +e; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| KUBECONFIG=$(E2E_KUBECONFIG) \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| PROMETHEUS_URL=http://localhost:$$E2E_PROMETHEUS_PORT \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout $(E2E_TIMEOUT) -args --godog.tags="~@Serial" --godog.concurrency=100; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="~@Serial && ~@demo" --godog.concurrency=100; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| parallelExit=$$?; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| KUBECONFIG=$(E2E_KUBECONFIG) \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| PROMETHEUS_URL=http://localhost:$$E2E_PROMETHEUS_PORT \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout $(E2E_TIMEOUT) -args --godog.tags="@Serial" --godog.concurrency=1; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="@Serial && ~@demo" --godog.concurrency=1; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| serialExit=$$?; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ $$parallelExit -ne 0 ]] || [[ $$serialExit -ne 0 ]]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "e2e tests failed: parallel=$$parallelExit serial=$$serialExit"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -429,7 +428,7 @@ else | |||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ -z "$$E2E_PROMETHEUS_PORT" ]]; then echo "error: failed to extract prometheus hostPort from $(KIND_CONFIG)" >&2; exit 1; fi; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| KUBECONFIG=$(E2E_KUBECONFIG) \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| PROMETHEUS_URL=http://localhost:$$E2E_PROMETHEUS_PORT \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout=$(E2E_TIMEOUT) -args $(GODOG_ARGS) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| go test -count=1 -v ./test/e2e/features_test.go -timeout=$(or $(E2E_TIMEOUT),20m) -args $(GODOG_ARGS) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| endif | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: e2e-coverage-% | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -697,13 +696,33 @@ deploy-docs: venv | |||||||||||||||||||||||||||||||||||||||||||||||||
| . $(VENV)/activate; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdocs gh-deploy --force --strict | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| # The demo script requires to install asciinema with: brew install asciinema to run on mac os envs. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # Please ensure that all demos are named with the demo name and the suffix -demo-script.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: update-demos #EXHELP Validate demo recordings. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @for script in hack/demo/*-demo-script.sh; do \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| nm=$$(basename $$script -script.sh); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ./hack/demo/generate-asciidemo.sh -n $$nm $$(basename $$script); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| DEMO_OUTPUT_DIR ?= $(ROOT_DIR)/docs/demos | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: update-demos | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: SOURCE_MANIFEST := $(EXPERIMENTAL_E2E_MANIFEST) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: export DEFAULT_CATALOG := $(CATALOGS_MANIFEST) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: export INSTALL_DEFAULT_CATALOGS := true | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: export CATALOG_WAIT_TIMEOUT := 5m | ||||||||||||||||||||||||||||||||||||||||||||||||||
| update-demos: wait-operator-controller-experimental-e2e demo-e2e demo-svg experimental-e2e-teardown #EXHELP Record demo scenarios as asciicast and SVG files. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: demo-e2e | ||||||||||||||||||||||||||||||||||||||||||||||||||
| demo-e2e: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @command -v curl >/dev/null 2>&1 || { echo "Error: curl not found in PATH."; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @command -v jq >/dev/null 2>&1 || { echo "Error: jq not found in PATH."; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @mkdir -p $(DEMO_OUTPUT_DIR) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| KUBECONFIG=$(KUBECONFIG_DIR)/operator-controller-experimental-e2e.kubeconfig \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| DEMO_OUTPUT_DIR=$(DEMO_OUTPUT_DIR) go test -count=1 -v ./test/e2e/features_test.go -timeout 30m \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| -args --godog.tags="@demo" --godog.concurrency=1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: demo-svg | ||||||||||||||||||||||||||||||||||||||||||||||||||
| demo-svg: #EXHELP Convert asciicast recordings to SVG. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @command -v docker >/dev/null 2>&1 || { echo "Error: docker not found in PATH."; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| @for cast in $(DEMO_OUTPUT_DIR)/*.cast; do \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| svg=$${cast%.cast}.svg; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Converting $$(basename $$cast) -> $$(basename $$svg)"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| docker run --rm -v $(DEMO_OUTPUT_DIR):/data node:alpine \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| npx --yes svg-term-cli --in /data/$$(basename $$cast) --out /data/$$(basename $$svg) --window; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+718
to
726
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Unquoted glob can fail when no If 🐛 Proposed fix using nullglob guard demo-svg: `#EXHELP` Convert asciicast recordings to SVG.
`@command` -v docker >/dev/null 2>&1 || { echo "Error: docker not found in PATH."; exit 1; }
- `@for` cast in $(DEMO_OUTPUT_DIR)/*.cast; do \
+ `@shopt` -s nullglob; \
+ casts=($(DEMO_OUTPUT_DIR)/*.cast); \
+ if [ $${`#casts`[@]} -eq 0 ]; then \
+ echo "No .cast files found in $(DEMO_OUTPUT_DIR)"; \
+ exit 0; \
+ fi; \
+ for cast in "$${casts[@]}"; do \
svg=$${cast%.cast}.svg; \
echo "Converting $$(basename $$cast) -> $$(basename $$svg)"; \
docker run --rm -v $(DEMO_OUTPUT_DIR):/data node:alpine \
npx --yes svg-term-cli --in /data/$$(basename $$cast) --out /data/$$(basename $$svg) --window; \
doneRequires bash as the recipe shell (for 📝 Committable suggestion
Suggested change
🧰 Tools🪛 checkmake (0.3.2)[warning] 719-719: Target body for "demo-svg" exceeds allowed length of 5 lines (7). (maxbodylength) [warning] 719-719: Required target "all" is missing from the Makefile. (minphony) [warning] 719-719: Required target "clean" is missing from the Makefile. (minphony) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| include Makefile.venv | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/operator-framework-operator-controller
Length of output: 4445
🏁 Script executed:
Repository: openshift/operator-framework-operator-controller
Length of output: 277
Make
update-demosrun sequentiallyupdate-demoslists independent prerequisites, somake -jcan startdemo-svgorexperimental-e2e-teardownbeforedemo-e2efinishes writing the.castfiles. Convert this to a recipe, or mark the target.NOTPARALLEL, so recording, conversion, and teardown happen in order.🧰 Tools
🪛 checkmake (0.3.2)
[warning] 703-703: Target "update-demos" defined multiple times (lines 702 and 703).
(uniquetargets)
[warning] 704-704: Target "update-demos" defined multiple times (lines 702 and 704).
(uniquetargets)
[warning] 705-705: Target "update-demos" defined multiple times (lines 702 and 705).
(uniquetargets)
[warning] 706-706: Target "update-demos" defined multiple times (lines 702 and 706).
(uniquetargets)
[warning] 707-707: Target "update-demos" defined multiple times (lines 702 and 707).
(uniquetargets)
🤖 Prompt for AI Agents