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

Post-processor container relies on external dependency #1415

Open
bcoe opened this issue Oct 21, 2021 · 3 comments
Open

Post-processor container relies on external dependency #1415

bcoe opened this issue Oct 21, 2021 · 3 comments
Labels
bot: owl-bot lang: php Issues specific to PHP. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bcoe
Copy link
Contributor

bcoe commented Oct 21, 2021

Problem

The PHP post-processor container has a dependency on an external dependency installed from npm:

Step googleapis/repo-automation-bots#1:   - TLSSocket
Step googleapis/repo-automation-bots#1:   - TLSSocket
Step googleapis/repo-automation-bots#1:   - Socket
Step googleapis/repo-automation-bots#1:   - Socket
Step googleapis/repo-automation-bots#1:   - Socket
Step googleapis/repo-automation-bots#1: Active handles:
Step googleapis/repo-automation-bots#1: Process stalled
Step googleapis/repo-automation-bots#1: error An unexpected error occurred: "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz: unexpected end of file".
Step googleapis/repo-automation-bots#1:  (warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove 

This makes it susceptible to intermittent network issues on the upstream registry. It also makes it possible that we have a nested dependency break, if we're not using a package-lock.json during installation.

Possible solution

Install prettier into container when building.

@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. bot: owl-bot labels Oct 21, 2021
@bcoe bcoe added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Oct 21, 2021
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Jan 19, 2022
@chingor13 chingor13 added the lang: nodejs Issues specific to JavaScript or TypeScript. label Jan 25, 2022
@bcoe bcoe added lang: php Issues specific to PHP. and removed lang: nodejs Issues specific to JavaScript or TypeScript. labels Apr 11, 2022
@tmatsuo tmatsuo transferred this issue from googleapis/repo-automation-bots Apr 12, 2022
@tmatsuo tmatsuo added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 12, 2022
@tmatsuo tmatsuo assigned saranshdhingra and unassigned tmatsuo Apr 12, 2022
@saranshdhingra
Copy link

Hi @bcoe
Considering we have moved to owlbot, just wanted to confirm if this is still relevant?

@bcoe
Copy link
Contributor Author

bcoe commented Dec 5, 2023

@saranshdhingra this still can potentially be an issue. OwlBot runs the post-processor.

@bshaffer
Copy link
Contributor

bshaffer commented May 9, 2024

This refers to how we have owlbot.py run the following in ~110 of our generated clients (out of 178).

For example, in BareMetalSolution/owlbot.py:

# format generated clients
subprocess.run([
    'npm',
    'exec',
    '--yes',
    '--package=@prettier/plugin-php@^0.16',
    '--',
    'prettier',
    '**/Gapic/*',
    '--write',
    '--parser=php',
    '--single-quote',
    '--print-width=80'])

This seems like something that would make sense to be part of the gapic generator, and then we can remove it from owlbot entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: owl-bot lang: php Issues specific to PHP. priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants