pixie-io / pixie

Instant Kubernetes-Native Application Observability
https://px.dev
Apache License 2.0
5.6k stars 430 forks source link

Fix bug where cli manifests with `AT_DARWIN_ARM64` ArtifactTypes fail to parse #2005

Closed ddelnano closed 2 months ago

ddelnano commented 2 months ago

Summary: Fix bug where cli manifests with AT_DARWIN_ARM64 ArtifactTypes fail to parse

This was an error I ran into when testing #1997. You can see the failure output from the following build (also copied below).

INFO: Running command line: bazel-bin/src/utils/artifacts/manifest_updater/manifest_updater_/manifest_updater '--manifest_updates=/__w/pixie/pixie/manifest_updates.json' '--manifest_path=/__w/pixie/pixie/gh-pages/artifacts/manifest.json'
time="2024-09-04T16:17:53Z" level=fatal msg="failed to read manifest updates" error="unknown value \"AT_DARWIN_ARM64\" for enum px.versions.ArtifactType"

Relevant Issues: #1993

Type of change: /kind bugfix

Test Plan: Built the manifest_updater binary and verified it no longer fails with a parse error

$ ./manifest_updater --manifest_updates manifest_updates.json  --manifest_path=manifest.json
$
ddelnano commented 2 months ago

After updating the protos, I ran into the following gazelle error:

ERROR: non zero exit: GoCompilePkg returned a non-zero exit code when running remotely
external/bazel_gazelle/cmd/gazelle/fix-update.go:259:44: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:266:23: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:278:37: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:279:23: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:299:23: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:332:41: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:340:40: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:456:23: undefined: languages
external/bazel_gazelle/cmd/gazelle/fix-update.go:498:23: undefined: languages
external/bazel_gazelle/cmd/gazelle/update-repos.go:130:44: undefined: languages
external/bazel_gazelle/cmd/gazelle/update-repos.go:130:44: too many errors
compilepkg: error running subcommand external/go_sdk/pkg/tool/linux_amd64/compile: exit status 2

I saw that gazelle recommends against building the @bazel_gazelle//cmd/gazelle:gazelle_lib target since it's tagged with manual as explained in https://github.com/bazelbuild/bazel-gazelle/issues/1742. I downloaded the target_files GitHub artifact and saw that it was included in our buildables. I tried to exclude that target via our default excludes, but I'm skeptical whether it's excluding too much.

Here is the difference between the target files before and after the failed build and the successful one. bazel_buildables_diff_output.txt