Skip to content
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

Fix: Have TzKt.Api do more retries for Database Schema before failing #1612

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

ac10n
Copy link
Contributor

@ac10n ac10n commented Dec 9, 2022

🌮 Taqueria PR

🪁 Description

When we start the Sandbox, four containers start:

  • The Flextesa Sandbox
  • Postgres
  • TzKt.Sync that reads from the sandbox and updates postgres
  • TzKt.Api that reads from postgres and serves API calls.

After starting, TzKt.sync will apply the database schema to postgres. TzKt.Api keeps checking this schema to make sure it can work with that document. It does this 30 times. This has been enough for their own setup (on a server, where they can start them separately and wait for sync to apply the schema) and on my machines.
But on some machines, this is not enough.

So here is our solution:

  • On our version of TzKt we increase that to 120.
  • Open a ticket on their repo to read that from settings (which can then be overriden in environment variables)
  • When they merge that and release a .net 7 image, switch to their image and use the env to override this value

🪂 Pre-Merge Checklist (Definition of Done)

🚦 Required to merge:

  • ⛱️ I have completed this PR template in full and updated the title appropriately
  • ⛵ My code builds cleanly, and I have manually tested the changes
  • 🏄‍♂️ Another team member has built this branch and done manual testing on the change
  • 🏖️ New and existing unit tests pass locally and in CI
  • 🔱 The test plan has been implemented and verified by an SDET
  • 🦀 Automated tests have been written and added to this PR
  • 🐬 I have commented my code, particularly in hard-to-understand areas
  • 🤿 Corresponding changes have been made to all documentation
  • 🐚 Required changes to the VScE have been made
  • 🪸 Required updates to scaffolds have been made
  • 🚢 The release checklist has been completed

🛩️ Summary of Changes

We release TzKt images in Ecad labs docker hub account and used it here

🎢 Test Plan

Please describe the testing strategy and plan for this PR. Keep this lightweight and anticipate any testing challenges

🛸 Type of Change

  • 🧽 Chore ➾
  • 🛠️ Fix ➾ Have TzKt.Api do more retries for Database Schema before failing
  • ✨ Feature ➾
  • 👷 Refactor ➾
  • 🧪 Pre-Release ➾
  • 🚀 Release ➾

@ac10n ac10n requested a review from a team December 9, 2022 21:31
@ac10n ac10n force-pushed the more-retries-in-tzkt-api-2 branch from 77191fc to aab09c5 Compare December 9, 2022 21:32
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: aab09c5
Status: ✅  Deploy successful!
Preview URL: https://ddbf79c2.taqueria.pages.dev
Branch Preview URL: https://more-retries-in-tzkt-api-2.taqueria.pages.dev

View logs

@ac10n ac10n merged commit f3fdcb0 into prerelease-0.25.0 Dec 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants