[Test] Add end2end test to cover cluster patching.#7456
Conversation
4568e29 to
c86eb8d
Compare
c86eb8d to
29db146
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7456 +/- ##
========================================
Coverage 89.91% 89.92%
========================================
Files 180 180
Lines 16200 16226 +26
========================================
+ Hits 14567 14592 +25
- Misses 1633 1634 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
29db146 to
f08e36f
Compare
6d3cf9e to
7093bf8
Compare
|
|
||
| # Retrieve the AMI the cluster will use *before* creation. Since the create | ||
| # config does not set a custom AMI, the cluster uses this default pcluster AMI. | ||
| base_ami = retrieve_latest_ami(region, os, ami_type="pcluster", request=request) |
There was a problem hiding this comment.
Does this respect the "AMI_OWNER" specification in the testing infrastructure? If not, how about retrieving AMIs from the CloudFormation template of the first cluster creation?
There was a problem hiding this comment.
Godd catch, it may not. Fixing
| # Assert the kernel modules loaded before patching are still loaded on the head, | ||
| # compute and login nodes (which were all replaced or patched). | ||
| for node_type in NODE_TYPES: | ||
| _assert_kernel_modules_loaded(cluster, scheduler_commands_factory, node_type, kernel_modules_before) |
There was a problem hiding this comment.
Are you sure the number of kernel modules don't change before and after the update?
There was a problem hiding this comment.
Good point, what we want to enforce is that all the kernel modules loaded before the patching are still loaded after the patching (will fix the assertion).
That said, it may be that this assertion will be anyways too hard because a kernel bump could legitimately invalidate some kernel modules. My proposal is to start with a hard assertion as long as it succeeds and we will relax if we face legitimate removals.
7093bf8 to
54f8309
Compare
54f8309 to
15669a7
Compare
Description of changes
Add end2end test to cover cluster patching.
Minor changes made in this PR:
Test flow
Tests
ONGOING:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.