-
Notifications
You must be signed in to change notification settings - Fork 749
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
Reduced the number of validators in the Local Kube tests to 1. #3154
Open
christos-h
wants to merge
5
commits into
linera-io:main
Choose a base branch
from
christos-h:change-local-kubernetes-validator-num
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
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d26df51
Reduced the number of validators in the Local Kube tests to 1.
christos-h 48e0314
WIP: debugging
christos-h c87e0c0
Added failure condition for upterm session.
christos-h dad0afe
Bumped Docker image version.
christos-h 7feffbc
WIP
christos-h 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 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 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,96 @@ | ||
name: Kubernetes | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: | ||
- "**" | ||
paths: | ||
- '.github/workflows/kubernetes.yml' | ||
- 'toolchains/**' | ||
- 'configuration/**' | ||
- 'docker/**' | ||
- 'kubernetes/**' | ||
- 'linera-service/**' | ||
- 'linera-rpc/**' | ||
workflow_dispatch: | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs on pull-requests | ||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}' | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_RETRY: 10 | ||
RUST_BACKTRACE: short | ||
RUSTFLAGS: "-D warnings" | ||
RUSTUP_MAX_RETRIES: 10 | ||
LINERA_TRY_RELEASE_BINARIES: "true" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
kind-deployment-e2e-tests: | ||
runs-on: ubuntu-latest-16-cores | ||
timeout-minutes: 90 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build client binary | ||
run: | | ||
cargo build --release --locked --bin linera --bin linera-proxy --bin linera-server --features scylladb,rocksdb,kubernetes,metrics | ||
strip target/release/linera | ||
strip target/release/linera-proxy | ||
strip target/release/linera-server | ||
- name: Setup helmfile | ||
uses: mamezou-tech/[email protected] | ||
- name: Run e2e tests | ||
uses: nick-fields/retry@v2 | ||
with: | ||
# Port forwarding sometimes dies, which makes all requests timeout | ||
# Which is why we need retries | ||
max_attempts: 1 | ||
timeout_minutes: 20 | ||
command: | | ||
kind get clusters | xargs -I {} kind delete cluster --name {} | ||
RUST_LOG=linera=info cargo test --locked -p linera-service --features scylladb,kubernetes --test linera_net_tests -- kubernetes --nocapture | ||
- name: Setup upterm session | ||
uses: lhotari/action-upterm@v1 | ||
if: ${{ failure() }} | ||
with: | ||
wait-timeout-minutes: 120 | ||
- name: Port forward Prometheus | ||
run: | | ||
kubectl port-forward prometheus-linera-core-kube-prometheu-prometheus-0 9090 & | ||
- name: Check Proxy metric | ||
# Check one random proxy metric that we expect to be logged after running the e2e tests | ||
run: | | ||
curl -s 'http://127.0.0.1:9090/api/v1/query?query=linera_proxy_request_latency_bucket' | jq -r '.data.result[]' | grep -q . | ||
- name: Check Server metric | ||
# Check one random server metric that we expect to be logged after running the e2e tests | ||
run: | | ||
curl -s 'http://127.0.0.1:9090/api/v1/query?query=linera_server_request_latency_bucket' | jq -r '.data.result[]' | grep -q . | ||
- name: Check Scylla metric | ||
# Check one random server metric that we expect to be logged after running the e2e tests | ||
run: | | ||
curl -s 'http://127.0.0.1:9090/api/v1/query?query=scylla_database_total_reads' | jq -r '.data.result[]' | grep -q . | ||
- name: Check Scylla Manager metric | ||
# Check one random server metric that we expect to be logged after running the e2e tests | ||
run: | | ||
curl -s 'http://127.0.0.1:9090/api/v1/query?query=scylla_manager_agent_rclone_bytes_transferred_total' | jq -r '.data.result[]' | grep -q . | ||
- name: Destroy the kind clusters | ||
if: always() | ||
shell: bash | ||
run: >- | ||
kind get clusters | xargs -I {} kind delete cluster --name {} |
This file contains 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 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
Oops, something went wrong.
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.
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.
We could even do 2, I think, and it would probably still mitigate the issue (if we want to keep
kind
testing more than 1 validator still, but maybe that's not needed)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.
In terms of test coverage, 2 is not better than 1, so I would pick 1