Comments (5)
I think it's important to give this choice to the user. The need for automatic reindexing can vary from project to project.
Personally, I would like to enable automatic reindexing.
The easiest solution is to give a cli option like --auto-reindex
.
A more flexible solution can be to have this as a configuration in dipdup.yml
where people can even choose on which types of reindexing reasons (dipdup.enums.ReindexingReason
) they want to auto reindex.
from dipdup.
Thanks for the feedback, everybody!
We've ended up with a separate section in config. Something like this:
spec_version: ...
advanced:
postpone_jobs: true
early_realtime: true
skip_hasura: true
reindex:
# NOTE: Default action
_: raise
CONFIG_HASH_MISMATCH: auto
SCHEMA_HASH_MISMATCH: raise
MANUAL: ignore
Flags will be still in CLI having priority over config. It's not a final agreed solution tho.
from dipdup.
Hi and sorry for the late reply 🙏
Automatic reindexing is a complex question. There are seven reasons for reindexing (see dipdup.enums.ReindexingReason
), but in all cases except unprocessed "deep" rollback you can avoid reindexing if you want to. For example: you've made a typo in config, got CONFIG_HASH_MISMATCH
. Fixed config, run dipdup schema approve
, moving on. Plus, some users have discovered automatic wipe after looong hours of indexing and got really frustrated.
So, to sum things up. I definitely don't want reindexing to be automatic and unavoidable. But as you say, we need an option for people who want they deployments to be "unattended". What do you think about possible solutions?
from dipdup.
Hi no problem
I don't know if it's the best way to do it but I can think of one first / easy way:
a cli command to check if reindexing would be needed e.g. dipdup run --check-reindexing
which returns the reason or some default value
with that users would be able to write some small script to handle what should happen
If i'm not mistaking there are two ways to resolve the "reindexingrequired" state:
- schema approve ("ignore changes")
- schema wipe && schema export (use the changes)
from dipdup.
--auto-reindex
cli option would be great
from dipdup.
Related Issues (20)
- Improve last mile EVM synchronization algorithm
- Etherlink support
- Compatibility with Subsquid cloud
- Realtime messages from node stop arriving HOT 1
- Error creating new project HOT 3
- Don't use subprocess for datamodel-codegen
- Fix Sentry step in release pipeline
- Always expose Prometheus and /performance metrics
- Indexing EVM traces
- Indexing EVM transactions
- Rollback triggers exception when it should be ignore
- Prepared statement "__asyncpg_stmt_e__" does not exist HOT 1
- Add batch handler option in index HOT 1
- Publish docs to CF on a separate tag instead of `X.Y.Z` release ones
- HTTP and WS URLs should be optional for `evm.node` datasource
- Allow omitting `evm.subsquid` datasource in config
- Don't cache intermediate JSONSchemas during codegen
- Index with `node_only` still calls Subsquid
- `tezos.tzkt.head` doesn't process realtime queue
- Dots in typename should indicate nested packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dipdup.