Skip to content

[Bug][Azure DevOps] Records are inserted into cicd_deployment_commits even when regexes don't match #5072

@hezyin

Description

@hezyin

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Version v0.17.0-alpha7

Azure DevOps Setup

I imported https://github.com/keon94/cicd-playground into my Azure DevOps account and created a pipeline using the definition at https://github.com/keon94/cicd-playground/blob/main/azure-pipelines.yml. I ran the pipeline twice manually on the same commit:

Screen Shot 2023-04-28 at 9 48 50 PM

How to reproduce this bug

  1. I first collect the Azure repo created above without setting any transformation rule. Then I check cicd_deployment_commits table and it's empty. This aligns with my expectation.

Screen Shot 2023-04-27 at 9 28 22 PM

Screen Shot 2023-04-27 at 9 28 12 PM

  1. I then collect the Azure repo again with a transformation rule this time, but I intentionally set the wrong regex ("jooooob") for deployment regex and leave the production regex empty. However, when I check the cicd_deployment_commits table, there're two records this time. Since the deployment regex doesn't match any job names or pipeline names, I expect this table to remain empty after this collection.

Screen Shot 2023-04-28 at 9 56 06 PM

  1. When I check the Azure DevOps transformation rules in the database, I notice that the deployment and production regex columns are empty.

Screen Shot 2023-04-28 at 8 51 48 AM

What do you expect to happen

See above

How to reproduce

See above

Anything else

No response

Version

main

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

type/bugThis issue is a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions