Skip to content

Conversation

@fordN
Copy link
Contributor

@fordN fordN commented Nov 11, 2022

This PR contains various improvements to code clarity and robustness. Along with some code clarity updates and an added retry loop for epoch subgraph queries, it aims to reduce noise in logs and the action queue by adding a few delays and duplicate action protections.

Changes included

  • Do not add action to queue if identical action was recently successful
  • Do not add action to queue if identical action failed within last 15 minutes
  • Retry epoch subgraph queries
  • Improve clarity of code to add offchain subgraphs to targetDeployments
  • Improve ActionManager.fetchActions() and include tests for filtering on the updatedAt field.
  • Improve code clarity and logging on failed indexing status queries

@fordN fordN requested a review from hopeyen November 11, 2022 19:02
@fordN
Copy link
Contributor Author

fordN commented Nov 11, 2022

@cryptovestor21 this PR should resolve the issue you reported on discord of actions being "eagerly" added to the queue just after they were executed successfully.

@trader-payne this should help with issues you saw where temporary network/compute issues lead to failed epoch subgraph queries which in turn led to failed unallocate or reallocate actions.

@fordN fordN force-pushed the ford/prevent-duplicate-actions branch from 359eee1 to cc9fee6 Compare November 16, 2022 11:41
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 💯

- Do not add action to queue if identical action was recently successful
- Do not add action to queue if identical action failed within last
15 minutes
- Use retries for epoch subgraph queries (5 attempts)
- Improve clarity of code to add offchain subgraphs to targetDeployments
- Improve ActionManager.fetchActions
- Improve code clarity and logging on failed indexing status query
@fordN fordN force-pushed the ford/prevent-duplicate-actions branch from cc9fee6 to eeb89d5 Compare November 29, 2022 21:30
@fordN fordN merged commit 67655eb into main Nov 29, 2022
@fordN fordN deleted the ford/prevent-duplicate-actions branch November 29, 2022 23:07
@fordN fordN self-assigned this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

3 participants