Stabilize golang integration tests
What does this MR do?
- Centralize golang project fixtures - with-tracking should only differ in expectations and use shared codebase
- Fix flaky custom-ruleset-synthesis test
Fix flaky custom-ruleset-synthesis test
The upstream project we utilize in our synthesis test uses multiple rule with identical IDs. This gets parsed by semgrep and the last write wins. It's still unclear to me how the order remains inconsistent but there's likely some race-condition occurring internally when rules are processed in parallel:
- https://github.com/dgryski/semgrep-go/blob/b14e2f07411c22cadaab3a5d7df2346a99e7b36d/nilerr.yml#L2
- https://github.com/dgryski/semgrep-go/blob/b14e2f07411c22cadaab3a5d7df2346a99e7b36d/returnnil.yml#L2
The simplest fix is to drop one of the two rules, so I did so in a fork of the original project. I'll be opening a separate PR to remove the duplication but for now my fork should be stable.
What are the relevant issue numbers?
gitlab-org/gitlab#336821 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Zach Rice