-
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
032140a
73440b1
acba772
b8a34b2
17b39bf
401f785
42fa2ff
1687a4e
7cb4b62
187b536
632208f
557b03b
ff4478f
f8f0174
a30faad
c17e6b0
c2f960b
593ae10
2d83a18
fda5983
7fa3faf
b157db6
784be5d
bff653d
9a28720
24c8d19
37be4ce
70371ce
3f691dd
668f934
ee539de
b56b7db
63577c4
27e4252
7d0824b
19164c8
fbe29d0
43caac1
4f9294a
5fdeaad
0772bc7
075aab4
bc723cc
15a9ac1
63376ae
4a59a98
417cfb8
9c1a6db
b023e27
7799ea3
1de988c
08168ca
21adb96
06b42e4
fbfb71c
deca15d
9cfa482
3199b5c
62934f5
c3fab25
f9cd187
24f43b1
f6d8c53
85a61fc
dc184c7
aa3dfb8
7310ddd
a86c6e7
cc08a9e
7220440
ba675ae
7cee1e6
811c871
8014af3
e9102a0
7e35552
4384499
0adb8f0
6f667bf
0edc549
462cb12
fe29f10
10a47b4
719bea2
b5db8eb
82e6052
a279070
d8b3c8a
ae25003
af7548e
7de2845
1a3751f
0effcb4
9787752
a8ece28
a598f2c
d769659
3ef7466
54123d5
50ada94
73a5f7a
131f39d
a596b98
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