Prevent multiple tasks from specifying the same gecko.v2 routes

RESOLVED FIXED

Status

task
RESOLVED FIXED
4 years ago
Last year

People

(Reporter: mshal, Assigned: mshal)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I'd like to prevent issues like bug 1214758 by checking for duplicate routes in taskcluster-graph. I limited this to the gecko.v2 namespace, since we expect that to be unique for a push.

This doesn't prevent buildbot builds from duplicating Taskcluster builds, but that issue will go away over time, and this will help make sure routes are unique as builds are ported over.
Here's the gecko decision task from a try push where this was forced to fail:

https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/Rjmdon6fTbWaVUfUsr_IhA/3/public/logs/live_backing.log
Assignee: nobody → mshal
Attachment #8673798 - Flags: review?(jopsen)
Comment on attachment 8673798 [details] [diff] [review]
0001-Bug-1214760-prevent-multiple-tasks-from-using-the-sa.patch

Review of attachment 8673798 [details] [diff] [review]:
-----------------------------------------------------------------

So this will check that two different tasks can't have the same route, right...

That is very awesome :)
I love sanity checks, but r+

We need stuff like this to keep guns away from peoples feet.

::: testing/taskcluster/mach_commands.py
@@ +429,5 @@
>  
>              define_task = DEFINE_TASK.format(build_task['task']['workerType'])
>  
> +            for route in build_task['task'].get('routes', []):
> +                if 'gecko.v2' in route and route in all_routes:

My python might be rusty but I think that:
  route.startswith('index.gecko.v2.')
is a tiny bit safer...
Attachment #8673798 - Flags: review?(jopsen) → review+
(In reply to Jonas Finnemann Jensen (:jonasfj) from comment #2)
> So this will check that two different tasks can't have the same route,
> right...
> 
> That is very awesome :)

Yep!

> ::: testing/taskcluster/mach_commands.py
> @@ +429,5 @@
> >  
> >              define_task = DEFINE_TASK.format(build_task['task']['workerType'])
> >  
> > +            for route in build_task['task'].get('routes', []):
> > +                if 'gecko.v2' in route and route in all_routes:
> 
> My python might be rusty but I think that:
>   route.startswith('index.gecko.v2.')
> is a tiny bit safer...

Ok, I'll switch to this.
https://hg.mozilla.org/mozilla-central/rev/81dca1244c52
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
See Also: → 1302804
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.