Skip to content

Vdb 1528 decouple diff transforming#131

Merged
elizabethengelman merged 12 commits intostagingfrom
vdb-1528-decouple-diff-transforming
Sep 9, 2020
Merged

Vdb 1528 decouple diff transforming#131
elizabethengelman merged 12 commits intostagingfrom
vdb-1528-decouple-diff-transforming

Conversation

@elizabethengelman
Copy link
Copy Markdown

@elizabethengelman elizabethengelman commented Aug 25, 2020

companion transformers PR: sky-ecosystem/vdb-mcd-transformers#277

Copy link
Copy Markdown

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

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

LGTM!

Main thing I'm noodling on is how to manage multiple execute processes in the future (e.g. if we also want to look at unwatched diffs)

cmd/execute.go Outdated
go watchEthStorage(&sw, &wg)
}

if len(ethStorageInitializers) > 0 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pretty minor but we could probably combine these operations if they have the same predicate, right?

cmd/execute.go Outdated
}

if len(ethStorageInitializers) > 0 {
storageHealthCheckMessage := []byte("storage watcher for unrecognized diffs starting\n")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This will probably need to happen in a separate PR against vdb-mcd-transformers (and get updated by tech ops in the deploy), but I imagine we'll want to update the health check to check for both messages

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think that the transformers PR should take care of checking for the both message: https://github.com/makerdao/vdb-mcd-transformers/pull/277/files#diff-015ae56a7505cbe6e703b68709ad40e1. I'm not sure what we would need to have tech ops change though 🤔

cmd/root.go Outdated
SubCommand string
cfgFile string
databaseConfig config.Database
newDiffBlockFromHeadOfChain int64
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

would it make sense to declare this with unrecognizedDiffBlockFromHeadOfChain?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, good call. I had put it in the execute cmd file, but having it in root.go would be more consistent.

StorageDiffRepository: storageDiffRepository,
DiffBlocksFromHeadOfChain: backFromHeadOfChain,
StatusWriter: statusWriter,
DiffStatus: diffStatusToWatch,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

not sure if this would make things less clear but I wonder if we could directly pass the function that should be called to get diffs, instead of a flag

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🤔 I really like this idea. I may hold off, and do it as part of a new PR/story. I think it will require a bit of reworking since the GetNewDiffs and GetUnrecognizedDiffs are methods on the diffRepository which the execute command doesn't know about. Open to thoughts on how to get around this without a bunch of reworking how the repository works!

@elizabethengelman elizabethengelman force-pushed the vdb-1528-decouple-diff-transforming branch from 36a88fc to b1beab2 Compare September 9, 2020 17:03
@elizabethengelman elizabethengelman merged commit f8ff707 into staging Sep 9, 2020
@elizabethengelman elizabethengelman deleted the vdb-1528-decouple-diff-transforming branch September 9, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants