Rule to set automatic renewal for allocations#366
Merged
Conversation
91e9245 to
9bdd42e
Compare
fordN
requested changes
Feb 23, 2022
| number: expiredAllocations.length, | ||
| expiredAllocations: expiredAllocations.map(allocation => allocation.id), | ||
| }) | ||
| if (rule?.autoRenewal) { |
Contributor
There was a problem hiding this comment.
What do you think about merging this with the conditional that is one level up?
So it would be something like:
if (rule?.autoRenewal && expiredAllocation.length > 0) {...
Contributor
Author
There was a problem hiding this comment.
The reason I kept them separate was for the log info below. Do you think the message is useful? If not, I can merge them :)
Contributor
There was a problem hiding this comment.
Nice, ok. Let's leave it in.
Yeah, I think it's useful. It allows an indexer to see why their allocations aren't being reallocated to.
f79a590 to
df7db6a
Compare
df7db6a to
af64366
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In addition to the feature to configure
allocationLifetime, we also add the featureautoRenewalto indicate to the indexer agent if it should re-allocate to a particular deployment when it expires.All the existing rules are given the default
true. If you want to stop indexing a subgraph once it expires, useindexer-clito setautoRenewalto false.