зеркало из https://github.com/mozilla/treeherder.git
Bug 1646753 - Increase size of job_type.name field (#6539)
This commit is contained in:
Родитель
2db10f02b2
Коммит
60fa75d4ee
|
@ -117,7 +117,7 @@ properties:
|
|||
title: 'Job Name'
|
||||
type: 'string'
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
maxLength: 140
|
||||
groupName:
|
||||
title: 'Group Name'
|
||||
type: 'string'
|
||||
|
|
|
@ -149,6 +149,25 @@ def test_ingest_pulse_jobs(
|
|||
] == logs_expected
|
||||
|
||||
|
||||
def test_ingest_pulse_job_with_long_job_type_name(
|
||||
pulse_jobs, test_repository, push_stored, failure_classifications, mock_log_parser
|
||||
):
|
||||
"""
|
||||
Ingest a job through the JSON Schema validated JobLoader used by Pulse
|
||||
"""
|
||||
job = pulse_jobs[0]
|
||||
jl = JobLoader()
|
||||
revision = push_stored[0]["revision"]
|
||||
job["display"][
|
||||
"jobName"
|
||||
] = "this is a very long string that exceeds the 100 character size that was the previous limit by just a little bit"
|
||||
job["origin"]["revision"] = revision
|
||||
jl.process_job(job, 'https://firefox-ci-tc.services.mozilla.com')
|
||||
|
||||
jobs = Job.objects.all()
|
||||
assert len(jobs) == 1
|
||||
|
||||
|
||||
def test_ingest_pending_pulse_job(
|
||||
pulse_jobs, push_stored, failure_classifications, mock_log_parser
|
||||
):
|
||||
|
|
|
@ -192,8 +192,8 @@ def buildMessage(pushInfo, task, runId, payload):
|
|||
# for treeherder
|
||||
"jobSymbol": str(treeherderConfig["symbol"]),
|
||||
"groupSymbol": treeherderConfig.get("groupSymbol", "?"),
|
||||
# Maximum job name length is 100 chars...
|
||||
"jobName": task["metadata"]["name"][0:99],
|
||||
# Maximum job name length is 140 chars...
|
||||
"jobName": task["metadata"]["name"][0:139],
|
||||
},
|
||||
"state": stateFromRun(jobRun),
|
||||
"result": resultFromRun(jobRun),
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Generated by Django 3.0.7 on 2020-06-18 17:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('model', '0018_delete_jobdetail'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='jobtype', name='name', field=models.CharField(max_length=140),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='referencedatasignatures',
|
||||
name='job_type_name',
|
||||
field=models.CharField(db_index=True, max_length=140),
|
||||
),
|
||||
]
|
|
@ -365,7 +365,7 @@ class OptionCollection(models.Model):
|
|||
class JobType(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
symbol = models.CharField(max_length=25, default='?', db_index=True)
|
||||
name = models.CharField(max_length=100)
|
||||
name = models.CharField(max_length=140)
|
||||
description = models.TextField(blank=True)
|
||||
|
||||
class Meta:
|
||||
|
@ -401,7 +401,7 @@ class ReferenceDataSignatures(models.Model):
|
|||
machine_architecture = models.CharField(max_length=25, db_index=True)
|
||||
job_group_name = models.CharField(max_length=100, blank=True, db_index=True)
|
||||
job_group_symbol = models.CharField(max_length=25, blank=True, db_index=True)
|
||||
job_type_name = models.CharField(max_length=100, db_index=True)
|
||||
job_type_name = models.CharField(max_length=140, db_index=True)
|
||||
job_type_symbol = models.CharField(max_length=25, blank=True, db_index=True)
|
||||
option_collection_hash = models.CharField(max_length=64, blank=True, db_index=True)
|
||||
build_system_type = models.CharField(max_length=25, blank=True, db_index=True)
|
||||
|
|
Загрузка…
Ссылка в новой задаче