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

misc(proto): require protobuf 3.7.1, add stricter audit details test #8867

Merged
merged 2 commits into from
May 5, 2019

Conversation

brendankenny
Copy link
Member

follow up to #8863 and #8857 (comment)

Something was fixed between protobuf 3.6.1 and 3.7.1 that handled the details.summary type when the value was just an empty {}. 3.6.1 round tripped it as null, 3.7.1 correctly round trips it as {}.

The round trip test wasn't catching the issue because {} was the summary expectation and {} matches basically everything with toMatchObject. The round trip is good enough for audit results now that we can just do the deep, strict toEqual instead.

package.json Outdated
@@ -59,7 +59,7 @@
"ultradumbBenchmark": "./lighthouse-core/scripts/benchmark.js",
"mixed-content": "./lighthouse-cli/index.js --chrome-flags='--headless' --preset=mixed-content",
"minify-latest-run": "./lighthouse-core/scripts/lantern/minify-trace.js ./latest-run/defaultPass.trace.json ./latest-run/defaultPass.trace.min.json && ./lighthouse-core/scripts/lantern/minify-devtoolslog.js ./latest-run/defaultPass.devtoolslog.json ./latest-run/defaultPass.devtoolslog.min.json",
"compile-proto": "[ \"$(protoc --version)\" == 'libprotoc 3.6.1' ] && protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \"❌ Install protobuf to compile the proto file.\" && false)",
"compile-proto": "[ \"$(protoc --version)\" == 'libprotoc 3.7.1' ] && protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \"❌ Install protobuf to compile the proto file.\" && false)",
Copy link
Member Author

Choose a reason for hiding this comment

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

@paulirish sounds like we don't want the version test anymore, though? Probably good cause future versions wouldn't match and I'm not sure if the version check will work cross platform (we don't run update:sample-json on appveyor...)

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

Successfully merging this pull request may close these issues.

2 participants