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

[#3977] improvement: Add gitignore files of client-python and web into Apache Rat exclusion list #3978

Closed
wants to merge 2 commits into from

Conversation

noidname01
Copy link
Collaborator

What changes were proposed in this pull request?

  • Add gitignore files of client-python and web into Apache Rat exclusion list in build.kts.gradle

Why are the changes needed?

Fix: #3977

Does this PR introduce any user-facing change?

No

How was this patch tested?

./gradlew rat

@@ -476,7 +476,7 @@ tasks.rat {
"clients/client-python/gravitino/utils/http_client.py"
)

// Add .gitignore excludes to the Apache Rat exclusion list.
// Add .gitignore of subprojects, make them excludes to the Apache Rat exclusion list.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but the original comment makes more sense

} else {
exclusions.add("$path/$file")
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use "**/.gitignore" in the exclusion list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because some folders would include .gitignore, like node_modules, htmlcov, etc. There are additional rules required to avoid them, so I think it's better to list certain .gitignore manually.

Copy link
Member

@justinmclean justinmclean Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would only ignore the .gitignore files not the folders that contain it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rat is just a tool that checks for license headers a .gitignore is very unlikely to have a license header so excluding all of them is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and even if it does a .giignore file is basically just a list which is not covered by copyright

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's not meant to ignore .gitignore file, The .gitignore files listed manually (root, client-python and web, here) are read and parsed to add the files and folders list in them to exclusion list, make Rat to ignore them.

For example, there is venv in .gitignore of client-python project, it will be add in exclusion list so Rat will know that this folder needs not to be checked.

Copy link
Member

@justinmclean justinmclean Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not the best idea idea. Just because a file is listed in .gitignore doesn't mean it should be ignored by rat - although it is likely. It also makes it hard to review a release or easily review what we are excluding from an ASF policy/legal point of view. At the ASF Incubator PMC memebers will manually run rat to verify a release contain no unexpcted licensed files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense, but the original code here works just the same as mine, except it only includes root .gitignore, and that's why I think this idea is acceptable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I understod why you did that, but it prbabbly wasn't the best idea to start with for reasons explaned above. I think listing all of the exlustions is probably better so a reviewer can easily see them.

@noidname01 noidname01 closed this Jul 4, 2024
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.

[Improvement] Add gitignore files of client-python and web into Apache Rat exclusion list
2 participants