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 bug where cli manifests with AT_DARWIN_ARM64 ArtifactTypes fail to parse #2005

Merged

Conversation

ddelnano
Copy link
Member

@ddelnano ddelnano commented Sep 4, 2024

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 ddelnano requested a review from a team as a code owner September 4, 2024 16:57
Signed-off-by: Dom Del Nano <[email protected]>
@ddelnano ddelnano requested a review from a team as a code owner September 4, 2024 18:16
@ddelnano
Copy link
Member Author

ddelnano commented Sep 4, 2024

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 bazelbuild/bazel-gazelle#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

@ddelnano ddelnano merged commit afffb8e into pixie-io:main Sep 4, 2024
30 checks passed
@ddelnano ddelnano deleted the ddelnano/fix-manifest-parsing-error branch September 4, 2024 22:00
ddelnano added a commit to ddelnano/pixie that referenced this pull request Sep 23, 2024
… to parse (pixie-io#2005)

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

This was an error I ran into when testing pixie-io#1997. You can see the failure
output from the [following
build](https://github.com/pixie-io/pixie/actions/runs/10705210930/job/29681122220?pr=1997)
(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: pixie-io#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
$
```

---------

Signed-off-by: Dom Del Nano <[email protected]>
GitOrigin-RevId: afffb8e
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