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

Fix #240: Avoid duplicated list of facilities #290

Merged
merged 2 commits into from Jan 16, 2018
Merged

Conversation

hsanjuan
Copy link
Collaborator

This puts some sanity in this. It's not super correct (name of facilities
depend of the component and the main cluster component should not hard
code them), but it's clear enough. Imho, better than over-engineering
a more elegant approach.

License: MIT
Signed-off-by: Hector Sanjuan code@hector.link

@hsanjuan hsanjuan self-assigned this Jan 11, 2018
@ghost ghost added the status/in-progress In progress label Jan 11, 2018
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5c864a1 on fix/240-logging into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d63e931 on fix/240-logging into ** on master**.

ZenGround0
ZenGround0 previously approved these changes Jan 12, 2018
Copy link
Collaborator

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

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

Looks good. One comment presents an idea about organizing the repository that probably extends beyond the scope of this PR. If you agree with my thoughts there and want to implement those changes in this PR that's great, but if you disagree or would rather hold off I am good with merging this as it is.

logging.go Outdated

// LoggingFacilitiesExtra provides logging identifiers
// used in ipfs-cluster dependencies, which may be useful
// for to display. Along with their default value.
Copy link
Collaborator

Choose a reason for hiding this comment

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

little typo: "for to display"

nodebug.go Outdated
@@ -2,14 +2,13 @@

package ipfscluster

// This is our default logs levels
// These are our default log levels
Copy link
Collaborator

Choose a reason for hiding this comment

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

A general comment about nodebug, silent, debug, and logging: is it possible to put them somewhere a little more cohesive than simply in the main ipfscluster directory? Until right now I hadn't put it together that all these files were part of the logging system and think it would aid people understanding the codebase to somehow group them better. I can believe right now that they need to be part of ipfscluster and each use init functions so as it stands they can't be put into a single file or put into a subfolder. Maybe it doesn't need to happen in this PR, but if you agree then maybe we could open an issue for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, I have realized that it is possible to pass flags to tests just like any executable. This nodebug etc files were just a hack to get such behaviour from long ago. I'll complete the PR getting rid of them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, how is looking now?

ZenGround0
ZenGround0 previously approved these changes Jan 15, 2018
Copy link
Collaborator

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

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

Awesome LGTM

This puts some sanity in this. It's not super correct (name of facilities
depend of the component and the main cluster component should not hard
code them), but it's clear enough. Imho, better than over-engineering
a more elegant approach.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan
Copy link
Collaborator Author

Hmm I broke something, travis loops over and over the same tests

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan
Copy link
Collaborator Author

@ZenGround0 made changes to coverage.sh. Will need another approval.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 72.8% when pulling bfdd597 on fix/240-logging into e596c09 on master.

@hsanjuan hsanjuan merged commit 7ea011f into master Jan 16, 2018
@ghost ghost removed the status/in-progress In progress label Jan 16, 2018
@hsanjuan hsanjuan deleted the fix/240-logging branch January 16, 2018 14:10
@hsanjuan hsanjuan mentioned this pull request Jan 17, 2018
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.

None yet

3 participants