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(internal/postprocessor): add MoveSnippets to main.go #7523

Merged
merged 9 commits into from
Apr 7, 2023

Conversation

quartzmo
Copy link
Member

@quartzmo quartzmo commented Mar 9, 2023

This is a temporary change to delete generated snippets until we are ready to process them.

Tested locally by adding an internal/snippets directory to only kms/apiv1, then running over all modules, to confirm that Glob pattern does not gather unwanted paths.

go run main.go modconfig.go -client-root="../.." -googleapis-dir="/Users/chrisdsmith/oss/googleapis" -branch="postprocessor-move-snippets"
...
2023/03/09 14:09:22 Amending PR title and body
2023/03/09 14:09:23 moving snippets
2023/03/09 14:09:23 deleting snippets dir: ../../kms/apiv1/internal
2023/03/09 14:09:29 vetting generated code

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 9, 2023
@quartzmo quartzmo assigned quartzmo and unassigned quartzmo Mar 9, 2023
@quartzmo quartzmo marked this pull request as ready for review March 9, 2023 18:51
@quartzmo quartzmo requested a review from a team as a code owner March 9, 2023 18:51
dirs := c.getDirs()
for _, dir := range dirs {

snpDirs, err := filepath.Glob(filepath.Join(dir, "api*", "internal"))
Copy link
Member

Choose a reason for hiding this comment

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

I would use apiv to reduce the chance of false positives. Did you test this locally to see if this would only trigger as expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

See Pr desc for local test confirmation.

@quartzmo quartzmo added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 13, 2023
@quartzmo
Copy link
Member Author

do not merge pending possible changes to location of snippets in the generator output.

@quartzmo quartzmo removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 6, 2023
@quartzmo
Copy link
Member Author

quartzmo commented Apr 6, 2023

Tested updates locally with:

go run command.go config.go main.go manifest.go snippets.go -client-root="../.." -googleapis-dir="/Users/chrisdsmith/oss/googleapis" -branch="postprocessor-move-snippets"

Output as expected, no errors.

@quartzmo quartzmo force-pushed the postprocessor-move-snippets branch from 3b27dde to 42c17aa Compare April 6, 2023 18:21
@codyoss
Copy link
Member

codyoss commented Apr 6, 2023

@quartzmo can you update the hash for the postprocessor to include these changes

@quartzmo quartzmo merged commit 7afc98a into googleapis:main Apr 7, 2023
@quartzmo quartzmo deleted the postprocessor-move-snippets branch April 7, 2023 22:04
quartzmo added a commit to quartzmo/google-cloud-go that referenced this pull request Apr 11, 2023
quartzmo added a commit that referenced this pull request Apr 17, 2023
…Snippets (#7737)

* delete postprocessor/snippets.go

refs: #7523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants