[GREP-291] Introduce end-to-end tests for the OnDelete update strategy#469
Conversation
3293602 to
a8bf80b
Compare
a8bf80b to
2e52d66
Compare
2e52d66 to
5b27dac
Compare
Ronkahn21
left a comment
There was a problem hiding this comment.
Overall, this looks good. However, I’d prefer to keep the test files focused strictly on test logic rather than utility functions. Also, some functions are becoming quite large; could you refactor them so each function handles a single responsibility and calls helper functions where needed
There was a problem hiding this comment.
Pull request overview
This PR introduces end-to-end tests for the OnDelete update strategy for PodCliqueSet, complementing the implementation in PR #438. It also renames triggerPodCliqueRollingUpdate to triggerPodCliqueUpdate and the associated env var from ROLLING_UPDATE_TRIGGER to UPDATE_TRIGGER to be strategy-agnostic.
Changes:
- Added 7 E2E test cases (OD-1 through OD-7) covering OnDelete strategy scenarios including no-auto-deletion, manual deletion with updated spec, scale-in preference for outdated pods, PCSG interactions, and multi-replica PCS
- Renamed
triggerPodCliqueRollingUpdate→triggerPodCliqueUpdateand env varROLLING_UPDATE_TRIGGER→UPDATE_TRIGGERacross existing rolling update tests/utils - Added CI matrix entry for
ondelete_updatestests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| operator/e2e/tests/ondelete_updates_test.go | New file with 7 OnDelete E2E tests and shared helper functions |
| operator/e2e/yaml/workload-ondelete.yaml | New workload manifest with OnDelete update strategy |
| operator/e2e/tests/rolling_update_utils.go | Renamed function and env var to be strategy-agnostic |
| operator/e2e/tests/rolling_updates_test.go | Updated call sites for the renamed function |
| .github/workflows/build-check-test.yaml | Added ondelete_updates test pattern to CI matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bf700b9 to
1bf54e0
Compare
|
@Ronkahn21 I've addressed your offline comments about the missing test cases. Will refactor the utils in a subsequent PR since I would like to unblock the upcoming release which OnDelete needs to be a part of. Thanks. |
4b9711c to
c09ad69
Compare
|
@unmarshall I have refactored the codebase according to your suggestions offline. Please take a look and approve. Thanks. |
|
There seems to be a bug in the setup.go file (in lines which weren't modified). Will fix and push the change. |
8333cff to
b7fce93
Compare
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
…e_utils.go Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Removed the unneeded waitForOnDeleteUpdateCompleteDefault as its not required. Signed-off-by: Madhav Bhargava <madhav.bhargava@sap.com>
Signed-off-by: Madhav Bhargava <madhav.bhargava@sap.com>
…ersOutdatedPods` Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Saketh Kalaga <saketh.kalaga@sap.com>
Signed-off-by: Madhav Bhargava <madhav.bhargava@sap.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Introduces end-to-end tests for the
OnDeleteupdate strategy introduced in #438.Which issue(s) this PR fixes:
Fixes #291
Special notes for your reviewer:
This branch contains implementation code of the ondelete update strategy introduced in #438. Once that is merged, this PR will be rebased to only contain the E2E test code.
Does this PR introduce a API change?
Additional documentation e.g., enhancement proposals, usage docs, etc.: