fix: anchor grep pattern in deleteResourcesInNamespaceMatchingPattern#119
fix: anchor grep pattern in deleteResourcesInNamespaceMatchingPattern#119atharrva01 wants to merge 1 commit intoopenMF:devfrom
Conversation
Signed-off-by: atharrva01 <atharvaborade568@gmail.com>
|
hi @tdaly61 , I’d really appreciate a quick review on this small safety fix I made for namespace deletion matching, updated it to use exact matches to prevent accidental deletes on shared clusters. |
|
Hi @atharrva01 thanks for looking at this but may I ask have you tested the changes , have you deployed Mifos Gazelle ? |
|
hi @tdaly61 , I tested this locally by simulating the The namespaces used in this project ( Before fix: pattern After fix: pattern I confirmed the same behavior for all four patterns (
|

Summary
I fixed unsafe namespace matching in
deleteResourcesInNamespaceMatchingPattern()by changing it from a substring match to an exact match.Previously, using
infracould also match namespaces likeinfra-monitoringorinfrastructure, which could lead to unintended deletions during cleanup on shared clusters.I updated the grep check to anchor against the full
namespace/<name>format, so only the exact configured namespace is matched.Impact