mozilla / shield-studies-addon-utils

Mozilla Public License 2.0
7 stars 21 forks source link

Discuss the future of this repo and the template repo #294

Open motin opened 5 years ago

motin commented 5 years ago

For ongoing discussion.

With the upcoming in-tree support for add-on study lifecycle handling and the normandyAddonStudy Web Extension API, there will be no need for the lifecycle handling code that builds up the bulk of this repository.

However, when that code is gone, there are plenty of unprivileged utility functions that are likely to be useful for add-on study extension authors, including construction of survey urls, handling expiration / slumber, sending and verifying study telemetry down specific pipelines/schemas, handling errors, improve logging, run automated tests, help QA etc.

Also, authors probably may benefit of a well-documented best practice example/template/boilerplate/generator for properly setting up branch-specific builds, functional/unit tests, CI etc using the proper tooling - something that can be used without having built previous add-on studies.

Where and how should we house and develop that kind of utility code and example/template/boilerplate/generator?

We could keep this repo as it is (just drastically clean up it's contents), even rename it to reflect the new paradigm (addon-study-utils? normandy-addon-study-utils?), but we could also decouple and split this repo into use-case-specific helper libraries as necessary, ie one for study telemetry, one for logging, one for QA helpers etc.

As for a example/template/boilerplate/generator, I am hoping that we can convert the current template (but supposedly rename it to normandy-addon-study-example/template/boilerplate/generator) to reflect the new paradigm.

Ping @mythmon @rehandalal

motin commented 4 years ago

As expected, using the built-in Normandy support and basing study add-ons on the new official example has made about 90% of the previous addon-utils and template obsolete.

With the recent release of V6 of the addon-utils (https://github.com/mozilla/shield-studies-addon-utils/pull/297), all lifecycle-handling and other obsolete code has been dropped, leaving only helpful utils and patterns that neither the Normandy WebExtension API nor the Nextgen study example currently provides.

That said, my suggestion is to find even more modern implementations for the missing features, so that this repo becomes obsolete in its entirety.

The old template is now deprecated and instead study authors are recommended to use the Nextgen study example.