-
Notifications
You must be signed in to change notification settings - Fork 112
feat: enrichment notification #3444
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
Conversation
|
🍹 The Update (preview) for dailydotdev/api/prod (at 6c12b6a) was successful. Resource Changes Name Type Operation
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-db-migration-16802ef9 kubernetes:batch/v1:Job create
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ 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-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-clickhouse-migration-88d6aeb6 kubernetes:batch/v1:Job delete
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-opportunities-cron kubernetes:batch/v1:CronJob update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-post-analytics-history-day-clickhouse-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-api-clickhouse-migration-16802ef9 kubernetes:batch/v1:Job create
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
- vpc-native-api-db-migration-88d6aeb6 kubernetes:batch/v1:Job delete
+ api-sub-api.experience-company-enriched-notification gcp:pubsub/subscription:Subscription create
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-user-profile-updated-sync-cron kubernetes:batch/v1:CronJob update
|
src/common/typedPubsub.ts
Outdated
| experienceId: string; | ||
| userId: string; | ||
| experienceTitle: string; | ||
| experienceType: UserExperienceType; | ||
| companyId: string; | ||
| companyName: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you maybe want to just do userId, experienceId and companyId and then query the data from DB in worker, easier to maintain then sending the name and actual data that can become stale.
|
@claude can you look at the comments and address them |
|
Claude finished @capJavert's task in 3m 19s —— View job Addressing Review CommentsI've successfully addressed @capJavert's review feedback by refactoring the PubSub topic to follow the general-purpose pattern outlined in the codebase guidelines. Tasks:
Changes MadePubSub Topic (
Worker (
CDC Trigger (
Tests (
This follows the codebase best practice: "PubSub topics should be general-purpose: Topics should contain only essential identifiers... Subscribers fetch their own data." --- | Branch |
- Updated PubSub schema to only include userId, experienceId, companyId - Worker now fetches experience and company data from database - Updated tests to save fixtures and query for actual IDs - Follows best practice: topics contain only essential identifiers Co-authored-by: Ante Barić <capJavert@users.noreply.github.com>
@claude please fix the failing tests. |
|
Claude finished @AmarTrebinjac's task in 2m 48s —— View job Fixed Failing TestsTasks:
Root CauseThe test was failing due to a non-deterministic database query. The fixture includes two work experiences for userId '1':
The original query Fix AppliedUpdated the query to be deterministic by adding an additional filter: const savedExperience = await con
.getRepository(UserExperience)
.findOne({
where: {
userId: '1',
type: UserExperienceType.Work,
endedAt: null, // ← Ensures we get the current position
},
});This ensures the test always retrieves the current work experience ("Senior Software Engineer"), making the test deterministic and preventing future failures. Changes Committed
The tests should now pass consistently in CI. --- | | Branch |
The test was failing because there are two work experiences for userId '1', and findOneBy was non-deterministic. Now we explicitly query for the current work experience (endedAt: null) to ensure we get the correct fixture. Co-authored-by: Amar Trebinjac <AmarTrebinjac@users.noreply.github.com>
No description provided.