Open Bug 1340503 Opened 8 years ago Updated 3 years ago

FailureLine should have a foreign key to Job rather than freeform repository/job_guid fields

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: emorley, Unassigned)

References

Details

Currently... class FailureLine(models.Model): ... id = models.BigAutoField(primary_key=True) job_guid = models.CharField(max_length=50) repository = models.ForeignKey(Repository) job_log = models.ForeignKey(JobLog, null=True) ... Ignoring the data-consistency aspect, this makes data expiration more of a pain, since cycle_data has to keep track of the job_guid+repository combos deleted, to also expire these from FailureLine in another pass, when otherwise it could just do a simple Django .delete(). James, since adding the new job_id column is going to be expensive, would you be open to rolling this into other changes you are making? (We can just add the column at first with null=True and then backfill in our own time)
Flags: needinfo?(james)
I am not, right now, making any changes to FailureLine. I think we should make this change when we remove the autoclassify related columns from FailureLine, which depends on finally landing the schema changes as part of the rewrite.
Flags: needinfo?(james)
Ah I mis-remembered. Happy to leave this until that happens :-)
See Also: → 1347721
Component: Treeherder → Treeherder: Log Parsing & Classification
Assignee: james → nobody
Assignee: nobody → cdawson
Priority: P2 → P3
Assignee: cdawson → nobody
Component: Treeherder: Log Parsing & Classification → TreeHerder
You need to log in before you can comment on or make changes to this bug.