Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions syz-cluster/kernel-disk/fetch-kernels-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ kind: CronWorkflow
metadata:
name: fetch-kernels-cron
spec:
# Twice each day.
schedule: "0 */12 * * *"
# Three times per day.
schedule: "0 */8 * * *"
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 0
workflowSpec:
Expand Down
6 changes: 5 additions & 1 deletion syz-cluster/kernel-disk/fetch-kernels-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
- "-c"
- |
cd /repo.git
if [ -f "packed-refs.lock" ]; then
echo "Found stale 'packed-refs.lock' at start. Removing it."
rm -f packed-refs.lock
fi
if [ ! -d "refs" ]; then
git init --bare
fi
Expand All @@ -71,4 +75,4 @@ spec:
git remote remove ${NAME} || true
git remote add ${NAME} ${REPO}
git fetch ${NAME} ${BRANCH} --tags "+refs/heads/*:refs/heads/${NAME}/*" "+refs/tags/*:refs/tags/${NAME}/*"
git tag -f ${NAME}-head ${NAME}/${BRANCH}
git log -1 --format="%h %an %ad %s" ${NAME}/${BRANCH}
2 changes: 1 addition & 1 deletion syz-cluster/pkg/triage/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewGitTreeOps(dir string, sandbox bool) (*GitTreeOps, error) {

func (ops *GitTreeOps) HeadCommit(tree *api.Tree) (*vcs.Commit, error) {
// See kernel-disk/cron.yaml.
return ops.Git.Commit(tree.Name + "-head")
return ops.Git.Commit(tree.Name + "/" + tree.Branch)
}

func (ops *GitTreeOps) Commit(treeName, commitOrBranch string) (*vcs.Commit, error) {
Expand Down
8 changes: 4 additions & 4 deletions syz-cluster/pkg/triage/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ func TestGitTreeOpsHead(t *testing.T) {
osutil.WriteFile(filepath.Join(baseDir, "file.txt"), []byte("Some content"))
repo.Git("add", "file.txt")
head1 := repo.CommitChange("first head")
repo.SetTag("mainline-head")
repo.SetTag("mainline/main")
osutil.WriteFile(filepath.Join(baseDir, "file.txt"), []byte("Another content"))
repo.Git("add", "file.txt")
head2 := repo.CommitChange("second head")
repo.SetTag("second-head")
repo.SetTag("second/main")
// Verify that the right commits are queried.
ops, err := NewGitTreeOps(baseDir, false)
assert.NoError(t, err)
commit, err := ops.HeadCommit(&api.Tree{Name: "mainline"})
commit, err := ops.HeadCommit(&api.Tree{Name: "mainline", Branch: "main"})
assert.NoError(t, err)
assert.Equal(t, head1.Hash, commit.Hash)
commit, err = ops.HeadCommit(&api.Tree{Name: "second"})
commit, err = ops.HeadCommit(&api.Tree{Name: "second", Branch: "main"})
assert.NoError(t, err)
assert.Equal(t, head2.Hash, commit.Hash)
}
Expand Down
4 changes: 2 additions & 2 deletions syz-cluster/workflow/rebuild-kernels-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ kind: CronWorkflow
metadata:
name: rebuild-kernels-cron
spec:
# Twice each day.
schedule: "30 */12 * * *"
# Three times per day.
schedule: "30 */8 * * *"
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 0
workflowSpec:
Expand Down