Skip to content

function creates extra Usage resources when a regex pattern is used in rule step > 2 #137

@bobh66

Description

@bobh66

What happened?

The function creates extra unnecessary Usages when a regex pattern is used in a rule step the second step.

How can we reproduce it?

Use a rule sequence such as:

- first
- second
- third*

The regex patter will never match a literal observed resource, so the function has to scan the entire list of rules for resources to match, instead of just looking at the previous rule. This causes Usages to be created for the "third*->first" resources in addition to the second->first and third*->second.

The immediate fix is to only do deletion dependency processing on the rule before the current rule, but I suspect this code really needs to be refactored to make it more stable.

What environment did it happen in?

Function version: 0.5.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions