Skip to content

Fix heartbeat monitor and Slack notifications for nightly integration tests#3259

Merged
rickvdl merged 1 commit into
mainfrom
rickvdl/fix-ping-heartbeat-monitor
Mar 19, 2026
Merged

Fix heartbeat monitor and Slack notifications for nightly integration tests#3259
rickvdl merged 1 commit into
mainfrom
rickvdl/fix-ping-heartbeat-monitor

Conversation

@rickvdl

@rickvdl rickvdl commented Mar 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Move ping_heartbeat_monitor outside the NOTIFY_SLACK conditional so it always fires, regardless of whether Slack notifications are enabled
  • Quote the NOTIFY_SLACK environment variable in CircleCI config to ensure the boolean parameter renders as the string "true" that the Fastfile expects

Both issues were introduced in #3238 (Firebase to CircleCI emulator migration). The old code had no NOTIFY_SLACK gate — Slack and heartbeat always ran. The migration wrapped both in a conditional, and the heartbeat should not have been gated.


Note

Low Risk
Low risk CI/automation change affecting only nightly integration-test notifications; main risk is unintended extra heartbeat pings or Slack notifications if the env var is misinterpreted.

Overview
Fixes nightly purchases integration test observability by always calling ping_heartbeat_monitor in the run_purchases_integration_tests lane, instead of gating it behind NOTIFY_SLACK.

Updates CircleCI’s run-purchases-integration-tests job to quote the NOTIFY_SLACK parameter so Fastlane receives a string (e.g. "true") that matches the ENV['NOTIFY_SLACK'] == 'true' check.

Written by Cursor Bugbot for commit ba1ca00. This will update automatically on new commits. Configure here.

@rickvdl rickvdl added the pr:fix A bug fix label Mar 19, 2026
… tests

Move `ping_heartbeat_monitor` outside the `NOTIFY_SLACK` conditional so it
always fires, regardless of whether Slack notifications are enabled. Quote
the `NOTIFY_SLACK` environment variable in CircleCI config to ensure the
boolean parameter renders as the string "true" that the Fastfile expects.

Both issues were introduced in #3238 (Firebase to CircleCI emulator migration).
The old code had no `NOTIFY_SLACK` gate — Slack and heartbeat always ran. The
migration wrapped both in a conditional, and the heartbeat should not have been
gated.
@rickvdl rickvdl marked this pull request as ready for review March 19, 2026 06:59
@rickvdl rickvdl force-pushed the rickvdl/fix-ping-heartbeat-monitor branch from ddb4254 to ba1ca00 Compare March 19, 2026 06:59
@rickvdl rickvdl requested a review from a team as a code owner March 19, 2026 06:59

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense! Thanks for the fix!

@codecov

codecov Bot commented Mar 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.38%. Comparing base (e60c267) to head (ba1ca00).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3259   +/-   ##
=======================================
  Coverage   79.38%   79.38%           
=======================================
  Files         357      357           
  Lines       14347    14347           
  Branches     1959     1959           
=======================================
  Hits        11389    11389           
  Misses       2154     2154           
  Partials      804      804           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rickvdl rickvdl added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 7a29212 Mar 19, 2026
35 checks passed
@rickvdl rickvdl deleted the rickvdl/fix-ping-heartbeat-monitor branch March 19, 2026 08:35
Comment thread fastlane/Fastfile
github-merge-queue Bot pushed a commit that referenced this pull request Mar 26, 2026
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* [EXTERNAL] fix: ensure activity is attached before showing in-app
messages (#3274) contributed by @matteinn (#3275) via Toni Rico
(@tonidero)
* Ensure MediaPlayer has dedicated thread owner that is not the main
thread (#3148) via Jacob Rakidzich (@JZDesign)
* Fix heartbeat monitor and Slack notifications for nightly integration
tests (#3259) via Rick (@rickvdl)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* Feat: Restore gating in paywalls UI (#3171) via Jacob Rakidzich
(@JZDesign)

### 🔄 Other Changes
* security: pin GitHub Actions to SHA hashes (#3272) via Alfonso
Embid-Desmet (@alfondotnet)
* Bump activesupport from 8.0.2 to 8.0.4.1 (#3270) via dependabot[bot]
(@dependabot[bot])
* Merge release PR after deploy (#3269) via Antonio Pallares
(@ajpallares)
* Require PR approval before release tagging (#3268) via Antonio
Pallares (@ajpallares)
* Bump json from 2.18.1 to 2.19.2 (#3261) via dependabot[bot]
(@dependabot[bot])
* feat(ads): update admob sample app (#3264) via Peter Porfy
(@peterporfy)
* feat(ads): add vanilla-ad-tracker-sample (#3263) via Peter Porfy
(@peterporfy)
* [Purchase Tester]: Persist appUserId on login screen across app
launches (#3266) via Will Taylor (@fire-at-will)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Mostly release automation and versioning changes, but it modifies
CI/orb references and deploy/merge automation, which could affect the
release pipeline if misconfigured.
> 
> **Overview**
> Cuts the `9.28.0` release by removing `-SNAPSHOT` across version
sources (`.version`, `gradle.properties`, `Config.frameworkVersion`) and
updating sample/test-app dependency pins to `9.28.0`.
> 
> Updates release documentation: publishes Dokka docs to the `9.28.0` S3
path, updates `docs/index.html` redirect to `9.28.0`, and rolls
`CHANGELOG.latest.md` into a new `9.28.0` section in `CHANGELOG.md`.
> 
> Tweaks release tooling/CI: pins `fastlane-plugin-revenuecat_internal`
to a specific git ref (and bumps a few Ruby deps), switches the CircleCI
`revenuecat/sdks-common-config` orb to a dev commit, and adds a
temporary `test_merge_queue` workflow to exercise
`revenuecat/merge-release-pr` with `use_merge_queue: true`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5050888. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
github-merge-queue Bot pushed a commit that referenced this pull request Apr 16, 2026
## Summary
Slack notifications for daily integration tests weren't working since
#3242. This PR introduces a fix for that.

- Pass `notify_slack` as a Fastlane command-line option instead of a
CircleCI step-level environment variable
- The `NOTIFY_SLACK` env var approach (introduced in #3242, patched in
#3259) was unreliable due to CircleCI boolean parameter rendering in the
`environment` block
- Uses the same proven mechanism as `backend_environment` (Fastlane
option), which already works correctly

## Test plan
- [ ] Verify the `run-purchases-integration-tests-notify-slack-test` job
sends a Slack notification
- [ ] Revert the temp test commit before merging
- [ ] Verify nightly scheduled run sends Slack after merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small, localized CI/Fastlane wiring change that only affects whether
Slack notifications are sent after integration tests.
> 
> **Overview**
> Fixes Slack notifications for scheduled purchases integration tests by
passing `notify_slack` into the `run_purchases_integration_tests`
Fastlane lane as a command-line option from CircleCI, instead of relying
on a step-level `NOTIFY_SLACK` environment variable.
> 
> Updates the Fastlane lane to gate Slack result posting on
`options[:notify_slack]`, ensuring the workflow’s boolean parameter is
interpreted consistently.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f80ef44. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants