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

pin cs fixer to a version so we don't get unexpected updates #6785

Closed
bshaffer opened this issue Nov 10, 2023 · 2 comments
Closed

pin cs fixer to a version so we don't get unexpected updates #6785

bshaffer opened this issue Nov 10, 2023 · 2 comments

Comments

@bshaffer
Copy link
Contributor

Our owlbot post processing uses a CS fixer to ensure the generated code is formatted correctly. The problem is that sometimes the underlying library updates in an unexpected way, and causes many PRs to be submitted for a minor (or unwanted) formatting change. This happened recently

We should pin to a specific version so that this doesn't happen unexpectedly.

@bshaffer
Copy link
Contributor Author

I believe this happens in owlbot.py, where we use the npm prettier plugin, defined as plugin-php@^0.16:

subprocess.run([
'npm',
'exec',
'--yes',
'--package=@prettier/plugin-php@^0.16',
'--',
'prettier',
'**/Client/*',
'--write',
'--parser=php',
'--single-quote',
'--print-width=120'])

If that's the case then it seems like we're already pinned, and I'm not sure why/how it happened. It's possible this is happening in gapic-generator-php also, and not here:

https://github.com/googleapis/gapic-generator-php/blob/277c7036edbcd245fc38cd3a97a761807af05188/composer.json#L34

This needs to be looked into.

@bshaffer
Copy link
Contributor Author

Closing in favor of googleapis/gapic-generator-php#711, as this is the best way to resolve the issue.

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

No branches or pull requests

1 participant