Skip to content

Register the sparc plugin on every architecture - #70

Merged
esnible merged 1 commit into
mainfrom
fix-sparc-plugin-filename
Aug 17, 2026
Merged

Register the sparc plugin on every architecture#70
esnible merged 1 commit into
mainfrom
fix-sparc-plugin-filename

Conversation

@esnible

@esnible esnible commented Aug 17, 2026

Copy link
Copy Markdown
Member

Fixes #68.

Renames cmd/authbridge_plugin_sparc.go to authbridge_plugin_sparcplugin.go.

sparc is one of the architecture names Go recognizes in its implicit filename constraint, so the old name constrained the file to GOARCH=sparc and excluded it everywhere else. It landed in go list's IgnoredGoFiles, the blank import never ran, and the //go:build !exclude_plugin_sparc line was dead — the filename is applied first. The new suffix matches cortex's own cmd/authbridge-proxy/plugins_sparcplugin.go.

Before and after, on arm64:

before: unknown plugin "sparc" (registered: [... opa static-inject ...])   # 11
after:  configure "sparc": sparc config: reflector_endpoint is required    # 12

-tags exclude_plugin_sparc still drops it — which it could not meaningfully do before.

Note that nothing fails at build time when this regresses: the misnamed file compiles cleanly and passes go vet, and the only symptom is unknown plugin "sparc" at run time. The comment in the renamed file explains why the suffix differs from its siblings.

Assisted by Claude.

Renames cmd/authbridge_plugin_sparc.go to authbridge_plugin_sparcplugin.go.

"sparc" is one of the architecture names Go recognizes in its implicit filename
constraint, so a file ending in _sparc.go is constrained to GOARCH=sparc and
excluded everywhere else. The file landed in `go list`'s IgnoredGoFiles, the
blank import never ran, and `authbridge exec` reported `unknown plugin "sparc"`
on amd64 and arm64 alike. The //go:build !exclude_plugin_sparc line was dead:
the file name is applied first. The new suffix matches cortex's own
cmd/authbridge-proxy/plugins_sparcplugin.go.

Confirmed before and after: the registered list goes from eleven plugins to
twelve, and a config naming sparc now fails on its own required field
(reflector_endpoint) rather than on the plugin being absent. -tags
exclude_plugin_sparc still drops it, which it could not meaningfully do before.

Assisted by Claude.

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible
esnible force-pushed the fix-sparc-plugin-filename branch from b958e8d to ad36386 Compare August 17, 2026 20:24
@esnible
esnible merged commit 578ea9c into main Aug 17, 2026
2 checks passed
@esnible
esnible deleted the fix-sparc-plugin-filename branch August 17, 2026 20:28
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.

🐛 rossoctl-cli's sparc plugin never compiles in on amd64/arm64 due to a _sparc.go filename GOARCH trap

1 participant