FIx hash ordering stability that causes test to fail
Issue: Fix quarantined flaky test for hash ordering in... (#460418 - closed)
What does this MR do and why?
We build K8s resources (configMaps, secrets etc) in ruby code using nested hashes and then convert to YAML to be sent to k8s cluster. A test was flaky because the expected YAML file may have some of its key-value pairs in a different order from that of the actual YAML file, causing tests to fail even though they are still technically equal.
Fix
- Sort each resource hash recursively by key to guarantee order
- Revert test quarantined as a result : Quarantine a flaky test (!151854 - merged)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
setup GDK and follow this guide to create a workspace locally. You should be able to create a workspace and have access to it. This verifies the workspace k8s resources are created.