Open Bug 1953641 Opened 1 year ago Updated 1 month ago

TriggerActionSchemas test is out of date, validating only the triggers in CFRMessageProvider

Categories

(Firefox :: Messaging System, task, P1)

task
Points:
3

Tracking

()

ASSIGNED
Iteration:
155.2 - Aug 1 - Aug 12

People

(Reporter: aminomancer, Assigned: aminomancer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Any trigger that's in ASRouterTriggerListeners has to be in the trigger action doc for this test to pass, but really all triggers should be documented anyway, even the ones that call sendTriggerMessage directly. And we seem to be succeeding on that front. But as for the schema itself, it's falling out of date.

In theory this test is supposed to fail if there's a message with a trigger that's not accounted for in the schema. But because the test only validates the triggers used in CFRMessageProvider, and we don't use that provider anymore, we've effectively lost coverage on the schema.

Instead of validating CFRMessageProvider, which is basically frozen in time, we should validate OnboardingMessageProvider and PanelTestProvider. Those providers are used routinely, more regularly updated, so more likely to contain the current stable of triggers. It would be nice to add NimbusRolloutMessageProvider and InflightAssetsMessageProvider, but since we remotely deploy messages to old versions, it's possible they won't validate in current versions if something in the schema changes.


Further, I think it would be wise to change test_trigger_docs so that it doesn't only validate the triggers that have proper listeners. There are other triggers that are invoked without a listener, by calling ASRouter.sendTriggerMessage. It wouldn't be realistic to search the codebase to find those instances dynamically. While we could maintain a list of those triggers in the test, the point of this test is to stop engineers from landing a patch if they forgot to document their new trigger. So it's already assuming that the engineer forgot the doc. And if they forgot the documentation, it's even more likely that they'd forget to manually add the trigger to this obscure test.

So it makes sense to use some kind of heuristic that can find the trigger even if the engineer forgot to add any of the supporting docs. There isn't really a foolproof way to do that, but it seems the best option within reason is to concatenate all the trigger listeners with all the unique trigger ids found in the aforementioned providers. That gives us the most complete list of trigger ids. And we should be using that list not just to check if the trigger has a doc, but also to check if the trigger has a schema.

Assignee: nobody → shughes
Status: NEW → ASSIGNED
Iteration: --- → 138.2 - Mar 17 - Mar 28
Points: --- → 3
Priority: -- → P1
Iteration: 138.2 - Mar 17 - Mar 28 → 139.1 - Mar 31 - Apr 11
Iteration: 139.1 - Mar 31 - Apr 11 → 139.2 - Apr 14 - Apr 25
Iteration: 139.2 - Apr 14 - Apr 25 → 140.1 - Apr 28 - May 9
Iteration: 140.1 - Apr 28 - May 9 → 140.2 - May 12 - May 23
Iteration: 140.2 - May 12 - May 23 → 141.1 - May 26 - Jun 6
Iteration: 141.1 - May 26 - Jun 6 → 141.2 - Jun 9 - Jun 20
Iteration: 141.2 - Jun 9 - Jun 20 → 142.1 - Jun 23 - Jul 4
Iteration: 142.1 - Jun 23 - Jul 4 → 142.2 - Jul 7 - Jul 18
Iteration: 142.2 - Jul 7 - Jul 18 → 143.1 - Jul 21 - Aug 1
Iteration: 143.1 - Jul 21 - Aug 1 → 143.2 - Aug 4 - Aug 15
Iteration: 143.2 - Aug 4 - Aug 15 → 144.1 - Aug 18 - Aug 29
Iteration: 144.1 - Aug 18 - Aug 29 → 144.2 - Sep 1 - Sep 12
Iteration: 144.2 - Sep 1 - Sep 12 → 145.1 - Sep 15 - Sep 26
Iteration: 145.1 - Sep 15 - Sep 26 → 145.2 - Sep 29 - Oct 10
Iteration: 145.2 - Sep 29 - Oct 10 → 146.1 - Oct 13 - Oct 24
Iteration: 146.1 - Oct 13 - Oct 24 → 146.2 - Oct 27 - Nov 7
Iteration: 146.2 - Oct 27 - Nov 7 → 147.1 - Nov 10 - Nov 21
Iteration: 147.1 - Nov 10 - Nov 21 → 147.2 - Nov 24 - Dec 5
Iteration: 147.2 - Nov 24 - Dec 5 → 148.1 - Dec 8 - Dec 19
Iteration: 148.1 - Dec 8 - Dec 19 → 148.2 - Dec 22 - Jan 2
Iteration: 148.2 - Dec 22 - Jan 2 → 148.3 - Jan 5 - Jan 9
Iteration: 148.3 - Jan 5 - Jan 9 → 149.1 - Jan 12 - Jan 23
Iteration: 149.1 - Jan 12 - Jan 23 → 149.2 - Jan 26 - Feb 6
Iteration: 149.2 - Jan 26 - Feb 6 → 149.3 - Feb 9 - Feb 20
Iteration: 149.3 - Feb 9 - Feb 20 → 150.1 - Feb 23 - March 6
Iteration: 150.1 - Feb 23 - March 6 → 150.2 - March 9 - March 20
Iteration: 150.2 - March 9 - March 20 → 151.1 - March 23 - April 3
Iteration: 151.1 - March 23 - April 3 → 151.2 - April 6 - April 17
Iteration: 151.2 - April 6 - April 17 → 152.1 - Apr 20 - May 3
Iteration: 152.1 - Apr 20 - May 3 → 152.2 - May 4 - May 17
Iteration: 152.2 - May 4 - May 17 → 153.1 - May 18 - May 31
Iteration: 153.1 - May 18 - May 31 → 153.2 - June 1 - June 14
Iteration: 153.2 - June 1 - June 14 → 154.1 - June 15 - July 3
Iteration: 154.1 - June 15 - July 3 → 154.2 - July 4 - July 19
Iteration: 154.2 - July 4 - July 19 → 155.1 - July 20 - July 31
Iteration: 155.1 - July 20 - July 31 → 155.2 - Aug 1 - Aug 12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: