Conversation
|
🍹 The Update (preview) for dailydotdev/api/prod (at 347aede) was successful. Resource Changes Name Type Operation
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-clickhouse-migration-3f21c5bd kubernetes:batch/v1:Job create
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-3f21c5bd kubernetes:batch/v1:Job create
~ vpc-native-post-analytics-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-clickhouse-migration-79c660ba kubernetes:batch/v1:Job delete
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
- vpc-native-api-db-migration-79c660ba kubernetes:batch/v1:Job delete
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
|
capJavert
left a comment
There was a problem hiding this comment.
Nice improvements, few comments
| // message.data is typed as MatchedCandidate | ||
| const { data } = message; | ||
| }, | ||
| parseMessage: (message) => { |
There was a problem hiding this comment.
we need to say that adding parseMessage is required if data is protobuf or from @dailydotdev/schema, linter also warns
There was a problem hiding this comment.
The note above already mentions it. but I'll push a clarification in couple places
|
|
||
| const worker: ExperimentWorker = { | ||
| subscription: 'api.experiment-allocated', | ||
| handler: async (message, con, logger, pubsub, experimentAllocationClient) => { |
There was a problem hiding this comment.
make sure it calls experimentAllocationClient.waitForSend before exiting the worker logic so that allocation client sends the allocation to GB
| // For legacy Worker instances | ||
| export const workers: Worker[] = [ | ||
| // ... existing workers | ||
| ]; |
There was a problem hiding this comment.
Basically never use this array, we only support typed workers moving forward
| ### Integration Testing | ||
|
|
||
| Test workers in isolation: | ||
| Tests use a real database connection (reset before each test run). Create tests in `__tests__/workers/`: |
There was a problem hiding this comment.
data is cleared after each test run
Co-authored-by: Ante Barić <ante@kickass.website>
No description provided.