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

Licensing of org.opensearch.core.common.logging.LoggerMessageFormat.java #9879

Closed
ker2x opened this issue Sep 7, 2023 · 6 comments · Fixed by #11069
Closed

Licensing of org.opensearch.core.common.logging.LoggerMessageFormat.java #9879

ker2x opened this issue Sep 7, 2023 · 6 comments · Fixed by #11069
Assignees
Labels
bug Something isn't working

Comments

@ker2x
Copy link
Contributor

ker2x commented Sep 7, 2023

While documenting code i noticed that :
libs/core/src/main/java/org/opensearch/core/common/logging/LoggerMessageFormat.java

is an almost identical copy of :
https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/helpers/MessageFormatter.java
which is under the MIT License.

It's pretty much a non-issue since, as far as i know, it's not forbidden by the MIT License. But i'm not a licensing expert.

This code have both elasticsearch and opensearch license header (both Apache 2.0)

I wanted to add this in the javadoc :

/**
 * Format string for OpenSearch log messages.
 * <p>
 * This class is almost a copy of {@code org.slf4j.helpers.MessageFormatter}<p>
 * The original code is licensed under the MIT License and is available at :
 * <a href="https://github.com/qos-ch/slf4j/blob/7c164fab8d54f823dd55c01a5a839c153f578297/slf4j-api/src/main/java/org/slf4j/helpers/MessageFormatter.java">MessageFormatter.java</a>
 *
 * @opensearch.internal
 */

but it's a little bit weird to have this in the javadoc and i'd appreciate some feedback.

Thank you.

@ker2x ker2x added bug Something isn't working untriaged labels Sep 7, 2023
@ker2x
Copy link
Contributor Author

ker2x commented Sep 12, 2023

added to #9976
The licensing issue in itself may or may not be a problem.

@dblock
Copy link
Member

dblock commented Sep 14, 2023

None of as are licensing experts, but I know someone who is. Let me figure out the right thing to do here.

@dblock dblock removed the untriaged label Sep 14, 2023
@dblock dblock self-assigned this Sep 14, 2023
@hyandell
Copy link
Contributor

hyandell commented Sep 29, 2023

Digging into this, it looks like there was a 2010 fork of code from sfl4j that went on quite a journey from there. Kudos to GitHub for letting me walk back through the codebases, this stuff gets ugly when you can't easily skip back along file renames :)

MIT doesn't add any additional conditions to OpenSearch (for example it's on the ASF's Category A list on https://www.apache.org/legal/resolved.html), but the original source header should have been maintained to the forked files.

Action item on me to propose a source header update.

@hyandell
Copy link
Contributor

hyandell commented Nov 2, 2023

Okay, here's the proposed license header:

/*
 * This code is based on code from SFL4J 1.5.11
 * Copyright (c) 2004-2007 QOS.ch
 * All rights reserved.
 * SPDX-License-Identifier: MIT
 */

The original commit that introduced this was elastic/elasticsearch@bda476e

While many files were affected then, it looks like https://github.com/opensearch-project/OpenSearch/blob/main/libs/core/src/main/java/org/opensearch/core/common/logging/LoggerMessageFormat.java is the descendant of these files today.

hyandell added a commit to hyandell/OpenSearch that referenced this issue Nov 2, 2023
Signed-off-by: Henri Yandell <hyandell@amazon.com>
peternied added a commit that referenced this issue Nov 2, 2023
* Adding slf4j license header per #9879

Signed-off-by: Henri Yandell <hyandell@amazon.com>
Signed-off-by: Henri Yandell <477715+hyandell@users.noreply.github.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
@dblock
Copy link
Member

dblock commented Nov 3, 2023

Thanks for PRing it @hyandell.

@ker2x
Copy link
Contributor Author

ker2x commented Nov 3, 2023

Nice ! thx !

rayshrey pushed a commit to rayshrey/OpenSearch that referenced this issue Mar 18, 2024
…roject#11069)

* Adding slf4j license header per opensearch-project#9879

Signed-off-by: Henri Yandell <hyandell@amazon.com>
Signed-off-by: Henri Yandell <477715+hyandell@users.noreply.github.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this issue Apr 25, 2024
…roject#11069)

* Adding slf4j license header per opensearch-project#9879

Signed-off-by: Henri Yandell <hyandell@amazon.com>
Signed-off-by: Henri Yandell <477715+hyandell@users.noreply.github.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants