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 #9504

Closed
data-sync-user opened this issue Jun 21, 2021 · 2 comments
Closed

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

data-sync-user opened this issue Jun 21, 2021 · 2 comments

Comments

@data-sync-user
Copy link
Collaborator

data-sync-user commented Jun 21, 2021

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

@data-sync-user
Copy link
Collaborator Author

➤ Vijay Budhram commented:

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 constructorwhen 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?

@cknowles-admin
Copy link

FxA is no longer synchronizing all issues between Jira and Github. We are closing open issues and will selectively synchronize in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants