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

fix(cmd-api-server): build occasionally broken - protoc-gen-ts #1563

Closed
petermetz opened this issue Nov 23, 2021 · 0 comments · Fixed by #1564
Closed

fix(cmd-api-server): build occasionally broken - protoc-gen-ts #1563

petermetz opened this issue Nov 23, 2021 · 0 comments · Fixed by #1564
Assignees
Labels
API_Server bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience

Comments

@petermetz
Copy link
Contributor

Describe the bug

Sometimes when I switch to the main branch and do a yarn configure it ends

To Reproduce

Switch branches, do rebuilds (a lot) because of working on a bunch of different things simultaneously + reviewing PRs and then it will probably happen around once a week that the build fails because the codegen script bugged out and forgot to generate the Typescript implementation files from the protocol buffers of the API server and you are getting errors from the tsc script because it's missing the TS source code it needs to compile everything.

Expected behavior

Build is stable.

Hyperledger Cactus release version or commit (git rev-parse --short HEAD):

1.0.0-rc.2

Hyperledger Cactus Plugins/Connectors Used

N/A

Additional context

This has been around for a while and I'm suspicious that it's a bug with protoc-gen-ts itself so the first step would be to try and upgrade that and see if it fixes the problem.

@petermetz petermetz added API_Server bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience labels Nov 23, 2021
@petermetz petermetz self-assigned this Nov 23, 2021
petermetz added a commit to petermetz/cacti that referenced this issue Nov 23, 2021
…edger-cacti#1563

Upgrading protoc-gen-ts from 0.4.0 to 0.6.0 instantly fixed the issue
while I had it in a reproduced state (e.g. my build was broken on main)

This is not necessarily evidence that the fix is legit, but it's most likely
a step in the right direction and there's also the possibility that this
is the actual fix. It would take too much time to properly debug if
it really is the fix, so I'll just give it the benefit of the doubt
for now and assume that it is.

Fixes hyperledger-cacti#1563

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Nov 27, 2021
…edger-cacti#1563

Upgrading protoc-gen-ts from 0.4.0 to 0.6.0 instantly fixed the issue
while I had it in a reproduced state (e.g. my build was broken on main)

This is not necessarily evidence that the fix is legit, but it's most likely
a step in the right direction and there's also the possibility that this
is the actual fix. It would take too much time to properly debug if
it really is the fix, so I'll just give it the benefit of the doubt
for now and assume that it is.

Also had to upgrade the @types/google-protobuf package to a newer
version because it didn't have the deserializeBinary() method defined
on the custom made Map type that ships with the PB compiler and this
was causing the generated Typescript code to not compile.

Fixes hyperledger-cacti#1563

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Nov 28, 2021
Upgrading protoc-gen-ts from 0.4.0 to 0.6.0 instantly fixed the issue
while I had it in a reproduced state (e.g. my build was broken on main)

This is not necessarily evidence that the fix is legit, but it's most likely
a step in the right direction and there's also the possibility that this
is the actual fix. It would take too much time to properly debug if
it really is the fix, so I'll just give it the benefit of the doubt
for now and assume that it is.

Also had to upgrade the @types/google-protobuf package to a newer
version because it didn't have the deserializeBinary() method defined
on the custom made Map type that ships with the PB compiler and this
was causing the generated Typescript code to not compile.

Fixes #1563

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API_Server bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant