-
Notifications
You must be signed in to change notification settings - Fork 29
refactoring: Cleanup dependencies, port indexer utils, delete dead code. #61
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
Conversation
// MakeBlockDataFromValidatedBlock makes BlockData from agreement.ValidatedBlock | ||
func MakeBlockDataFromValidatedBlock(input types.ValidatedBlock) BlockData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conversion functions were used during the Indexer refactoring and can be removed now.
// getConfigFromDataDir Given the data directory, configuration filename and a list of types, see if | ||
// a configuration file that matches was located there. If no configuration file was there then an | ||
// empty string is returned. If more than one filetype was matched, an error is returned. | ||
// Copied from Indexer util.GetConfigFromDataDir | ||
func getConfigFromDataDir(dataDirectory string, configFilename string, configFileTypes []string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from Indexer util.GetConfigFromDataDir
.
// NameConfigPair is a generic structure used across plugin configuration ser/de | ||
type NameConfigPair struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all these simple types to data
to avoid circular dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but why didn't the codecov run show up? Do we not have codecov enabled for conduit?
@Eric-Warehime Thats strange, I wonder why the job passes. This is in the log:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the most recent CI runs, it seems like the codecov upload has been broken for a while. You don't need to fix that in this PR so I'm happy to approve as is and we can separately try to get that working again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. My only nit/question is why should conduit's config live in the data
package? I can see an argument that config
is a kind of data. Also, creating a new package just for it is inconvenient and we want to avoid packages bloat.
@tzaffi I agree with most of this, and expect to make a couple more followup changes. In particular:
|
thx for clarifying |
Summary
Cleanup code prior to breaking out plugin dependencies:
Test Plan
N/A - non functional changes.