aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-11-27 14:05:14 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-11-27 14:05:14 +0100
commit6f7be11fa1dfb7538af54ffafd1cc644d3975a1d (patch)
tree2c5e659127245a15b559ecc1dcda66cacbfbac6c /pkg/vcs
parent9f5fd6fe1a3835945ce119f2b5d3633d3b81ff61 (diff)
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
Diffstat (limited to 'pkg/vcs')
-rw-r--r--pkg/vcs/git.go12
-rw-r--r--pkg/vcs/vcs.go2
2 files changed, 14 insertions, 0 deletions
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)
}