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

refactor: Consolidate datafile-manager package into optimizely-sdk #781

Merged
merged 12 commits into from
Sep 23, 2022

Conversation

ozayr-zaviar
Copy link
Contributor

@ozayr-zaviar ozayr-zaviar commented Aug 31, 2022

Summary

Integrated Datafile Manager package with Optimizely SDK to remove external dependency.

Test plan

All existing unit tests and FSC tests pass.

Jira

[FSSDK-8205]

@mikechu-optimizely
Copy link
Contributor

Sorry about all the code collisions @ozayr-zaviar 😬

@coveralls
Copy link

coveralls commented Sep 21, 2022

Coverage Status

Coverage decreased (-2.6%) to 93.462% when pulling e427567 on uzair/consolidate-datafile-manager into 1a20b08 on master.

Copy link
Contributor

@zashraf1985 zashraf1985 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Suggested a few minor changes. Can you update lock file version to 2.

@@ -23,7 +23,7 @@ module.exports = {
plugins: ['karma-mocha', 'karma-webpack', require('karma-browserstack-launcher')],

webpack: {
mode: 'production',
mode:'development',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change needed?

@@ -23,7 +23,7 @@ module.exports = {
plugins: ['karma-mocha', 'karma-webpack', require('karma-browserstack-launcher')],

webpack: {
mode: 'production',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you revert it back if it works?

}
return new HttpPollingDatafileManager(datafileManagerConfig);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix end of line

Comment on lines 25 to 34
// console.log(datafileManager.HttpPollingDatafileManager, {
// autoUpdate: true,
// datafileAccessToken: 'THE_TOKEN',
// updateInterval: 5000,
// urlTemplate: 'http://example.com',
// sdkKey: 'SDK_KEY',
// })
sandbox.stub(datafileManager,'HttpPollingDatafileManager')
// sandbox.stub(datafileManager.HttpPollingDatafileManager, 'NodeDatafileManager')
// sandbox.stub(datafileManager, 'NodeDatafileManager')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unneeded commented code.

}
return new HttpPollingDatafileManager(datafileManagerConfig);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix end of line

@zashraf1985 zashraf1985 marked this pull request as ready for review September 23, 2022 16:51
@zashraf1985 zashraf1985 requested a review from a team as a code owner September 23, 2022 16:51
Copy link
Contributor

@zashraf1985 zashraf1985 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Great!

@zashraf1985 zashraf1985 merged commit 346f2c0 into master Sep 23, 2022
@zashraf1985 zashraf1985 deleted the uzair/consolidate-datafile-manager branch September 23, 2022 17:59
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

Successfully merging this pull request may close these issues.

None yet

4 participants