-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cicd): Reduce memory footprint of e2e tests (#534)
# Description Recently the e2e test job has been [failing](https://github.com/caraml-dev/merlin/actions/runs/7880641930/job/21503099773) due to errors in deploying a model version, which would messages such as: ``` An error occurred (XMinioStorageFull) when calling the PutObject operation: Storage backend has reached its minimum free disk threshold. Please delete a few objects to proceed. ``` Upon digging further, there appears to be a lack of ephemeral storage on the k3d node we set up in the e2e tests, which causes a deployment's pods (the transformer usually) to be evicted: ``` The node was low on resource: ephemeral-storage. Threshold quantity: 778512530, available: 748868Ki. ``` Apparently we’ve been encountering this problem for some time already (@ariefrahmansyah tried to debug and address this in a previous PR #446), and we already tried some of the workarounds suggested here: - https://k3d.io/v5.4.6/faq/faq/#pods-evicted-due-to-lack-of-disk-space - k3d-io/k3d#133 As a quick fix to workaround these issues given that some of the workarounds have already been implemented, this PR introduces some changes to the e2e test setup: - Deleting the model created after each e2e test - Making the e2e tests (run using pytest) serialised (not [parallel](https://github.com/caraml-dev/merlin/blob/e110a96763e96333518b53ef6b9c18785fd08fa0/scripts/e2e/run-e2e.sh#L36)) - Using docker system prune instead of just docker image prune [before](https://github.com/caraml-dev/merlin/blob/e110a96763e96333518b53ef6b9c18785fd08fa0/.github/workflows/merlin.yml#L474) running the e2e tests - Lowering of kubelet eviction thresholds even further from 1% to 0.5% # Modifications - `.github/workflows/merlin.yml` - Reduction of kubelet eviction thresholds and replacement of docker image pruning with a system-level pruning - `python/sdk/test/integration_test.py` - Addition of steps to delete model versions created after each test run - `scripts/e2e/run-e2e.sh` - Reduction of pytest workers from 4 to 1 to remove parallelism # Tests <!-- Besides the existing / updated automated tests, what specific scenarios should be tested? Consider the backward compatibility of the changes, whether corner cases are covered, etc. Please describe the tests and check the ones that have been completed. Eg: - [x] Deploying new and existing standard models - [ ] Deploying PyFunc models --> # Checklist - [x] Added PR label - [x] Added unit test, integration, and/or e2e tests - [x] Tested locally - [ ] Updated documentation - [ ] Update Swagger spec if the PR introduce API changes - [ ] Regenerated Golang and Python client if the PR introduces API changes # Release Notes ```release-note NONE ```
- Loading branch information
1 parent
1269dbf
commit e4a0a01
Showing
5 changed files
with
145 additions
and
8 deletions.
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
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
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