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

Clean up derivative works #120

Open
6 of 11 tasks
chadwhitacre opened this issue Mar 20, 2023 · 10 comments
Open
6 of 11 tasks

Clean up derivative works #120

chadwhitacre opened this issue Mar 20, 2023 · 10 comments

Comments

@chadwhitacre
Copy link
Member

chadwhitacre commented Mar 20, 2023

We've been loosey-goosey on copy/paste code re-use, time to tighten up. Need to .

Policy is basically - isolate to a separate file, and include OSS attribution in the file header.

@chadwhitacre chadwhitacre mentioned this issue Mar 20, 2023
36 tasks
@chadwhitacre
Copy link
Member Author

chadwhitacre commented Mar 20, 2023

Additional guidance:

if theres no attribution, retain the license and add attribution
dont need to ask
just link to repo

yeah I'm fine with link to the repo as attribution

also i would ALWAYS link to repo fwiw
so retain license, attribute link to repo no matter what
its just good hygiene

@evanpurkhiser
Copy link
Member

evanpurkhiser commented Mar 20, 2023

AFAIK that bootstrap stuff is just completely vendored. So whatever doc string was in there when the file was copied is what was in it

@JoshFerge
Copy link
Member

FWIW https://github.com/getsentry/sentry/blob/master/src/sentry/apidocs/spectacular_ports.py#L29-L30 is not copy/pasted, but a modified version of the libraries function. I've also partly contributed part of this vendored file upstream to the library

@JonasBa
Copy link
Member

JonasBa commented Mar 21, 2023

@chadwhitacre this renders weirdly for me, but I just took care of the fzf port. I ported that manually, so idk if we technically need the license, but since it's just a translation I dont mind keeping it.

CleanShot 2023-03-20 at 21 20 23@2x

@mitsuhiko
Copy link
Member

@JonasBa if it's not a clean-room reimplementation it counts as a derivative work and thus needs to retain the original license.

@AbhiPrasad
Copy link
Member

Opened getsentry/sentry-javascript#7560 to track this in JS. From inspecting all the JS SDK packages we have attribution links everywhere - but including the license text is inconsistent.

markstory added a commit to getsentry/sentry that referenced this issue Mar 21, 2023
Add the license content from the borrowed jsonfield implementation

Refs getsentry/team-ospo#120
markstory added a commit to getsentry/sentry that referenced this issue Mar 21, 2023
Add the license content from the borrowed jsonfield implementation

Refs getsentry/team-ospo#120
JoshFerge added a commit to getsentry/sentry that referenced this issue Mar 22, 2023
adds the license from
https://github.com/tfranzel/drf-spectacular/blob/master/LICENSE to our
file in which we ported some functions for api docs. stemming from
getsentry/team-ospo#120
@antonpirker
Copy link
Member

Python SDK: getsentry/sentry-python#1973

markstory added a commit to getsentry/sentry that referenced this issue Mar 22, 2023
@chadwhitacre chadwhitacre changed the title Adopt policy about copy/paste reuse Adopt policy about derivative works Mar 22, 2023
@chadwhitacre
Copy link
Member Author

Current policy:

Derivative Works

Sometimes you want to copy and paste a snippet of code from another project without installing a library or package. Maybe you make some modifications to it, maybe you don’t, but we always could in the future. Other times you reference another work without directly copying it, for example, if you’re porting an algorithm from one language to another. All of these cases count as a “derivative work.” If it's not a clean-room reimplementation, it is a derivative work, and we need to respect the author and license of the original. Here’s how:

  1. Don't derive code from tiny competitors even though technically it's legal, because it makes us look bad.
  2. Isolate the code in its own file or directory. Don’t mix derivative code with non-derivative code.
  3. Add attribution and the text of their license at the top of the file or in a LICENSE file in the directory:
    1. Link to their repo for attribution.
    2. If there is no license, don’t use it.
  4. Here’s an example.

Please watch for this in code reviews.

@AbhiPrasad
Copy link
Member

AbhiPrasad commented Mar 22, 2023

@chadwhitacre can we add this policy to https://develop.sentry.dev/?

markstory added a commit to getsentry/sentry that referenced this issue Mar 22, 2023
@chadwhitacre
Copy link
Member Author

Seems reasonable, but this is one small section of a large policy, would be best to look at the whole.

tonyo added a commit to getsentry/sentry-go that referenced this issue Mar 30, 2023
"internal/otel/baggage" package was initially vendored from
opentelemetry-go, and then later we made some updates to it.
According to our new attribution policy, adding some links to the
original files.

Ref getsentry/team-webplatform-meta#42, getsentry/team-ospo#120
tonyo added a commit to getsentry/sentry-go that referenced this issue Mar 31, 2023
"internal/otel/baggage" package was initially vendored from
opentelemetry-go, and then later we made some updates to it.
According to our new attribution policy, adding some links to the
original files.

Ref getsentry/team-webplatform-meta#42, getsentry/team-ospo#120
@chadwhitacre chadwhitacre mentioned this issue Apr 13, 2023
21 tasks
@chadwhitacre chadwhitacre changed the title Adopt policy about derivative works Clean up derivative works Apr 24, 2023
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

No branches or pull requests

7 participants