Skip to content

fix(test): suppress InteractionManager deprecation warning in CI logs#3816

Merged
grimen merged 1 commit into
mainfrom
fix/3813-interactionmanager-warning-ci
Jun 3, 2026
Merged

fix(test): suppress InteractionManager deprecation warning in CI logs#3816
grimen merged 1 commit into
mainfrom
fix/3813-interactionmanager-warning-ci

Conversation

@grimen

@grimen grimen commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3813.

Every suite that renders a navigator (or otherwise touches InteractionManager) re-triggers React Native's InteractionManager has been deprecated warning once per test file (warnOnce dedupes per module registry, and Jest resets the registry per file), flooding Concourse/CI logs with repeated warning + stack-trace noise.

Changes

  • jest.setup.js (new): wraps console.warn and drops only messages matching InteractionManager has been deprecated — and only when CI is set, so the deprecation stays visible in local dev runs. All other warnings pass through untouched.
  • jest.config.js: registers the setup file via setupFilesAfterEnv (re-applied per test file, so it survives Jest's per-file module resets).
  • ci/pipeline.yml: adds params: { CI: true } to the Concourse test-unit task. GitHub Actions sets CI=true automatically, but Concourse deliberately does not expose build-metadata env vars to task containers (Access metadata from task concourse/concourse#790), so it must be set explicitly — same convention the build tasks already use.

Why not fix the root cause instead

  • @react-navigation v7 (current, latest stable) still uses InteractionManager; it is only removed in v8, which is alpha-only today and a breaking migration.
  • The app's own app/screens/transaction-history/transaction-history-screen.tsx also calls InteractionManager.runAfterInteractions directly, so a react-navigation upgrade alone would not silence the warning.

That migration is real future-proofing work but out of scope for this CI-log cleanup; it can be tracked separately.

Test plan

  • Local run (no CI): warning still visible — yarn test __tests__/screens/transaction-history-screen.spec.tsx → 1 occurrence, tests pass
  • CI=true run: warning suppressed — same spec → 0 occurrences, tests pass
  • CI=false behaves like local (warning visible)
  • Filter is surgical: a non-matching console.warn still prints under CI=true; only the InteractionManager message is dropped
  • Full suite with CI=true: 0 InteractionManager has been deprecated occurrences across all suites; 142 suites pass — the single failure (__tests__/components/blink-card/blink-card.spec.tsx, locale/env-dependent "12/ 28" expectation) fails identically on untouched main
  • ci/pipeline.yml still parses as valid YAML (ytt #@ lines are comments)

🤖 Generated with Claude Code

Every suite that renders a navigator (or touches InteractionManager)
re-triggers React Native's "InteractionManager has been deprecated"
warnOnce per test file, flooding Concourse/CI logs with repeated
warning + stack-trace noise.

Add a jest.setup.js that filters only this warning from console.warn,
gated on CI=true so the deprecation stays visible in local dev runs.
GitHub Actions sets CI=true automatically; the Concourse test-unit
task does not expose build metadata env vars to tasks, so set
"CI: true" explicitly via task params, matching the existing build
task convention in ci/pipeline.yml.

The root-cause migration (react-navigation v8 drops InteractionManager;
transaction-history-screen still calls it directly) is tracked
separately - v8 is alpha-only today.

Closes #3813

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@grimen grimen marked this pull request as draft June 3, 2026 17:28
@grimen grimen marked this pull request as ready for review June 3, 2026 17:36
@grimen grimen requested a review from esaugomez31 June 3, 2026 17:37
@grimen grimen merged commit 2eaa7a2 into main Jun 3, 2026
6 of 8 checks passed
@grimen grimen deleted the fix/3813-interactionmanager-warning-ci branch June 3, 2026 20:29
@openoms

openoms commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@grimen applied the ci change from here so Concourse adds the CI=true env:

./ci/repipe
Updating pipeline @ ciblink
could not find a valid token.
logging in to team 'dev'

navigate to the following URL in your browser:

  https://ci.blink.sv/login?fly_port=57809

target saved
jobs:
  job test-unit has changed:
  name: test-unit
  plan:
  - in_parallel:
      steps:
      - get: repo
        trigger: true
      - get: bundled-deps
        trigger: true
      - get: pipeline-tasks
  - config:
      image_resource:
        name: ""
        source:
          password: ((docker-creds.password))
          repository: us.gcr.io/galoy-org/galoy-mobile-pipeline
          username: ((docker-creds.username))
        type: registry-image
      inputs:
      - name: bundled-deps
      - name: pipeline-tasks
      - name: repo
+     params:
+       CI: "true"
      platform: linux
      run:
        path: pipeline-tasks/ci/tasks/test-unit.sh
    task: test-unit
  
pipeline name: blink-mobile

apply configuration? [yN]: y
configuration updated
unpaused 'blink-mobile'

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.

fix(test): Deprecation warning floods Concourse/CI logs with gibberish: InteractionManager (via @react-navigation/stack)

3 participants