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

Instance stats service composition root #6029

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jan 24, 2024

About the changes

Ability to create a dependency graph of the instance stats service in one method call. This PR shows high coupling to 10+ stores we have in this part of the code.

Important files

Discussion points

Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 25, 2024 7:48am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 25, 2024 7:48am

@@ -20,7 +33,7 @@ afterAll(async () => {
});

test('should return instance statistics', async () => {
stores.featureToggleStore.create('default', {
await stores.featureToggleStore.create('default', {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missing await

{
experimental: {
flags: {
strictSchemaValidation: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missing schema validation

@@ -97,6 +98,7 @@ export default async function init(
getLogger,
});

log.setLogLevel('error');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

stop logging db migration messages in all tests

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! This was something I was planning to do yesterday 🥇

Copy link
Contributor

@daveleek daveleek left a comment

Choose a reason for hiding this comment

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

Nice one! Yeah that's a lot of dependencies 😅

@@ -97,6 +98,7 @@ export default async function init(
getLogger,
});

log.setLogLevel('error');
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! This was something I was planning to do yesterday 🥇

Comment on lines +306 to +308
const instanceStatsService = db
? createInstanceStatsService(db, config)
: createFakeInstanceStatsService(config);
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat!

@kwasniew kwasniew merged commit 41351a6 into main Jan 25, 2024
12 checks passed
@kwasniew kwasniew deleted the instance-stats-service-composition-root branch January 25, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants