Skip to content

build: remove timestamp from gRPC cache to prevent unnecessary pushes#3219

Merged
lklimek merged 4 commits into
v3.1-devfrom
fix/grpc-coverage-timestamp-churn
Mar 10, 2026
Merged

build: remove timestamp from gRPC cache to prevent unnecessary pushes#3219
lklimek merged 4 commits into
v3.1-devfrom
fix/grpc-coverage-timestamp-churn

Conversation

@lklimek

@lklimek lklimek commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

The check-grpc-coverage workflow committed and pushed on every run because save_cache() wrote datetime.now() into the last_updated field. Since the timestamp always differs, git diff always detected changes → commit → push → cancel-in-progress: true killed all sibling jobs. This caused CI instability on every PR touching the coverage workflow paths.

What was done?

  • Removed the last_updated timestamp field from save_cache() — the cache now only changes when actual query coverage changes
  • Removed from datetime import datetime (no longer needed)
  • Cleaned the last_updated field from grpc-queries-cache.json
  • Added cache_data.pop("last_updated", None) to strip legacy timestamps from existing caches

How Has This Been Tested?

  • Verified the script still runs correctly (cache read/write logic unchanged for known_queries)
  • The workflow's git diff --quiet check will now correctly report no changes when query coverage hasn't changed

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • Chores
    • Simplified the internal cache by removing timestamp tracking and related metadata.
    • Updated cache load/save behavior to persist only known queries, streamlining storage.
    • Minor non-functional comment added to a library file; no API or user-visible changes.

The `last_updated` timestamp in grpc-queries-cache.json changed on every
CI run, causing the workflow to commit and push even when no query
coverage actually changed. Combined with `cancel-in-progress: true`,
this killed all sibling jobs on each push.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added this to the v3.1.0 milestone Mar 10, 2026
@github-actions

github-actions Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

❌ gRPC Query Coverage Report

Total: 53 queries — 50 implemented, 2 ignored, 1 missing

❌ Missing

  • getTokenPreProgrammedDistributions (line 96)
⏭️ Ignored (@sdk-ignore) (2)
  • broadcastStateTransition — Write-only endpoint, not a query
  • getConsensusParams — Consensus params fetched via Tenderdash RPC
✅ Implemented (50)
  • getAddressInfo
  • getAddressesBranchState
  • getAddressesInfos
  • getAddressesTrunkState
  • getContestedResourceIdentityVotes
  • getContestedResourceVoteState
  • getContestedResourceVotersForIdentity
  • getContestedResources
  • getCurrentQuorumsInfo
  • getDataContract
  • getDataContractHistory
  • getDataContracts
  • getDocuments
  • getEpochsInfo
  • getEvonodesProposedEpochBlocksByIds
  • getEvonodesProposedEpochBlocksByRange
  • getFinalizedEpochInfos
  • getGroupActionSigners
  • getGroupActions
  • getGroupInfo
  • getGroupInfos
  • getIdentitiesBalances
  • getIdentitiesContractKeys
  • getIdentitiesTokenBalances
  • getIdentitiesTokenInfos
  • getIdentity
  • getIdentityBalance
  • getIdentityBalanceAndRevision
  • getIdentityByNonUniquePublicKeyHash
  • getIdentityByPublicKeyHash
  • getIdentityContractNonce
  • getIdentityKeys
  • getIdentityNonce
  • getIdentityTokenBalances
  • getIdentityTokenInfos
  • getPathElements
  • getPrefundedSpecializedBalance
  • getProtocolVersionUpgradeState
  • getProtocolVersionUpgradeVoteStatus
  • getRecentAddressBalanceChanges
  • getRecentCompactedAddressBalanceChanges
  • getStatus
  • getTokenContractInfo
  • getTokenDirectPurchasePrices
  • getTokenPerpetualDistributionLastClaim
  • getTokenStatuses
  • getTokenTotalSupply
  • getTotalCreditsInPlatform
  • getVotePollsByEndDate
  • waitForStateTransitionResult

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Removed timestamp tracking from the gRPC query cache: the last_updated field was deleted from the JSON cache file and all related handling (including the datetime import) was removed from the Python cache script; a minor comment was added in a Rust file.

Changes

Cohort / File(s) Summary
Cache JSON
.github/grpc-queries-cache.json
Deleted the last_updated field and trailing comma from the JSON cache object.
Cache script
.github/scripts/check-grpc-coverage.py
Removed last_updated usage from load_cache() and save_cache(); datetime import removed; default cache now omits timestamp.
Rust minor edit
packages/rs-dapi/src/lib.rs
Added a stray/dummy comment after public re-exports; no API or export changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibbled the timestamp, tidy and bright,
Now caches skip clocks and sleep through the night.
No tick, no tock, just queries that play,
A hop, a hop — simpler cache today! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The PR title 'build: remove timestamp from gRPC cache to prevent unnecessary pushes' accurately summarizes the main change: removing a timestamp field from the cache to eliminate unnecessary commit/push cycles in CI.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/grpc-coverage-timestamp-churn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lklimek lklimek changed the title fix(ci): remove timestamp from gRPC cache to prevent unnecessary pushes build remove timestamp from gRPC cache to prevent unnecessary pushes Mar 10, 2026
@lklimek lklimek had a problem deploying to test-suite-approval March 10, 2026 09:31 — with GitHub Actions Error
@lklimek lklimek had a problem deploying to test-suite-approval March 10, 2026 09:31 — with GitHub Actions Error
@lklimek lklimek changed the title build remove timestamp from gRPC cache to prevent unnecessary pushes build: remove timestamp from gRPC cache to prevent unnecessary pushes Mar 10, 2026
@lklimek

lklimek commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

@lklimek lklimek requested a review from shumkov March 10, 2026 09:33
This reverts commit c7d9391.

@shumkov shumkov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are you sure cache gonna work properly without timeout? I think what needs to be done is just don't update it if no changes right?

@lklimek lklimek had a problem deploying to test-suite-approval March 10, 2026 14:04 — with GitHub Actions Failure
@lklimek lklimek had a problem deploying to test-suite-approval March 10, 2026 14:04 — with GitHub Actions Failure
@lklimek

lklimek commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

Are you sure cache gonna work properly without timeout? I think what needs to be done is just don't update it if no changes right?

It's not read anywhere, only writes. At least, I don't see it when I grep in v3.1-dev ;).

ubuntu@dash:~/git/platform$ grep -R last_updated .github/
grep: .github/scripts/__pycache__/check-grpc-coverage.cpython-312.pyc: binary file matches
.github/scripts/check-grpc-coverage.py:    return {"known_queries": {}, "last_updated": None}
.github/scripts/check-grpc-coverage.py:    cache_data["last_updated"] = datetime.now().isoformat()
.github/grpc-queries-cache.json:  "last_updated": "2026-03-09T11:26:46.986561"

@shumkov shumkov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Okay!

@lklimek lklimek merged commit 6da48c0 into v3.1-dev Mar 10, 2026
9 of 12 checks passed
@lklimek lklimek deleted the fix/grpc-coverage-timestamp-churn branch March 10, 2026 21:48
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