Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move content-server experiment base logic into fxa-shared #3170

Closed
vbudhram opened this issue Oct 29, 2019 · 1 comment
Closed

Move content-server experiment base logic into fxa-shared #3170

vbudhram opened this issue Oct 29, 2019 · 1 comment
Labels
maintenance Orphaned Temporary label for transitioning to jira cloud

Comments

@vbudhram
Copy link
Contributor

vbudhram commented Oct 29, 2019

While working on #2595, I didn't want to duplicate the experiment grouping logic found in the content-server to the auth-server.

I think it makes sense to pull this base class into fxa-shared and reused in both services. However, I still think the experiment rules should still live in the respective services.

┆Issue is synchronized with this Jira Task
┆Issue Number: FXA-497

@vbudhram
Copy link
Contributor Author

As mentioned in #3183, I was not able to move over the base experiment.

If you pull down that PR and change

to be

const BaseGroupingRule = require('../../../../../../fxa-shared/dist/experiments/base');

It should have in theory worked because it is loading the same javascript file. However, you will get an interesting error

Uncaught TypeError: BaseGroupingRule is not a constructor

when you try to load the content-sever webpage. After some searching it seems to be related to babel/babel#9367. Babel seems to fail loading the class that is outside the project causing the extends not to work correctly.

I tried updating our webpack config to ['@babel/preset-env', {modules: false}] since some posters said that worked for them, but it didn't work for us. If someone has some better webpack and babel chops is there anything obvious that I could be missing here?

vbudhram added a commit that referenced this issue Oct 30, 2019


Connect with #3170

Unfortunately, I was not able to 100% move the base experiment in content-server over to our fxa-shared project. Please see the linked issue for the different things I tried.

To spare my sanity I opted to update the experiment file to typecript and pull over the same tests from content-server.

This should be enough for me to build out the experiment parts needed in the auth-server and finish #2595.
@clouserw clouserw removed this from the Train 151: FxA milestone Nov 25, 2019
@vbudhram vbudhram removed their assignment Jan 13, 2020
@dannycoates dannycoates added the Orphaned Temporary label for transitioning to jira cloud label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Orphaned Temporary label for transitioning to jira cloud
Projects
None yet
Development

No branches or pull requests

4 participants