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

chore: remove template_excludes in the generation config #2801

Merged
merged 10 commits into from
May 27, 2024

Conversation

JoeWang1127
Copy link
Collaborator

@JoeWang1127 JoeWang1127 commented May 23, 2024

In this PR:

  • Remove template_excludes in the generation config
  • Update README.md

Follow up of #2792.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label May 23, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels May 23, 2024
@JoeWang1127 JoeWang1127 marked this pull request as ready for review May 23, 2024 22:49
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner May 23, 2024 22:49
@@ -1,19 +1,5 @@
gapic_generator_version: 2.40.2-SNAPSHOT
googleapis_commitish: 3d50414a7ff3f0b8ffe8ad7858257396e4f18131
template_excludes:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the behavior now this is removed? From the logic here, it should be fine for existing libraries. If we want to create new libraries with empty template_excludes, are we going to create an owlbot.py with empty template_excludes section?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we want to create new libraries with empty template_excludes, are we going to create an owlbot.py with empty template_excludes section?

Yes, the exclusions in owlbot.py is empty.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How did we populate it before without hermetic build? Maybe we can populate a default list like this?

    ".github/*",
    ".kokoro/*",
    "samples/*",
    "CODE_OF_CONDUCT.md",
    "CONTRIBUTING.md",
    "LICENSE",
    "SECURITY.md",
    "java.header",
    "license-checks.xml",
    "renovate.json",
    ".gitignore"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's hard coded in the new-client.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it was hardcode in new-client.py, but since it does not exist anymore, is it still hardcoded somewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, the only place that may have template exclusions is generation config.

This parameter is used to generate owlbot.py if it doesn't exist. Since we don't have this situation, we can remove this parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we hardcode it somewhere in our code? So that we don't have to specify it anymore in google-cloud-java?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed template_exclusions from the config.

Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@JoeWang1127 JoeWang1127 changed the title chore: make template_excludes a non-required parameter chore: remove template_excludes in the generation config May 24, 2024
Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we still confirm the template excludes behave correctly using the owlbot.py golden test, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the unit test is not changed.

@JoeWang1127 JoeWang1127 merged commit 7e822cd into main May 27, 2024
47 of 48 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/make-template-non-required branch May 27, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants