Skip to content

chore: add copy-cache command #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2025
Merged

chore: add copy-cache command #120

merged 2 commits into from
Apr 22, 2025

Conversation

thelostone-mc
Copy link
Contributor

@thelostone-mc thelostone-mc commented Apr 21, 2025

🤖 Linear

Merge after 1st reindex is done with strategyTiming cache

Description

Checklist before requesting a review

  • I have conducted a self-review of my code.
  • I have conducted a QA.
  • If it is a core feature, I have included comprehensive tests.

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation

    • Updated documentation to include the strategy_timings cache table in the blue-green database deployment process.
  • Chores

    • Added strategy_timings to the list of cache tables managed during migration operations.
    • Expanded tracked database tables in Hasura configuration to include price_cache.
    • Updated tests to reflect changes in tracked cache tables.

Copy link

coderabbitai bot commented Apr 21, 2025

📝 Walkthrough

Walkthrough

The changes expand the set of cache tables managed during blue-green database deployments. Specifically, documentation in the migration scripts was updated to include the strategy_timings table alongside the existing price_cache and metadata_cache tables in the cache data copy operation. The description of the cache tables now mentions that strategy_timings stores strategy timings fetched from contract calls. In the code, the CACHE_TABLES constant was updated to include strategy_timings as a third element in the array. Additionally, the string "price_cache" was added to the array of tables tracked by the Hasura metadata configuration in the relevant script. In the end-to-end test verifying GraphQL schema metadata, the list of unexpected types was updated by removing "pricecache" and adding "strategy_timings". No other logic, procedural steps, or exported entities were altered beyond these additions.

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5a2aa6 and 86b25c8.

📒 Files selected for processing (2)
  • scripts/hasura-config/src/index.ts (1 hunks)
  • tests/e2e/test/scenarios/baseSetup.spec-e2e.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/hasura-config/src/index.ts
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.ts`:

**/*.ts:

  • tests/e2e/test/scenarios/baseSetup.spec-e2e.ts
⏰ Context from checks skipped due to timeout of 300000ms (1)
  • GitHub Check: e2e-tests / E2E Tests
🔇 Additional comments (1)
tests/e2e/test/scenarios/baseSetup.spec-e2e.ts (1)

159-165: LGTM! Change aligns with the new cache table configuration.

The addition of "strategy_timings" to the unexpectedTypes array correctly updates the test to verify that this cache table is not exposed in the public GraphQL schema. This change is consistent with the PR objective of adding the "copy-cache" command and extending the set of managed cache tables.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@thelostone-mc thelostone-mc force-pushed the chore/update-copy-cache branch from a5a2aa6 to 86b25c8 Compare April 21, 2025 06:47
@thelostone-mc thelostone-mc merged commit 748a198 into dev Apr 22, 2025
8 checks passed
@thelostone-mc thelostone-mc deleted the chore/update-copy-cache branch April 22, 2025 04:55
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