Skip to content

fix(ci+cache): decouple package tests from integration jobs; prevent CM cache refresh storms#2324

Merged
cmgrote merged 3 commits intomainfrom
dependencies
Mar 12, 2026
Merged

fix(ci+cache): decouple package tests from integration jobs; prevent CM cache refresh storms#2324
cmgrote merged 3 commits intomainfrom
dependencies

Conversation

@cmgrote
Copy link
Collaborator

@cmgrote cmgrote commented Mar 12, 2026

Summary

  • CI fix: Remove integration-test from the needs of asset-import-test and package-test. The dependency was purely for sequencing but caused GitHub to re-run all package test jobs when only a single integration test was re-run via "Rerun failed jobs".

  • Cache fix: Track attribute IDs that are confirmed missing in a deletedAttrIds set on CustomMetadataCache. Subsequent lookups for the same unknown attribute ID return NotFoundException immediately without triggering another forceRefresh(). The set is cleared on each full cache refresh so newly-created attributes are not permanently blacklisted.

    This prevents the refresh storm observed during adoption-export where large numbers of IndistinctAsset results contained empty custom metadata attributes with unknown IDs — each miss was triggering a full API cache rebuild.

Test plan

  • Push branch and trigger a test run; manually fail one integration test — use "Rerun failed jobs" and confirm only that matrix job re-runs (not asset-import-test or package-test)
  • Run ./gradlew test to confirm no regressions in deserialization unit tests
  • Run adoption-export package tests and compare runtime before/after

🤖 Generated with Claude Code

cmgrote and others added 2 commits March 12, 2026 23:07
Remove integration-test from the needs of asset-import-test and
package-test. The dependency was purely for sequencing but caused
GitHub to re-run all package test jobs when only an integration
test was re-run via "Rerun failed jobs".

fix(cache): prevent repeated CM cache refreshes for unknown attribute IDs

Track attribute IDs that are confirmed missing in a deletedAttrIds
set on CustomMetadataCache. Subsequent lookups for the same unknown
attribute return NotFoundException immediately without triggering
another forceRefresh(). The set is cleared on each full cache refresh
so newly-created attributes are not permanently blacklisted.

This prevents the refresh storm observed during adoption-export when
large numbers of IndistinctAsset results contained empty custom
metadata attributes with unknown IDs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Chris (He/Him) <cgrote@gmail.com>
Signed-off-by: Chris (He/Him) <cgrote@gmail.com>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@cmgrote cmgrote enabled auto-merge March 12, 2026 23:16
@cmgrote cmgrote merged commit 777f702 into main Mar 12, 2026
7 checks passed
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