-
Notifications
You must be signed in to change notification settings - Fork 914
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
Fixes the linting rules to accept only the approved copyright headers #1373
Fixes the linting rules to accept only the approved copyright headers #1373
Conversation
is it failing because the license header needs to be updated for other files now? |
The test should have only validated the changed files and not all files. However, after discussing with others, we decided that I will update all the copyright headers. |
30e1510
to
e6a0de0
Compare
Do we need to remove the modified section from each of the unmodified files? If we do modify them in future but forget to add the modification header, we will once again have an incorrect license header. What are your thoughts on removing the |
I think you mean "add". Yes, contributors modifying a file with the unmodified header will need to add the extra lines.
Yes. Code reviewers will need to be vigilant. Or, we would need to come up with a custom license validation script. I have a script that I built to partially handle these headers which could be repurposed to do this in the future.
What I learned from this previous failures of the method we currently use with the header validations, if we removed |
True, but once we update all the headers like you are doing right now to only use the modified header, we should no longer have any incorrect headers. Then |
Signed-off-by: Miki <[email protected]>
9b1d030
to
8a5d4ee
Compare
Ashwin's concerns were about the potential for error when contributors update a file that had the "unmodified" headers and forgot to update it. We found a compromise that simplifies the headers a lot and addresses Ashwin's concern. The updated guidance is:
|
New files with no open source origins: * Short 2-liner block Modified or Unmodified files with open source origins: * Large header block Signed-off-by: Miki <[email protected]>
eea6b56
to
a98870d
Compare
Signed-off-by: Miki <[email protected]>
a98870d
to
625549d
Compare
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.
LGTM, thanks Miki!
Our builds get built with a Is this still valid:
|
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.
Just one question but:
ooooo .oooooo. ooooooooooooo ooo ooooo
`888' d8P' `Y8b 8' 888 `8 `88. .888'
888 888 888 888b d'888
888 888 888 8 Y88. .P 888
888 888 ooooo 888 8 `888' 888
888 o `88. .88' 888 8 Y 888
o888ooooood8 `Y8bood8P' o888o o8o o888o
I will dig up some correspondence about this and deal with it in a separate PR. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-1373-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d7004dc5b0392477fdd54ac66b29d231975a173b
# Push it to GitHub
git push --set-upstream origin backport/backport-1373-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x Then, create a pull request where the |
* Fixes the linting rules to accept only the approved copyright headers * Fixes the license headers New files with no open source origins: * Short 2-liner block Modified or Unmodified files with open source origins: * Large header block * Updates the snapshots that changed with updates to the license headers Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki [email protected]
Description
The approved copyright headers are either the short, two-liner AL2 one for new files, or the longer version for modified files that probably already have a copyright header; a split copyright header is not.
This also changes the existing headers:
Issues Resolved
#1382
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr