-
Notifications
You must be signed in to change notification settings - Fork 2.2k
monitoring-plugin: add e2e-management-api Prow job #79673
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
Open
sradco
wants to merge
1
commit into
openshift:main
Choose a base branch
from
sradco:monitoring-plugin-management-api-e2e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
ci-operator/step-registry/monitoring-plugin/tests/management-api/OWNERS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| approvers: | ||
| - etmurasaki | ||
| - jan--f | ||
| - jgbernalp | ||
| - kyoto | ||
| - peteryurkovich | ||
| - zhuje | ||
| options: {} | ||
| reviewers: | ||
| - etmurasaki | ||
| - jgbernalp | ||
| - kyoto | ||
| - peteryurkovich | ||
| - zhuje |
52 changes: 52 additions & 0 deletions
52
...monitoring-plugin/tests/management-api/monitoring-plugin-tests-management-api-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| if [ -f "${SHARED_DIR}/proxy-conf.sh" ] ; then | ||
| source "${SHARED_DIR}/proxy-conf.sh" | ||
| fi | ||
|
|
||
| # Run the plugin backend directly in this step container (which has the Go | ||
| # source and toolchain via from: src). The backend only needs kube API access | ||
| # to manage PrometheusRule CRDs — it does not need the full console plugin | ||
| # stack. KUBECONFIG is injected by ci-operator from the provisioned cluster. | ||
|
|
||
| PORT=9001 | ||
|
|
||
| unset GOFLAGS | ||
| export GOCACHE=/tmp/go-build | ||
| export GOMODCACHE=/tmp/go-mod | ||
|
|
||
| echo "Starting monitoring-plugin backend on port ${PORT}..." | ||
| go run ./cmd/plugin-backend.go \ | ||
| -port="${PORT}" \ | ||
| -config-path="./config" \ | ||
| -static-path="./web/dist" & | ||
| BACKEND_PID=$! | ||
| # Single quotes: $BACKEND_PID must expand at signal time, not at registration | ||
| trap 'kill ${BACKEND_PID} 2>/dev/null || true' EXIT | ||
|
|
||
| # Wait for the backend to be ready | ||
| echo "Waiting for backend to be ready..." | ||
| ready=false | ||
| for i in $(seq 1 15); do | ||
| if curl -sf "http://localhost:${PORT}/health" > /dev/null 2>&1; then | ||
| echo "Backend is ready" | ||
| ready=true | ||
| break | ||
| fi | ||
| echo " attempt ${i}/15..." | ||
| sleep 2 | ||
| done | ||
|
|
||
| if [ "${ready}" != "true" ]; then | ||
| echo "ERROR: Backend did not become ready after 15 attempts" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Running management API e2e tests..." | ||
| export PLUGIN_URL="http://localhost:${PORT}" | ||
|
|
||
| make test-e2e | ||
20 changes: 20 additions & 0 deletions
20
...ring-plugin/tests/management-api/monitoring-plugin-tests-management-api-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "path": "monitoring-plugin/tests/management-api/monitoring-plugin-tests-management-api-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "etmurasaki", | ||
| "jan--f", | ||
| "jgbernalp", | ||
| "kyoto", | ||
| "peteryurkovich", | ||
| "zhuje" | ||
| ], | ||
| "reviewers": [ | ||
| "etmurasaki", | ||
| "jgbernalp", | ||
| "kyoto", | ||
| "peteryurkovich", | ||
| "zhuje" | ||
| ] | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
...ry/monitoring-plugin/tests/management-api/monitoring-plugin-tests-management-api-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ref: | ||
| as: monitoring-plugin-tests-management-api | ||
| from: src | ||
| commands: monitoring-plugin-tests-management-api-commands.sh | ||
| timeout: 30m0s | ||
| grace_period: 60s | ||
| resources: | ||
| requests: | ||
| cpu: "2" | ||
| memory: 4Gi | ||
| limits: | ||
| memory: 8Gi | ||
| documentation: |- | ||
| The monitoring-plugin-tests-management-api step starts the | ||
| monitoring-plugin backend directly from source (go run) inside the | ||
| step container, then runs the Go e2e tests in test/e2e/ against the | ||
| live Alerting Management API (make test-e2e). KUBECONFIG is injected | ||
| by ci-operator from the provisioned cluster so the tests can create | ||
| namespaces and verify PrometheusRule CRDs. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.