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

Unable to fork /bin/clang. #130

Closed
shaikshakeel opened this issue Mar 23, 2024 · 9 comments · Fixed by #260 or #307
Closed

Unable to fork /bin/clang. #130

shaikshakeel opened this issue Mar 23, 2024 · 9 comments · Fixed by #260 or #307
Assignees
Labels
area/infra Test, Release, or CI Infrastructure area/plugins priority/1 P1 type/bug Something isn't working
Milestone

Comments

@shaikshakeel
Copy link

shaikshakeel commented Mar 23, 2024

Describe the bug
While I am setting up retina in K8s infra. I am facing below error.

ts=2024-03-23T16:55:10.369Z level=info caller=server/server.go:79 msg="gracefully shutting down HTTP server..." goversion=go1.21.8 os=linux arch=arm64 numcores=8 hostname=ip-10-149-82-88.ec2.internal podname=retina-agent-4hldd version=v0.0.1 apiserver=https://172.20.0.1:443 plugins=packetforward
ts=2024-03-23T16:55:10.369Z level=info caller=server/server.go:71 msg="HTTP server stopped with err: http: Server closed" goversion=go1.21.8 os=linux arch=arm64 numcores=8 hostname=ip-10-149-82-88.ec2.internal podname=retina-agent-4hldd version=v0.0.1 apiserver=https://172.20.0.1:443 plugins=packetforward
ts=2024-03-23T16:55:10.369Z level=panic caller=controllermanager/controllermanager.go:118 msg="Error running controller manager" goversion=go1.21.8 os=linux arch=arm64 numcores=8 hostname=ip-10-149-82-88.ec2.internal podname=retina-agent-4hldd version=v0.0.1 apiserver=https://172.20.0.1:443 plugins=packetforward error="failed to reconcile plugin packetforward: fork/exec /bin/clang: no such file or directory" errorVerbose="fork/exec /bin/clang: no such file or directory\nfailed to reconcile plugin packetforward\ngithub.com/microsoft/retina/pkg/managers/pluginmanager.(*PluginManager).Start\n\t/go/src/github.com/microsoft/retina/pkg/managers/pluginmanager/pluginmanager.go:169\ngithub.com/microsoft/retina/pkg/managers/controllermanager.(*Controller).Start.func1\n\t/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:108\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1197"
panic: Error running controller manager [recovered]
	panic: Error running controller manager

goroutine 102 [running]:
github.com/microsoft/retina/pkg/telemetry.TrackPanic()
	/go/src/github.com/microsoft/retina/pkg/telemetry/telemetry.go:112 +0x1e8
panic({0x1eb6b00?, 0x4000334180?})
	/usr/local/go/src/runtime/panic.go:914 +0x218
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x0?, 0x1?, {0x4000aaace8?, 0x0?, 0x0?})
	/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:196 +0x78
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0x40002341a0, {0x400007ff00, 0x1, 0x1})
	/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:262 +0x2c0
go.uber.org/zap.(*Logger).Panic(0x40005f2080?, {0x25cf876?, 0x0?}, {0x400007ff00, 0x1, 0x1})
	/go/pkg/mod/go.uber.org/[email protected]/logger.go:284 +0x54
github.com/microsoft/retina/pkg/managers/controllermanager.(*Controller).Start(0x4000cbf450, {0x298b488?, 0x400046f450?})
	/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:118 +0x22c
created by main.main in goroutine 1
	/go/src/github.com/microsoft/retina/controller/main.go:286 +0x2190
  • OS: AmzonLinux
  • Kubernetes Version: 1.28
  • Host: EKS
  • Retina Version: 1.0.0

I am not running any operator. for now I am running only DaemonSet and in configmap I am adding plugins

config.yaml: |-
    apiServer:
      host: 0.0.0.0
      port: 10093
    logLevel: debug
    enabledPlugin: ["packetforward"]
    metricsInterval: 10
    enableTelemetry: false
    enablePodLevel: false
    remoteContext: false
    enableAnnotations: false
@shaikshakeel shaikshakeel added the type/bug Something isn't working label Mar 23, 2024
@talnetd
Copy link

talnetd commented Mar 23, 2024

The same thing happening to me as well.

`
(*Controller).Start.func1\n\t/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:108\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650"
panic: Error running controller manager [recovered]
panic: Error running controller manager

goroutine 16 [running]:
github.com/microsoft/retina/pkg/telemetry.TrackPanic()
/go/src/github.com/microsoft/retina/pkg/telemetry/telemetry.go:112 +0x209
panic({0x242fc60?, 0xc0004241a0?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x1?, 0x0?, {0x0?, 0x0?, 0xc000a6aee0?})
/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:196 +0x54
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0008b6dd0, {0xc00055f740, 0x1, 0x1})
/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:262 +0x3ec
go.uber.org/zap.(*Logger).Panic(0xc00055e2c0?, {0x2b48afa?, 0x0?}, {0xc00055f740, 0x1, 0x1})
/go/pkg/mod/go.uber.org/[email protected]/logger.go:284 +0x51
github.com/microsoft/retina/pkg/managers/controllermanager.(*Controller).Start(0xc000a7abe0, {0x2f057d0?, 0xc0006afb30?})
/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:118 +0x28c
created by main.main in goroutine 1
/go/src/github.com/microsoft/retina/controller/main.go:286 +0x2825
~/Projects/retina (main ✔)
`

Host: ubuntu 22.04.3
Kubernetes Version: v1.28.6

@anubhabMajumdar
Copy link
Contributor

I can reproduce this with v0.0.1 Arm64 images and top-of-tree main. The reason is because the tools image is missing arm64 libraries, and therefore the lib folder copied to the agent image is missing the libraries too.

@anubhabMajumdar anubhabMajumdar self-assigned this Mar 25, 2024
@rbtr rbtr added this to the v0.0.2 milestone Mar 25, 2024
anubhabMajumdar added a commit that referenced this issue Mar 25, 2024
# Description

Add missing libraries required for `clang+llvm` to work in agent. Add
the missing libs in tools image.

Fixes - #130

# Testing Done

1. Built `amd64` and `arm64` image and deployed them in a K8s cluster
with both kind of nodes
2. `agent` pod is up and running in all the nodes

Signed-off-by: Anubhab Majumdar <[email protected]>
@anubhabMajumdar
Copy link
Contributor

Fixed the image. Please use commit cf23ecb to build an image for arm64. Let us know if it works. Thanks!

@wenhuwang
Copy link
Contributor

wenhuwang commented Apr 9, 2024

hello, i encountered the same problem after recompiling retina controller image locally.

Compiler environment

  • OS/Arch: darwin/arm64
  • Docker version: 20.10.23

Compiler command: make retina-image

Running environment

  • OS: Ubuntu 18.04.5 LTS
  • Kernel Version: 5.10.87-051087-generic
  • Kubernetes Version: 1.22.2
  • Retina Version: v0.0.5

retina agent error logs:

ts=2024-04-09T05:55:40.697Z level=debug caller=loader/compile.go:22 msg=Running goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns command="/bin/clang -target bpf -Wall -D__TARGET_ARCH_x86 -g -O2 -c /go/src/github.com/microsoft/retina/pkg/plugin/dropreason/_cprog/drop_reason.c -o /go/src/github.com/microsoft/retina/pkg/plugin/dropreason/kprobe_bpf.o -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../lib/_amd64 -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../lib/common/libbpf/_src -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../filter/_cprog/"
ts=2024-04-09T05:55:40.697Z level=debug caller=loader/compile.go:26 msg="Error running command" goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns command="/bin/clang -target bpf -Wall -D__TARGET_ARCH_x86 -g -O2 -c /go/src/github.com/microsoft/retina/pkg/plugin/dropreason/_cprog/drop_reason.c -o /go/src/github.com/microsoft/retina/pkg/plugin/dropreason/kprobe_bpf.o -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../lib/_amd64 -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../lib/common/libbpf/_src -I/go/src/github.com/microsoft/retina/pkg/plugin/dropreason/../filter/_cprog/" stderr= error="fork/exec /bin/clang: no such file or directory"
ts=2024-04-09T05:55:40.697Z level=info caller=linuxutil/linuxutil_linux.go:64 msg="Context is done, linuxutil will stop running" goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns
ts=2024-04-09T05:55:40.697Z level=info caller=server/server.go:79 msg="gracefully shutting down HTTP server..." goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns
ts=2024-04-09T05:55:40.697Z level=info caller=watchermanager/watchermanager.go:71 msg="watcher stopping..." goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns watcher_type=*apiserver.ApiServerWatcher
ts=2024-04-09T05:55:40.697Z level=info caller=watchermanager/watchermanager.go:71 msg="watcher stopping..." goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns watcher_type=*endpoint.EndpointWatcher
ts=2024-04-09T05:55:40.697Z level=info caller=server/server.go:71 msg="HTTP server stopped with err: http: Server closed" goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns
ts=2024-04-09T05:55:40.697Z level=panic caller=controllermanager/controllermanager.go:119 msg="Error running controller manager" goversion=go1.21.9 os=linux arch=amd64 numcores=48 hostname=node4 podname=retina-agent-ppjlb version=v0.0.5 apiserver=https://10.68.0.1:443 plugins=dropreason,packetforward,linuxutil,dns error="failed to reconcile plugin dropreason: fork/exec /bin/clang: no such file or directory" errorVerbose="fork/exec /bin/clang: no such file or directory\nfailed to reconcile plugin dropreason\ngithub.com/microsoft/retina/pkg/managers/pluginmanager.(*PluginManager).Start\n\t/go/src/github.com/microsoft/retina/pkg/managers/pluginmanager/pluginmanager.go:169\ngithub.com/microsoft/retina/pkg/managers/controllermanager.(*Controller).Start.func1\n\t/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:109\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650"
panic: Error running controller manager

