Skip to content

fix: TestShell_BeforeNode db leakage#21504

Draft
erikburt wants to merge 8 commits intodevelopfrom
fix/db-leakage-shell-local
Draft

fix: TestShell_BeforeNode db leakage#21504
erikburt wants to merge 8 commits intodevelopfrom
fix/db-leakage-shell-local

Conversation

@erikburt
Copy link
Collaborator

@erikburt erikburt commented Mar 11, 2026

Changes

Notes

  • In TestShell_BeforeNode we are trying to use txdb driver so the changes are not actually persisted/leaked to other tests
    • However, when calling app.Before(c) it ignores any preexisting config set on the Shell object. Defaulting the driver to pgx which causes db leakage, which resulted in csa_test.go failling as it was expecting a clean keystore
    • Adding newAppWithOpts and allow the opts object to actually set the driver, does allow for txdb driver, but that comes with other issues.
  • The current solution in this PR (newAppWithOpts) does work locally when running only the core/cmd package.
    • There's something else at play when we run the full suite in CI which causes these tests to timeout.
    • Although, it's also failing for the "go core integration tests` pipeline
  • Running with locally -race also breaks some more tests in the same package

Testing

https://github.com/smartcontractkit/chainlink/actions/runs/22979409950/job/66715662324?pr=21504

@erikburt erikburt self-assigned this Mar 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

✅ No conflicts with other open PRs targeting develop

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@trunk-io
Copy link

trunk-io bot commented Mar 12, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
15.11% Technical Debt Ratio on New Code (required ≤ 4%)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

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.

1 participant