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

indexer-common,indexer-agent: Include reason for actions being added to queue #461

Merged
merged 2 commits into from Aug 18, 2022

Conversation

fordN
Copy link
Contributor

@fordN fordN commented Aug 13, 2022

With the ultimate goal of including meaningful reason strings for each action added to the actions queue a number of changes have been made in this PR.

The process of resolving which deployments are worth allocating towards has been updated to now result in an array of allocation decisions with length equal to the number of subgraph deployments on the network, including both toAllocate and not toAllocate decisions (rather than an array of only subgraph ids to allocate to).

AllocationDecision {
  declare deployment: SubgraphDeploymentID
  declare toAllocate: boolean
  declare ruleMatch: RuleMatch
  }

In addition, the process of resolving allocation actions has been updated. reconcileAllocations and reconcileDeploymentAllocations have been replaced with reconcileActions,reconcileDeploymentActions and in the process been simplified and allowed for concurrency in reconciling many actions.

A few more structural changes have also been made to move some network querying functions into the NetworkMonitor.

- Store matching rule and activation criteria when deciding if
deployment worth allocating towards
- Improve clarity of reconciliation logic
- Store more detailed action reasons in actions queue
- Fix indexer-service server test
@fordN
Copy link
Contributor Author

fordN commented Aug 15, 2022

Resolves #445

@fordN fordN requested a review from hopeyen August 15, 2022 20:13
@fordN fordN self-assigned this Aug 15, 2022
@fordN fordN requested a review from tilacog August 17, 2022 18:48
Copy link
Contributor

@hopeyen hopeyen left a comment

Choose a reason for hiding this comment

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

LGTM!

@fordN fordN linked an issue Aug 18, 2022 that may be closed by this pull request
@fordN fordN merged commit 43757da into main Aug 18, 2022
@fordN fordN deleted the ford/update-deployment-reconcile branch August 18, 2022 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action queue improvements: Store reason for every action added to queue
2 participants