-
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
6dd44ed
a63f38b
f8ba847
3a4b6b2
121ae55
f8cbd22
112e717
f814ce8
0f24e46
ae35733
1f50eba
cb3a9b4
71268fc
241ed9e
570806e
22d2630
5dbfaba
2995822
d3e076a
7b1b62c
8ed968b
996dcfc
a1aba80
5ea814b
897488e
1b40f22
c26f454
487a8ec
2b2367f
d7ee9eb
dd4742e
0a6a00d
7cbe49b
828cfe6
969154b
6aa6995
332532f
45b6a8f
2378a1a
d4d1ab6
925e8d5
8fbf795
714795d
2134a1f
9792abf
9212b73
d42ebe9
881ed61
c933205
ad77381
8191992
9625554
fbfe642
6c0c381
48c6554
0ba0301
a79cbbc
eb51761
05bcfe1
67ccc0d
b118448
dc9d210
cb6dbf6
2d0d8d3
41588be
bd08859
a014611
385b473
0823196
0fcea4a
1808dec
5545b9b
83e2b1d
53bd558
e0916e1
7e6a02d
aaa386b
4234e41
f087476
1e82105
b3e7c55
09ec7a0
8d0109a
724c3f2
a89aa4c
5e4cb6b
8097f20
8a7178b
61f5e7a
c1bee6b
7142a4f
43fada8
957f4f3
17e997e
a52ba7e
ed4ba07
18408ee
bb92486
5f06d73
ab3cd96
fa3e76a
af97c75
d51978e
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