Run zenko tests out of cluster#2336
Conversation
Hello sylvainsenechal,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
d6a0f4c to
245e27d
Compare
77b703d to
8d5ede4
Compare
8d5ede4 to
18c02d8
Compare
18c02d8 to
733afdf
Compare
| ) | ||
| done | ||
|
|
||
| ( |
There was a problem hiding this comment.
No need for this anymore as we don't need the container, and config is handled differently
| working-directory: ./.github/scripts/end2end | ||
| - name: Linting | ||
| shell: bash | ||
| run: bash run-e2e-test.sh "end2end" ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} "lint" "default" |
There was a problem hiding this comment.
No need to do the linting in the deploy action..
- this deploy action is run multiple times in the ci
- it was building an image, taking time, all that just for linting
Now you will see later in end2end.yaml there is a simple yarn run lint
| DIR=$(dirname "$0") | ||
|
|
||
| # Set up ingress endpoints and /etc/hosts for out-of-cluster access | ||
| source "$DIR/configure-e2e-endpoints.sh" |
There was a problem hiding this comment.
This setup will be common to ctst and end2end tests.
Hopefully we will soon be able to have a common setup for both type of tests, to avoid having to go from configure-ctst to configure e2e, with many things that are common
| @@ -0,0 +1,139 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
This should be idempotent. I used it multiple times in Codespace without issues
|
|
||
| SERVICE_ACCOUNT="${ZENKO_NAME}-config" | ||
| POD_NAME="${ZENKO_NAME}-config" | ||
| MANAGEMENT_ENDPOINT="http://${ZENKO_NAME}-management-orbit-api:5001" |
There was a problem hiding this comment.
This is the kind of things that we have to change now that the test doesn't run in a pod within the Zenko cluster
| pip3 install --break-system-packages -r "$ZENKO_TESTS_DIR/requirements.txt" | ||
|
|
||
| cd "$ZENKO_TESTS_DIR" | ||
|
|
||
| envsubst < e2e-config.yaml.template > e2e-config.yaml |
There was a problem hiding this comment.
This used to be setup in the Dockerfile that I deleted
| @@ -0,0 +1,130 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
I came up with this to deal with the env variables.
It's a bit tricky as I wanted it to work for both github ci and codespace
Variables setup here are pretty much the same as the ones that were setup in the (now deleted) run-e2e-test.sh file
| - name: Deploy second Zenko for PRA | ||
| run: bash deploy-zenko.sh end2end-pra default './configs/zenko.yaml' | ||
| env: | ||
| ZENKO_MONGODB_DATABASE: pradb |
There was a problem hiding this comment.
setup in prepare-pra.sh directly
| cache-from: type=gha,scope=kafka-connect-${{ env.KAFKA_CONNECT_TAG }} | ||
| cache-to: type=gha,mode=max,scope=kafka-connect-${{ env.KAFKA_CONNECT_TAG }} | ||
|
|
||
| build-test-image: |
There was a problem hiding this comment.
No more image, just a new lint step as I removed it from the deploy action
.github/workflows/end2end.yaml
Outdated
| working-directory: ./.github/scripts/end2end | ||
| run: | | ||
| source .github/scripts/end2end/setup-e2e-env.sh | ||
| yarn run test_operator |
There was a problem hiding this comment.
I prefer this, simple, direct use of yarn commands instead of going through scripts with FOUR arguments 🧐
I just don't really like having to source the env var for each run so if you have suggestion I'm open
There was a problem hiding this comment.
you can instead add a first step which updates the env for followup steps
| RoleSessionName='end2end', | ||
| WebIdentityToken=token, | ||
| DurationSeconds=60 * 60 * 12, # 12 hrs | ||
| DurationSeconds=60 * 60 * 12, # 12 hrs (max allowed by STS for assume role) |
There was a problem hiding this comment.
I wanna keep this comment, I tried to use 30 days because in my codespace it was expiring after 12h, but when I used 30 days it broke because the api only accepts 12h
| "mocha": "^10.0.0", | ||
| "mocha-junit-reporter": "^2.2.1", | ||
| "mocha-multi-reporters": "^1.1.7", | ||
| "mocha-tags": "^1.0.1", |
There was a problem hiding this comment.
- Never used,
- Could be useful in theory,
- Will never be used in practice, so just add again if needed (will never be needed 🌚 )
| "test_operator": "mocha --exit -t 10000 --reporter mocha-multi-reporters --reporter-options configFile=config.json,cmrOutput=mocha-junit-reporter+testsuitesTitle+test_operator ./init_test.js", | ||
| "test_smoke": "mocha --exit -t 10000 --reporter mocha-multi-reporters --reporter-options configFile=config.json,cmrOutput=mocha-junit-reporter+testsuitesTitle+test_smoke --recursive smoke_tests", | ||
| "test_iam_policies": "mocha --exit -t 15000 --reporter mocha-multi-reporters --reporter-options configFile=config.json,cmrOutput=mocha-junit-reporter+testsuitesTitle+test_iam_policies --recursive iam_policies", | ||
| "test_all_extensions": "run-p --aggregate-output test_crr test_aws_crr test_expiration test_transition test_ingestion_oob_s3c", |
There was a problem hiding this comment.
Btw, I just had a look at end2end-sharded. The step "Run backbeat end to end tests", which is running test_all_extensions, now runs within ~12 min, against ~28min before.
I had to double check, as I thought some tests were simply not run, but we run the same tests. I think previously the parallel run was not working, maybe because of some weird stuff happening when this command is run in a pod, the pod can't run stuff in parallel or something.
There was a problem hiding this comment.
it seems this step perform a yarn install: by having it running directly in the runner, it will now be cached (automatically!) by setup-node, and would thus be much faster?
There was a problem hiding this comment.
Yeah also possible
| else | ||
| trap "kill ${_MONGO_PF_PID} 2>/dev/null || true" EXIT | ||
| fi | ||
| sleep 2 |
There was a problem hiding this comment.
the port forward isn't instant, but yeah this is a flaky risk, i changed it so we wait till its ready instead
… out of cluster Issue: ZENKO-5201
733afdf to
fd8ba68
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
| --command -- python3 configuration.py | ||
| # Run configuration.py directly | ||
| ZENKO_TESTS_DIR="$DIR/../../../tests/zenko_tests" | ||
| pip3 install --break-system-packages -r "$ZENKO_TESTS_DIR/requirements.txt" |
There was a problem hiding this comment.
I wouldn't want to break my system packages 😁 If we need to install dependencies, could we perhaps use a venv (maybe use uv?)
There was a problem hiding this comment.
I was thinking about using uv, maybe in another pr, but i could add it now 🤔
|
/approve |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
Queue build failedThe corresponding build for the queue failed:
Remove the pull request from the queue
|
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue ZENKO-5201. Goodbye sylvainsenechal. |
Issue: ZENKO-5201