goroutine 415 [running]:
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x1?, 0x0?, {0x0?, 0x0?, 0xc002294020?})
	/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:196 +0x54
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000a75860, {0xc001e817c0, 0x1, 0x1})
	/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:262 +0x3ec
go.uber.org/zap.(*Logger).Panic(0xc000eaf600?, {0x2b62b8b?, 0x0?}, {0xc001e817c0, 0x1, 0x1})
	/go/pkg/mod/go.uber.org/[email protected]/logger.go:284 +0x51
github.com/microsoft/retina/pkg/managers/controllermanager.(*Controller).Start(0xc0001c1180, {0x2f22170?, 0xc0005a8000?})
	/go/src/github.com/microsoft/retina/pkg/managers/controllermanager/controllermanager.go:119 +0x28c
created by main.main in goroutine 1
	/go/src/github.com/microsoft/retina/controller/main.go:290 +0x28d0

and i have confirmed that the /bin/clang file exists in the retina controller image.

@rbtr rbtr reopened this Apr 9, 2024
@wenhuwang
Copy link
Contributor

wenhuwang commented Apr 10, 2024

I think I have found the cause of the problem. Some binary files in the amd64 architecture image compiled on the arm64 architecture machine are in arm64 format.

root@node4:~# ll /run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/
total 156564
drwxr-xr-x 1 root root      4096 Apr  9 17:05 ./
drwxr-xr-x 1 root root      4096 Apr 10 14:47 ../
-rwxr-xr-x 1 root root 155987080 Mar 25  2022 clang*
-rwxr-xr-x 1 root root    138896 Apr  9 17:05 cp*
-rwxr-xr-x 1 root root    639424 Apr  9 17:05 ip*
-rwxr-xr-x 1 root root     90840 Apr  9 17:05 iptables-legacy*
-rwxr-xr-x 1 root root     90840 Apr  9 17:05 iptables-legacy-save*
-rwxr-xr-x 1 root root    220000 Apr  9 17:05 iptables-nft*
-rwxr-xr-x 1 root root    220000 Apr  9 17:05 iptables-nft-save*
-rwxr-xr-x 1 root root    177048 Apr  9 17:05 ss*
-rwxr-xr-x 1 root root   1273504 Apr  9 17:05 tcpdump*
-rwxr-xr-x 1 root root     35640 Apr  9 17:05 uname*
root@node4:~# file /run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/ip
/run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/ip: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=160cf18f019a288320ad790fe87fabfffe310246, for GNU/Linux 3.7.0, stripped
root@node4:~# file /run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/clang
/run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/clang: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped
root@node4:~# file /run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/tcpdump
/run/containerd/io.containerd.runtime.v2.task/k8s.io/76baa97f2687e97eefffae04d9f15976df5fdc1bf15b3726013daf3e4568e948/rootfs/bin/tcpdump: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=65a8a73b191599a6431ad0826f8f309f5f08b1e8, for GNU/Linux 3.7.0, stripped

I am guessing there might be a problem in the Dockerfile and I‘d be happy to fix it.

Could you please assign this issues to me?

@rbtr rbtr assigned wenhuwang and unassigned anubhabMajumdar Apr 10, 2024
@rbtr
Copy link
Collaborator

