-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update indexer environment to support mainnet and redwood #131
Comments
Hey team! Please add your planning poker estimate with Zenhub @ryanchristo @wgwz |
I was thinking about this some more and I think we can do it in a way where groups-ui can still use the single graphql client connected to the indexer API. I think with some adjustments to the latest code in the indexer, we can having the production indexer, index mainnet and redwood. We will need to adjust this Which in turn would get passed to: Currently the indexer only instantiates one
Instead of having one
Each row would represent a chain that we want the indexer to run against. The reason this could work nicely is because the indexer data model uses a unique id called As shown above, the This means that we wouldn't have to instantiate a whole new graphql client each time we toggle the chain in the groups-ui. Thoughts? |
I agree with running a process for redwood and mainnet using the same indexer deployment and database. It was designed for this purpose and we can prune indexed redwood state as needed to avoid unnecessary storage expenses. I guess we would use the same URL in production for both mainnet and redwood and therefore may only need one variable for the two but maybe we should consider adding I think we still want to prepare for multiple graphql endpoints in the case where a network is added and we are not hosting the data but someone from that network is (and they use our indexer to run a process specifically for their chain, making it available within our deployment of the groups ui). From the groups-ui perspective, we just need to make sure we maintain support multiple networks, which is how the groups-ui was designed, and whether we use the same indexer deployment and database for both regen mainnet and redwood testnet is something we can further discuss but maybe to start we can continue towards updating the configuration. |
I'll take an initial crack at what I was originally thinking and then maybe we can further discuss. |
Rough idea is there: #139 We could consolidate the regen environment variable (or maybe better to leave separate so we have options when testing) but the general idea is there. This way we continue leveraging chain information specific to each chain. |
We might even want to consider removing the environment variables if they are the same for each environment (i.e. local, staging, and production). In some cases you may still want to swap them out though so maybe we could have defaults in place in the code so we don't have to worry about setting them correctly in staging and production. Thinking out loud a bit. |
@wgwz whatever we decide here, let's open an issue in the indexer to discuss the adjustments you mentioned above. I think this is the right direction for managing indexing for regen mainnet and redwood testnet. |
@ryanchristo the approach in your PR looks good to me so far, it conceptually it makes sense how you're going about it and why. no strong opinion about having the environment variables or not since we'll effectively always have these endpoints configured in code with this approach (unless i'm misunderstanding). open to seeing those cleaned up however you think it makes sense. |
Ref: #112 (comment)
As a followup to #112, we should improve our QA testing setup and deployment pipeline to make indexed proposals on both mainnet and redwood available in both staging and production environments. Currently we have a single environment variable for setting the graphql endpoint that we set separate in staging and production environments.
The groups ui was designed to switch between networks and we should make sure we have full support for indexed proposals (endpoints in place at least) within the groups ui. If we add networks and those networks require a different endpoint (someone else is hosting the indexed proposals), the groups ui should be configurable to support an endpoint specific to the network.
The text was updated successfully, but these errors were encountered: