-
Notifications
You must be signed in to change notification settings - Fork 534
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
refactor: migrate to viper configure manage #1946
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
I remember that the license of a dependency of
viper
was not compatible with Apache 2.0, please confirm.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.
Hi, @nic-chen. I'm sorry for the slow response.
I used
google/go-licenses
to generate a list of thespf13/viper
's dependencies and licenses.Include Apache-2.0, MIT, MPL-2.0, BSD-2-Clause and BSD-3-Clause.
And these licenses are also used in current Manager API 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.
I'm not sure about
MPL-2.0
, @moonming please have a look, thanks.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.
Description
Viper
library uses the API ofhashicorp/hcl
open source repository usingMPL-2.0
license, but does not use its code directly.Solution
If importing a library using
MPL-2.0
license is not feasible, I will consider implementing a shim code and replacing it withgo mod replace
. It emulates the API of that library and provides empty results.It's like the following image.
So is such a solution feasible?
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.
I searched the go project under apache, and many projects also use viper
for example:
https://github.com/apache/skywalking-banyandb
https://github.com/apache/camel-k
I have no problem here.
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.
MPL-2.0 maybe can NOT in apache projects: https://www.apache.org/legal/resolved.html
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.
Hi, @moonming. Sorry to bother you again.
I have read this specification https://www.apache.org/legal/resolved.html and made a query in JIRA, I found the following discussion, LEGAL-562: Handling dependency licenses for the Solr Operator, a go project.
I think our situation is similar to that in the article. We do not include the code under the MPL-2.0 license in the code distribution. The code is downloaded by the user during the compilation process. In the docker image involving binary distribution (It belongs to class B in the specification, and we can distribute it using binary), we should modify the
LICENSE
andNOTICE
files and include them in the image as a reminder. Just like these project, apache/skywalking-banyandb.usage eg. in apache/skywalking-banyandb
https://github.com/apache/skywalking-banyandb/blob/c6314fe15b56143836e8969bd756a1310779b3b0/go.mod#L20
If we really can't include the dependencies of this library, can the above scheme of replacing the dependent library code with shim? here
🤔 What do you think of this? Thx.
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.
ping @moonming Any changes here?
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.
Having a dependency with a Category B license is fine