From 6f7be11fa1dfb7538af54ffafd1cc644d3975a1d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Nov 2019 14:05:14 +0100 Subject: dashboard/app: don't report bisections pointing to release commits They should have been detected by "same binary" logic. But the problem is that we may use different compilers for different commits and they switch exactly at release commits. So we can build the release with a differnet compiler than the rest of commits and then obviously it won't be "same binary". Detect release commits separately. Update #1271 --- pkg/vcs/git.go | 12 ++++++++++++ pkg/vcs/vcs.go | 2 ++ 2 files changed, 14 insertions(+) (limited to 'pkg/vcs') diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go index 5a6de4b3f..a42f12edc 100644 --- a/pkg/vcs/git.go +++ b/pkg/vcs/git.go @@ -476,3 +476,15 @@ func (git *git) previousReleaseTags(commit string, self bool) ([]string, error) tags = append(tags, tags1...) return tags, nil } + +func (git *git) IsRelease(commit string) (bool, error) { + tags1, err := git.previousReleaseTags(commit, true) + if err != nil { + return false, err + } + tags2, err := git.previousReleaseTags(commit, false) + if err != nil { + return false, err + } + return len(tags1) != len(tags2), nil +} diff --git a/pkg/vcs/vcs.go b/pkg/vcs/vcs.go index 777f0f7e7..ea4e1d0ad 100644 --- a/pkg/vcs/vcs.go +++ b/pkg/vcs/vcs.go @@ -64,6 +64,8 @@ type Bisecter interface { // PreviousReleaseTags returns list of preceding release tags that are reachable from the given commit. PreviousReleaseTags(commit string) ([]string, error) + IsRelease(commit string) (bool, error) + EnvForCommit(binDir, commit string, kernelConfig []byte) (*BisectEnv, error) } -- cgit mrf-deployment