Skip to content

Commit 973b099

Browse files
committed
CFbot integration
This adds our own custom replication between the CFbot and the commitfest app. We currently keep the last CFbot runs in our database, in an attempt to keep the queries easy and efficient. The CFbot results are now shown on the overview page of each commitfest, as well as on the page for each specific patch.
1 parent 398593f commit 973b099

15 files changed

+304
-4
lines changed

media/commitfest/css/commitfest.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,7 @@ div.form-group div.controls input.threadpick-input {
6565
#annotateMessageBody.loading * {
6666
display: none;
6767
}
68+
69+
.cfbot-summary img {
70+
margin-top: -3px;
71+
}
Lines changed: 4 additions & 0 deletions
Loading

media/commitfest/new_failure.svg

Lines changed: 5 additions & 0 deletions
Loading

media/commitfest/new_success.svg

Lines changed: 4 additions & 0 deletions
Loading

media/commitfest/old_failure.svg

Lines changed: 5 additions & 0 deletions
Loading

media/commitfest/old_success.svg

Lines changed: 4 additions & 0 deletions
Loading

media/commitfest/running.svg

Lines changed: 4 additions & 0 deletions
Loading

media/commitfest/waiting_to_start.svg

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Generated by Django 3.2.25 on 2024-10-31 22:53
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('commitfest', '0005_history_dateindex'),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='CfbotBranch',
16+
fields=[
17+
('patch', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='cfbot_branch', serialize=False, to='commitfest.patch')),
18+
('branch_id', models.IntegerField()),
19+
('branch_name', models.TextField()),
20+
('commit_id', models.TextField(blank=True, null=True)),
21+
('apply_url', models.TextField()),
22+
('status', models.TextField(choices=[('testing', 'Testing'), ('finished', 'Finished'), ('failed', 'Failed'), ('timeout', 'Timeout')])),
23+
('created', models.DateTimeField(auto_now_add=True)),
24+
('modified', models.DateTimeField(auto_now=True)),
25+
],
26+
),
27+
migrations.CreateModel(
28+
name='CfbotTask',
29+
fields=[
30+
('id', models.TextField(primary_key=True, serialize=False)),
31+
('task_name', models.TextField()),
32+
('branch_id', models.IntegerField()),
33+
('position', models.IntegerField()),
34+
('status', models.TextField(choices=[('CREATED', 'Created'), ('NEEDS_APPROVAL', 'Needs Approval'), ('TRIGGERED', 'Triggered'), ('EXECUTING', 'Executing'), ('FAILED', 'Failed'), ('COMPLETED', 'Completed'), ('ABORTED', 'Aborted'), ('ERRORED', 'Errored')])),
35+
('created', models.DateTimeField(auto_now_add=True)),
36+
('modified', models.DateTimeField(auto_now=True)),
37+
('patch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cfbot_tasks', to='commitfest.patch')),
38+
],
39+
),
40+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.2.25 on 2024-12-06 08:38
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('commitfest', '0006_cfbot_integration'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='cfbottask',
15+
name='status',
16+
field=models.TextField(choices=[('CREATED', 'Created'), ('NEEDS_APPROVAL', 'Needs Approval'), ('TRIGGERED', 'Triggered'), ('EXECUTING', 'Executing'), ('FAILED', 'Failed'), ('COMPLETED', 'Completed'), ('SCHEDULED', 'Scheduled'), ('ABORTED', 'Aborted'), ('ERRORED', 'Errored')]),
17+
),
18+
]

0 commit comments

Comments
 (0)