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

OF-2716: Fix Licences #2367

Closed
wants to merge 18 commits into from
Closed

Conversation

Fishbowler
Copy link
Member

This PR should be rebased in, not squashed.

Updates copyright headers on files.

  • Adds headers to files that were missing them
  • If they had headers, adds Ignite Realtime Foundation where missing
  • If Ignite was there, updates the years
  • Fixes some typos
  • Fixes one file that had the wrong license header altogether

@Fishbowler Fishbowler marked this pull request as ready for review December 12, 2023 12:48
@Fishbowler Fishbowler marked this pull request as draft December 12, 2023 14:16
@Fishbowler
Copy link
Member Author

Flipping to draft, as Guus pointed out that I've missed all of the JSPs

For files that have copyright assigned to some variant of Ignite, and where it should be Ignite Realtime Foundation, fix it.

Mostly s/Community/Foundation
We want [YEAR] [OWNER], not the other way around
This file was missed in OF-65 / commit 324dd3b and was relicensed by Jive to Apache. This just fixes the header to reflect that decision.
…thers

Just to aid scriptable checking. Also adds Ignite's contributions.
Adds better staged detection of wrongness, and starts with some autofixing of missing licenses
For JSP or Java files in the repo, detect and add missing license headers. Copyright headers are reconstructed from git history.
Some fixes, and target the script at Ignite Realtime Foundation being missing from the copyright line
…nse header

Via script, add Ignite to the copyright line for Java and JSP files, using git history to calculate the correct years.
Fix an exclusion bug. Target fixing incorrect dates in Ignite's copyright line.
Via script, use git history to amend years of edits of the file
Some consistency fixes to fix up some files that can't be automatically fixed, so that they can be automatically fixed.
Add (C) after Copyright if its missing.
Add All rights reserved at the end of the copyright line if it's missing
Via script, amend any items missing the (C) after Copyright, amend any items missing 'All rights reserved' at the end of the copyright line, then run other fixes now that they're consistent.
The script's auto-fixes highlighted that some files had incorrect attributions.
Fix more files that the script worked out were wrong, but couldn't fix automatically
Remove some redundant checks
@Fishbowler Fishbowler marked this pull request as ready for review December 14, 2023 23:41
@Fishbowler Fishbowler changed the title Fix Licences OF-2716: Fix Licences Dec 15, 2023
@guusdk
Copy link
Member

guusdk commented Dec 15, 2023

Is there value in retaining the checkCopyrightHeader script? Are we realistically ever going to do this massive exercise again? By adding it to the repository, we're adding more complexity, more technical debt and more things for new developers to perceive as things being difficult-to-grasp.

If there is value in retaining it, I'd prefer it to be places somewhere away from the root directory - but my preference would be to not include it at all.

@Fishbowler
Copy link
Member Author

We could put the script somewhere else. We could also put it in a different repo, or maybe a gist. I think we should keep it.

I can imagine running it every few months and catching a few files that we've missed.

I'd like a better approach than that though... We could wrap the script in a Github Action and test that the git diff is zero?

@guusdk
Copy link
Member

guusdk commented Dec 15, 2023

Moving the script to a gist sounds fine to me.

I really dislike additional hurdles for merging commits, and creating a Github Action comes dangerously close to that. I am confident that anything like this will reduce the amount of contributions that we get from third parties.

In the end, I prefer to have a PR from someone that doesn't have an updated copyright header than not having a PR because people give up (or don't even start) because of checks for trivial conventions. This is my concern with anything that uses checkstyle too, for example.

@Fishbowler
Copy link
Member Author

How do you feel about an action committing fixes automatically?

@guusdk
Copy link
Member

guusdk commented Dec 15, 2023

How do you feel about an action committing fixes automatically?

Might be error-prone. I'm not against it, but I'm wondering if it's worth the effort.

@Fishbowler Fishbowler closed this Dec 17, 2023
@Fishbowler Fishbowler deleted the licences branch December 17, 2023 13:26
@Fishbowler Fishbowler restored the licences branch December 17, 2023 13:44
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.

2 participants