Skip to content

fix: slack message structure to two columns and include budget property#2942

Merged
sshanzel merged 3 commits intomainfrom
fix-missing-budget
Jul 23, 2025
Merged

fix: slack message structure to two columns and include budget property#2942
sshanzel merged 3 commits intomainfrom
fix-missing-budget

Conversation

@sshanzel
Copy link
Contributor

  • Made the Slack message structure to be two-columned.
  • Added budget property on the query.
  • Ensures spend and budget to be integer.

@pulumi
Copy link

pulumi bot commented Jul 23, 2025

🍹 The Update (preview) for dailydotdev/api/prod (at 0cd4697) was successful.

Resource Changes

    Name                                            Type                           Operation
~   vpc-native-update-views-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-calculate-top-readers-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-hourly-notification-cron             kubernetes:batch/v1:CronJob    update
+   vpc-native-api-migration-dad711e3               kubernetes:batch/v1:Job        create
~   vpc-native-personalized-digest-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron         kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-recommendations-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron   kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-tag-view-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment       kubernetes:apps/v1:Deployment  update
-   vpc-native-api-migration-1c241105               kubernetes:batch/v1:Job        delete
~   vpc-native-clean-zombie-images-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-daily-digest-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                        kubernetes:apps/v1:Deployment  update
~   vpc-native-validate-active-users-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-update-source-public-threshold-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron           kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                        kubernetes:apps/v1:Deployment  update
~   vpc-native-private-deployment                   kubernetes:apps/v1:Deployment  update
~   vpc-native-update-tags-str-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron       kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-users-cron              kubernetes:batch/v1:CronJob    update

Comment on lines +188 to +189
spend: Math.floor(usdToCores(parseFloat(spend))),
budget: Math.floor(usdToCores(parseFloat(budget))),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need Math.floor when Cores is already integer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, forgot that we do it already from the function already. My bad, PTSD from the previous issue 🤣

type: 'mrkdwn',
text: concatTextToNewline(
'*Budget:*',
`${Math.floor(usdToCores(parseFloat(campaign.budget)))} :cores:`,
Copy link
Contributor

Choose a reason for hiding this comment

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

also here

@sshanzel sshanzel requested a review from capJavert July 23, 2025 14:13
@sshanzel sshanzel merged commit 26c9b1d into main Jul 23, 2025
10 checks passed
@sshanzel sshanzel deleted the fix-missing-budget branch July 23, 2025 14:19
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.

2 participants