rbtr commented Apr 10, 2024

@wenhuwang I think you are right. We do some platform manipulation with buildx to cross compile and make the ARM images from an AMD64 host and an arch reference has probably been missed somewhere. I'm suspicious of https://github.com/microsoft/retina/blob/main/controller/Dockerfile.controller#L60 and the conditionals immediately following that.

Assigned the issue to you, thanks for investigating it! 🙂

@rbtr rbtr moved this to Accepted in Retina Triage Board Apr 11, 2024
@rbtr rbtr added area/infra Test, Release, or CI Infrastructure priority/1 P1 labels Apr 11, 2024
@wenhuwang
Copy link
Contributor

wenhuwang commented Apr 11, 2024

@rbtr thanks for assigned.
Because both tcpdump and ip binaries are ARM64 format, and they are installed at https://github.com/microsoft/retina/blob/main/controller/Dockerfile.controller#L55, so it can probably be confirmed that the architecture of the tools image is ARM64.

According to the documentation https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope, it can be know:

  • TARGETPLATFORM - platform of the build result. Eg linux/amd64, linux/arm/v7, windows/amd64
  • BUILDPLATFORM - platform of the node performing the build.

So i guess FROM --platform=$BUILDPPLATFORM may need to be replaced FROM --platform=$TARGETPLATFORM in the dockerfile, I have tested this way to solve the problem

@rbtr
Copy link
Collaborator

rbtr commented Apr 11, 2024

This sounds reasonable to me. Maybe every occurence of --platform= should be $TARGETPLATFORM except the one where we are compiling the Go binaries? In that one, it's much faster to do an ARM cross-compile from an amd64 platform, for some reason.
This might also simplify the installation of dependencies because we would not need to fake the arch here? https://github.com/microsoft/retina/blob/main/controller/Dockerfile.controller#L63

@wenhuwang are you interested in opening the PR to fix this, or should someone else pick it up?

@wenhuwang
Copy link
Contributor

wenhuwang commented Apr 12, 2024

@rbtr OK, I will submit a PR to fix this issue.

@rbtr rbtr modified the milestones: 2024/03/26, 1.0 Apr 12, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 17, 2024
#260)

# Description
Fixed the issues of retina-controller startup failure caused by abnormal
cross-platform build image dependency package architecture.


## Related Issue

fixes #130 

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

# Testing Done
Built amd64 and arm64 image and deployed amd64 image in K8s cluster
nodes
agent pod is up and running in the nodes

---------

Signed-off-by: wenhuwang <[email protected]>
@rbtr rbtr closed this as completed in #260 Apr 17, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 25, 2024
# Description

This should address the arm/amd64 binary errors in the built image while
keeping the Go build stage fast by using the
BUILDPLATFORM/TARGETPLATFORM and cross-compiling.

It also moves the tools stage from bullseye to bookworm: bookworm has
clang-14 available in the package manager and directly installable, so
all of the manual downloads are removed, and the explicit installations
are cut down significantly.

Removes some unnecessary Docker cruft which may have been
well-intentioned but isn't useful.

## Related Issue

This builds on #260 which fixed #130.

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

---------

Signed-off-by: Evan Baker <[email protected]>
nddq pushed a commit that referenced this issue May 6, 2024
#260)

# Description
Fixed the issues of retina-controller startup failure caused by abnormal
cross-platform build image dependency package architecture.


## Related Issue

fixes #130 

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

# Testing Done
Built amd64 and arm64 image and deployed amd64 image in K8s cluster
nodes
agent pod is up and running in the nodes

---------

Signed-off-by: wenhuwang <[email protected]>
nddq pushed a commit that referenced this issue May 6, 2024
# Description

This should address the arm/amd64 binary errors in the built image while
keeping the Go build stage fast by using the
BUILDPLATFORM/TARGETPLATFORM and cross-compiling.

It also moves the tools stage from bullseye to bookworm: bookworm has
clang-14 available in the package manager and directly installable, so
all of the manual downloads are removed, and the explicit installations
are cut down significantly.

Removes some unnecessary Docker cruft which may have been
well-intentioned but isn't useful.

## Related Issue

This builds on #260 which fixed #130.

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

---------

Signed-off-by: Evan Baker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra Test, Release, or CI Infrastructure area/plugins priority/1 P1 type/bug Something isn't working
Projects
Archived in project
5 participants