Skip to content

vendor a method-less text/template to restore whole-binary linker DCE#8844

Open
rchildress87 wants to merge 2 commits into
open-policy-agent:mainfrom
rchildress87:fix/dce-vendor
Open

vendor a method-less text/template to restore whole-binary linker DCE#8844
rchildress87 wants to merge 2 commits into
open-policy-agent:mainfrom
rchildress87:fix/dce-vendor

Conversation

@rchildress87

@rchildress87 rchildress87 commented Jul 1, 2026

Copy link
Copy Markdown

Why the changes in this PR are needed?

text/template's field evaluator (text/template.(*state).evalField, exec.go) callsreflect.Value.MethodByName with a non-constant name. The Go linker treats a reachable non-constantMethodByName as a signal to disable method-level dead-code elimination for the whole binary (see cmd/link/internal/ld/deadcode.go and golang/go#72895). Two OPA code paths pull stdlib text/template into the reachable graph of ordinary embedders:

  1. Compiler frontendast.Compiler.Compile → … → gojsonschema.formatErrorDescription → text/template. Reached unconditionally by anything that compiles Rego.
  2. strings.render_template builtin (v1/topdown/template.go) — registered in the topdown builtin table, reachable in anything that links Rego evaluation.

So an embedder of OPA's compiler/eval retains its entire reachable method surface — a large binary-size regression, hundreds of MB in the reporter's case (#7903). Both edges must go before the linker re-enables method-level DCE for that embedder.

What are the changes in this PR?

Vendor a self-contained, method-less copy of text/template under internal/methodlesstemplate and point both call sites at it. No external dependency (go.mod/go.sum unchanged).

  • Copied verbatim from Go 1.25.8: doc.go, exec.go, funcs.go, option.go, template.go, plus internal/fmtsort/sort.go. Go's BSD LICENSE is preserved in the vendored directory and every file keeps its The Go Authors copyright header.
  • Stdlib text/template/parse is reused unchanged (the parser has no MethodByName/evalField edge, so it does not defeat DCE).
  • helper.go (ParseFiles/ParseGlob/ParseFS) is dropped — the OPA call sites only need New/Parse/Execute, and nothing in the kept files references it.
  • The only edit to the copied code is removing the MethodByName branch in exec.go's evalField (method resolution on the data value). Everything else is byte-identical, so re-syncing to a newer Go release is a diff-and-reapply of that single branch removal.
  • internal/gojsonschema (commit 1) and v1/topdown (commit 2) import the vendored package. The gojsonschema engine is retained in full, so ErrorTemplateFuncs (its FuncMap extension point) keeps working — no public symbol is removed.

Rego values and gojsonschema ErrorDetails decode to map[string]any/[]any/scalars, which have no methods, so removing method resolution is a provable no-op for these callers.

Notes to assist PR review:

  • Diff review tip: doc.go/funcs.go/option.go/template.go/internal/fmtsort/sort.go are byte-identical to the Go 1.25.8 originals. Only exec.go differs, in exactly two hunks: the internal/fmtsort → vendored import path, and the removed MethodByName block (replaced by a comment explaining the DCE rationale).
  • Fidelity — render_template: the rendertemplate conformance cases (incl. complex range/if/vars, simpleint %v, missingkey<undefined>) pass unchanged.
  • Fidelity — gojsonschema: same engine (method-less), validation-error output unchanged; existing internal/gojsonschema and v1/ast tests pass.
  • Tests: TestNoStdlibTextTemplateImport in both internal/gojsonschema and v1/topdown scans every non-test file and asserts none import stdlib text/template/html/template. go build ./..., go vet ./... OK; go mod tidy is a no-op.
  • Lint: the vendored directory is added to the golangci-lint path exclusions, mirroring the existing internal/gojsonschema precedent — the copy is verbatim stdlib, and linting it against OPA's house rules would force divergence from upstream Go (it trips ~31 stdlib-idiom issues) and break the diff-and-reapply re-sync.
  • Attribution: the vendored code is Go stdlib only (BSD, The Go Authors); it contains no third-party/DataDog code.

Further comments:

rchildress87 and others added 2 commits July 1, 2026 16:40
…/template

text/template's field evaluator (evalField) calls reflect.Value.MethodByName
with a non-constant name. The Go linker treats a reachable non-constant
MethodByName as a signal to disable method-level dead-code elimination for the
entire binary (golang/go#72895). gojsonschema is reached unconditionally from
ast.Compiler.Compile via formatErrorDescription, so every embedder of OPA's
compiler keeps the trigger live and retains its full reachable method surface, a
large binary-size regression (open-policy-agent#7903).

Vendor a self-contained, method-less copy of text/template under
internal/methodlesstemplate (doc.go/exec.go/funcs.go/option.go/template.go from
Go 1.25.8, plus internal/fmtsort), reusing stdlib text/template/parse unchanged.
The only edit to the copied code is removing the MethodByName branch in exec.go's
evalField (method resolution on the data value); the files are otherwise
byte-identical to their Go release, so re-syncing to a newer Go is a
diff-and-reapply of that single branch removal. Go's BSD LICENSE is preserved,
and the package is added to the golangci-lint path exclusions (matching
internal/gojsonschema) so upstream stdlib style is not linted against OPA's rules.

Point the error formatter at it. Locale format strings expand placeholders over
ErrorDetails (map[string]any), which has no methods, so this is
behavior-identical; the engine is retained in full, so ErrorTemplateFuncs (its
FuncMap extension point) keeps working unchanged. This adds no external
dependency. TestNoStdlibTextTemplateImport guards against reintroducing the
stdlib import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Dick Childress <dick.childress@icearp.net>
… template

The strings.render_template builtin used stdlib text/template, whose evalField
calls reflect.Value.MethodByName. A reachable non-constant MethodByName makes the
Go linker disable method-level dead-code elimination for the entire binary
(golang/go#72895); the builtin is registered in the topdown builtin table, so it
is reachable in every embedder that links Rego evaluation (open-policy-agent#7903).

Point the builtin at internal/methodlesstemplate (the vendored method-less copy
added in the preceding commit; no external dependency). Rego values decode to
map[string]any/[]any/scalars, which have no methods, so this is
behavior-identical: the v0/v1 rendertemplate conformance cases (range/if/variables
and missing-key -> <undefined>) pass unchanged. Full template syntax is preserved.

Add TestNoStdlibTextTemplateImport to prevent silently reintroducing the import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Dick Childress <dick.childress@icearp.net>
@srenatus

srenatus commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for contributing. This looks good, let's push it over the line. The test failure seems genuine? Please take a look.

@rchildress87

rchildress87 commented Jul 2, 2026

Copy link
Copy Markdown
Author

Agreed. It does look genuine. However, I was unable to recreate locally yesterday or today:

dickc@debian-desktop:~/Projects/github.com/rchildress87/opa$ git branch
  fix/dce-datadog
* fix/dce-vendor
  main
dickc@debian-desktop:~/Projects/github.com/rchildress87/opa$ go clean -testcache
dickc@debian-desktop:~/Projects/github.com/rchildress87/opa$ make go-test
make[1]: Entering directory '/home/dickc/Projects/github.com/rchildress87/opa/wasm'
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
make: '_obj/opa.wasm' is up to date.
make: '_obj/callgraph.csv' is up to date.
make[1]: Leaving directory '/home/dickc/Projects/github.com/rchildress87/opa/wasm'
cp wasm/_obj/opa.wasm internal/compiler/wasm/opa/opa.wasm
cp wasm/_obj/callgraph.csv internal/compiler/wasm/opa/callgraph.csv
CGO_ENABLED=0 GOFLAGS=""-buildmode=exe"" go generate
CGO_ENABLED=0 GOFLAGS=""-buildmode=exe"" go test  -tags=opa_wasm,slow ./...
?       github.com/open-policy-agent/opa        [no test files]
ok      github.com/open-policy-agent/opa/ast    0.010s
?       github.com/open-policy-agent/opa/ast/json       [no test files]
?       github.com/open-policy-agent/opa/ast/location   [no test files]
?       github.com/open-policy-agent/opa/build/generate-cli-docs        [no test files]
ok      github.com/open-policy-agent/opa/build/generate-extended-cases  2.162s
?       github.com/open-policy-agent/opa/build/generate-man     [no test files]
ok      github.com/open-policy-agent/opa/bundle 0.008s
?       github.com/open-policy-agent/opa/capabilities   [no test files]
ok      github.com/open-policy-agent/opa/cmd    254.417s
?       github.com/open-policy-agent/opa/cmd/formats    [no test files]
ok      github.com/open-policy-agent/opa/cmd/internal/env       0.002s
ok      github.com/open-policy-agent/opa/cmd/internal/exec      0.010s
ok      github.com/open-policy-agent/opa/compile        0.028s
?       github.com/open-policy-agent/opa/config [no test files]
?       github.com/open-policy-agent/opa/cover  [no test files]
?       github.com/open-policy-agent/opa/debug  [no test files]
?       github.com/open-policy-agent/opa/dependencies   [no test files]
?       github.com/open-policy-agent/opa/download       [no test files]
?       github.com/open-policy-agent/opa/features       [no test files]
?       github.com/open-policy-agent/opa/features/tracing       [no test files]
?       github.com/open-policy-agent/opa/features/wasm  [no test files]
ok      github.com/open-policy-agent/opa/format 0.003s
?       github.com/open-policy-agent/opa/hooks  [no test files]
?       github.com/open-policy-agent/opa/internal/bundle        [no test files]
ok      github.com/open-policy-agent/opa/internal/bundle/inspect        0.009s
?       github.com/open-policy-agent/opa/internal/cidr/merge    [no test files]
?       github.com/open-policy-agent/opa/internal/cmd/genbuiltinmetadata        [no test files]
ok      github.com/open-policy-agent/opa/internal/cmd/genmanifestschema 0.011s
?       github.com/open-policy-agent/opa/internal/cmd/genopacapabilities        [no test files]
ok      github.com/open-policy-agent/opa/internal/cmd/genplanschema     0.049s
?       github.com/open-policy-agent/opa/internal/cmd/genversionindex   [no test files]
?       github.com/open-policy-agent/opa/internal/compile       [no test files]
ok      github.com/open-policy-agent/opa/internal/compiler      0.006s
ok      github.com/open-policy-agent/opa/internal/compiler/wasm 0.018s
?       github.com/open-policy-agent/opa/internal/compiler/wasm/opa     [no test files]
ok      github.com/open-policy-agent/opa/internal/config        0.005s
?       github.com/open-policy-agent/opa/internal/debug [no test files]
ok      github.com/open-policy-agent/opa/internal/deepcopy      0.001s
ok      github.com/open-policy-agent/opa/internal/distributedtracing    0.006s
ok      github.com/open-policy-agent/opa/internal/edittree      0.016s
ok      github.com/open-policy-agent/opa/internal/edittree/bitvector    0.006s
?       github.com/open-policy-agent/opa/internal/file/archive  [no test files]
ok      github.com/open-policy-agent/opa/internal/file/url      0.002s
?       github.com/open-policy-agent/opa/internal/future        [no test files]
ok      github.com/open-policy-agent/opa/internal/genjsonschema 0.003s
ok      github.com/open-policy-agent/opa/internal/gojsonschema  0.231s
ok      github.com/open-policy-agent/opa/internal/json/patch    0.004s
ok      github.com/open-policy-agent/opa/internal/lcss  0.003s
ok      github.com/open-policy-agent/opa/internal/leb128        0.002s
?       github.com/open-policy-agent/opa/internal/levenshtein   [no test files]
ok      github.com/open-policy-agent/opa/internal/logging       0.002s
ok      github.com/open-policy-agent/opa/internal/merge 0.002s
?       github.com/open-policy-agent/opa/internal/methodlesstemplate    [no test files]
?       github.com/open-policy-agent/opa/internal/methodlesstemplate/internal/fmtsort   [no test files]
ok      github.com/open-policy-agent/opa/internal/metricsexport 10.008s
ok      github.com/open-policy-agent/opa/internal/pathwatcher   0.006s
ok      github.com/open-policy-agent/opa/internal/planner       0.019s
ok      github.com/open-policy-agent/opa/internal/presentation  0.010s
?       github.com/open-policy-agent/opa/internal/prometheus    [no test files]
ok      github.com/open-policy-agent/opa/internal/providers/aws 0.006s
ok      github.com/open-policy-agent/opa/internal/providers/aws/crypto  0.010s
ok      github.com/open-policy-agent/opa/internal/providers/aws/v4      0.002s
?       github.com/open-policy-agent/opa/internal/ref   [no test files]
?       github.com/open-policy-agent/opa/internal/rego/opa      [no test files]
ok      github.com/open-policy-agent/opa/internal/runtime/init  0.017s
ok      github.com/open-policy-agent/opa/internal/semver        0.002s
?       github.com/open-policy-agent/opa/internal/storage/mock  [no test files]
?       github.com/open-policy-agent/opa/internal/strings       [no test files]
ok      github.com/open-policy-agent/opa/internal/strvals       0.005s
ok      github.com/open-policy-agent/opa/internal/tlsutil       0.002s
ok      github.com/open-policy-agent/opa/internal/ucast 0.002s
ok      github.com/open-policy-agent/opa/internal/uuid  0.002s
?       github.com/open-policy-agent/opa/internal/version       [no test files]
ok      github.com/open-policy-agent/opa/internal/versioncheck  0.005s
?       github.com/open-policy-agent/opa/internal/wasm/constant [no test files]
ok      github.com/open-policy-agent/opa/internal/wasm/encoding 0.006s
?       github.com/open-policy-agent/opa/internal/wasm/instruction      [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/module   [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/opcode   [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/sdk/examples/basic       [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/sdk/examples/loaders     [no test files]
ok      github.com/open-policy-agent/opa/internal/wasm/sdk/internal/wasm        0.125s
ok      github.com/open-policy-agent/opa/internal/wasm/sdk/opa  1.233s
?       github.com/open-policy-agent/opa/internal/wasm/sdk/opa/capabilities     [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/sdk/opa/errors   [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/sdk/opa/loader   [no test files]
ok      github.com/open-policy-agent/opa/internal/wasm/sdk/opa/loader/file      0.014s
ok      github.com/open-policy-agent/opa/internal/wasm/sdk/opa/loader/http      0.015s
?       github.com/open-policy-agent/opa/internal/wasm/types    [no test files]
?       github.com/open-policy-agent/opa/internal/wasm/util     [no test files]
?       github.com/open-policy-agent/opa/ir     [no test files]
ok      github.com/open-policy-agent/opa/ir/encoding    0.004s
?       github.com/open-policy-agent/opa/keys   [no test files]
ok      github.com/open-policy-agent/opa/loader 0.006s
?       github.com/open-policy-agent/opa/loader/extension       [no test files]
?       github.com/open-policy-agent/opa/loader/filter  [no test files]
?       github.com/open-policy-agent/opa/logging        [no test files]
?       github.com/open-policy-agent/opa/logging/test   [no test files]
?       github.com/open-policy-agent/opa/metrics        [no test files]
ok      github.com/open-policy-agent/opa/plugins        0.004s
?       github.com/open-policy-agent/opa/plugins/bundle [no test files]
?       github.com/open-policy-agent/opa/plugins/discovery      [no test files]
?       github.com/open-policy-agent/opa/plugins/logs   [no test files]
?       github.com/open-policy-agent/opa/plugins/logs/status    [no test files]
?       github.com/open-policy-agent/opa/plugins/rest   [no test files]
?       github.com/open-policy-agent/opa/plugins/server [no test files]
?       github.com/open-policy-agent/opa/plugins/server/decoding        [no test files]
?       github.com/open-policy-agent/opa/plugins/server/encoding        [no test files]
?       github.com/open-policy-agent/opa/plugins/server/metrics [no test files]
?       github.com/open-policy-agent/opa/plugins/status [no test files]
?       github.com/open-policy-agent/opa/profiler       [no test files]
?       github.com/open-policy-agent/opa/refactor       [no test files]
ok      github.com/open-policy-agent/opa/rego   0.005s
ok      github.com/open-policy-agent/opa/repl   0.006s
?       github.com/open-policy-agent/opa/resolver       [no test files]
?       github.com/open-policy-agent/opa/resolver/wasm  [no test files]
?       github.com/open-policy-agent/opa/runtime        [no test files]
?       github.com/open-policy-agent/opa/schemas        [no test files]
ok      github.com/open-policy-agent/opa/sdk    0.009s
?       github.com/open-policy-agent/opa/sdk/test       [no test files]
?       github.com/open-policy-agent/opa/server [no test files]
?       github.com/open-policy-agent/opa/server/authorizer      [no test files]
?       github.com/open-policy-agent/opa/server/handlers        [no test files]
?       github.com/open-policy-agent/opa/server/identifier      [no test files]
?       github.com/open-policy-agent/opa/server/types   [no test files]
?       github.com/open-policy-agent/opa/server/writer  [no test files]
?       github.com/open-policy-agent/opa/storage        [no test files]
?       github.com/open-policy-agent/opa/storage/disk   [no test files]
?       github.com/open-policy-agent/opa/storage/inmem  [no test files]
?       github.com/open-policy-agent/opa/storage/inmem/test     [no test files]
?       github.com/open-policy-agent/opa/test/authz     [no test files]
?       github.com/open-policy-agent/opa/test/cases     [no test files]
?       github.com/open-policy-agent/opa/test/e2e       [no test files]
?       github.com/open-policy-agent/opa/test/e2e/logs  [no test files]
ok      github.com/open-policy-agent/opa/tester 0.005s
?       github.com/open-policy-agent/opa/topdown        [no test files]
?       github.com/open-policy-agent/opa/topdown/builtins       [no test files]
?       github.com/open-policy-agent/opa/topdown/cache  [no test files]
?       github.com/open-policy-agent/opa/topdown/copypropagation        [no test files]
?       github.com/open-policy-agent/opa/topdown/lineage        [no test files]
?       github.com/open-policy-agent/opa/topdown/print  [no test files]
?       github.com/open-policy-agent/opa/tracing        [no test files]
?       github.com/open-policy-agent/opa/types  [no test files]
?       github.com/open-policy-agent/opa/util   [no test files]
?       github.com/open-policy-agent/opa/util/decoding  [no test files]
?       github.com/open-policy-agent/opa/util/test      [no test files]
?       github.com/open-policy-agent/opa/v1     [no test files]
ok      github.com/open-policy-agent/opa/v1/ast 3.064s
ok      github.com/open-policy-agent/opa/v1/ast/internal/scanner        0.003s
?       github.com/open-policy-agent/opa/v1/ast/internal/tokens [no test files]
?       github.com/open-policy-agent/opa/v1/ast/json    [no test files]
ok      github.com/open-policy-agent/opa/v1/ast/location        0.003s
ok      github.com/open-policy-agent/opa/v1/ast/oracle  0.014s
ok      github.com/open-policy-agent/opa/v1/bundle      1.136s
ok      github.com/open-policy-agent/opa/v1/capabilities        0.207s
ok      github.com/open-policy-agent/opa/v1/compile     0.394s
ok      github.com/open-policy-agent/opa/v1/config      0.012s
ok      github.com/open-policy-agent/opa/v1/cover       0.022s
ok      github.com/open-policy-agent/opa/v1/debug       0.102s
ok      github.com/open-policy-agent/opa/v1/dependencies        0.026s
ok      github.com/open-policy-agent/opa/v1/download    11.047s
?       github.com/open-policy-agent/opa/v1/features/tracing    [no test files]
?       github.com/open-policy-agent/opa/v1/features/wasm       [no test files]
ok      github.com/open-policy-agent/opa/v1/format      0.157s
?       github.com/open-policy-agent/opa/v1/hooks       [no test files]
ok      github.com/open-policy-agent/opa/v1/ir  0.002s
ok      github.com/open-policy-agent/opa/v1/ir/encoding 0.007s
ok      github.com/open-policy-agent/opa/v1/keys        0.002s
ok      github.com/open-policy-agent/opa/v1/loader      0.021s
ok      github.com/open-policy-agent/opa/v1/loader/extension    0.004s
?       github.com/open-policy-agent/opa/v1/loader/filter       [no test files]
ok      github.com/open-policy-agent/opa/v1/logging     0.004s
?       github.com/open-policy-agent/opa/v1/logging/test        [no test files]
ok      github.com/open-policy-agent/opa/v1/metrics     0.009s
ok      github.com/open-policy-agent/opa/v1/plugins     0.010s
ok      github.com/open-policy-agent/opa/v1/plugins/bundle      3.063s
ok      github.com/open-policy-agent/opa/v1/plugins/discovery   0.111s
ok      github.com/open-policy-agent/opa/v1/plugins/logger/file 0.021s
ok      github.com/open-policy-agent/opa/v1/plugins/logs        8.304s
?       github.com/open-policy-agent/opa/v1/plugins/logs/status [no test files]
ok      github.com/open-policy-agent/opa/v1/plugins/rest        3.504s
ok      github.com/open-policy-agent/opa/v1/plugins/server/decoding     0.002s
ok      github.com/open-policy-agent/opa/v1/plugins/server/encoding     0.002s
ok      github.com/open-policy-agent/opa/v1/plugins/server/metrics      0.003s
ok      github.com/open-policy-agent/opa/v1/plugins/status      1.019s
ok      github.com/open-policy-agent/opa/v1/profiler    0.144s
ok      github.com/open-policy-agent/opa/v1/refactor    0.009s
ok      github.com/open-policy-agent/opa/v1/rego        4.426s
ok      github.com/open-policy-agent/opa/v1/rego/compile        0.010s
ok      github.com/open-policy-agent/opa/v1/repl        0.313s
?       github.com/open-policy-agent/opa/v1/resolver    [no test files]
?       github.com/open-policy-agent/opa/v1/resolver/wasm       [no test files]
ok      github.com/open-policy-agent/opa/v1/runtime     2.933s
?       github.com/open-policy-agent/opa/v1/runtime/info        [no test files]
ok      github.com/open-policy-agent/opa/v1/schemas     0.002s
ok      github.com/open-policy-agent/opa/v1/sdk 0.310s
?       github.com/open-policy-agent/opa/v1/sdk/test    [no test files]
ok      github.com/open-policy-agent/opa/v1/server      1.239s
ok      github.com/open-policy-agent/opa/v1/server/authorizer   0.029s
ok      github.com/open-policy-agent/opa/v1/server/failtracer   0.004s
ok      github.com/open-policy-agent/opa/v1/server/handlers     0.005s
ok      github.com/open-policy-agent/opa/v1/server/identifier   0.015s
ok      github.com/open-policy-agent/opa/v1/server/types        0.005s
?       github.com/open-policy-agent/opa/v1/server/writer       [no test files]
ok      github.com/open-policy-agent/opa/v1/storage     0.006s
ok      github.com/open-policy-agent/opa/v1/storage/disk        6.233s
ok      github.com/open-policy-agent/opa/v1/storage/inmem       0.021s
?       github.com/open-policy-agent/opa/v1/storage/inmem/test  [no test files]
ok      github.com/open-policy-agent/opa/v1/storage/internal/errors     0.008s [no tests to run]
ok      github.com/open-policy-agent/opa/v1/storage/internal/ptr        0.004s [no tests to run]
ok      github.com/open-policy-agent/opa/v1/test/authz  0.077s
?       github.com/open-policy-agent/opa/v1/test/cases  [no test files]
?       github.com/open-policy-agent/opa/v1/test/cases/internal/fmtcases        [no test files]
?       github.com/open-policy-agent/opa/v1/test/cases/internal/keywordrefs     [no test files]
?       github.com/open-policy-agent/opa/v1/test/e2e    [no test files]
ok      github.com/open-policy-agent/opa/v1/test/e2e/authz      0.140s [no tests to run]
ok      github.com/open-policy-agent/opa/v1/test/e2e/certrefresh        0.187s
ok      github.com/open-policy-agent/opa/v1/test/e2e/concurrency        2.968s
ok      github.com/open-policy-agent/opa/v1/test/e2e/diagnostics        0.155s
ok      github.com/open-policy-agent/opa/v1/test/e2e/distributedtracing 0.665s
ok      github.com/open-policy-agent/opa/v1/test/e2e/h2c        1.308s
ok      github.com/open-policy-agent/opa/v1/test/e2e/http       0.163s
?       github.com/open-policy-agent/opa/v1/test/e2e/logs       [no test files]
ok      github.com/open-policy-agent/opa/v1/test/e2e/logs/console       0.132s
ok      github.com/open-policy-agent/opa/v1/test/e2e/metrics    0.142s
ok      github.com/open-policy-agent/opa/v1/test/e2e/metricsexport      1.231s
ok      github.com/open-policy-agent/opa/v1/test/e2e/oci        6.115s
ok      github.com/open-policy-agent/opa/v1/test/e2e/print      0.366s
ok      github.com/open-policy-agent/opa/v1/test/e2e/shutdown   2.128s
ok      github.com/open-policy-agent/opa/v1/test/e2e/tls        0.209s
ok      github.com/open-policy-agent/opa/v1/test/e2e/wasm/authz 0.366s [no tests to run]
ok      github.com/open-policy-agent/opa/v1/test/scheduler      0.108s
?       github.com/open-policy-agent/opa/v1/test/wasm/cmd/wasm-rego-testgen     [no test files]
ok      github.com/open-policy-agent/opa/v1/tester      14.467s
ok      github.com/open-policy-agent/opa/v1/topdown     26.520s
?       github.com/open-policy-agent/opa/v1/topdown/builtins    [no test files]
ok      github.com/open-policy-agent/opa/v1/topdown/cache       1.104s
ok      github.com/open-policy-agent/opa/v1/topdown/copypropagation     0.003s
?       github.com/open-policy-agent/opa/v1/topdown/durationparser      [no test files]
ok      github.com/open-policy-agent/opa/v1/topdown/lineage     0.006s
?       github.com/open-policy-agent/opa/v1/topdown/print       [no test files]
?       github.com/open-policy-agent/opa/v1/tracing     [no test files]
ok      github.com/open-policy-agent/opa/v1/types       0.002s
ok      github.com/open-policy-agent/opa/v1/util        0.006s
?       github.com/open-policy-agent/opa/v1/util/decoding       [no test files]
?       github.com/open-policy-agent/opa/v1/util/test   [no test files]
?       github.com/open-policy-agent/opa/v1/version     [no test files]
?       github.com/open-policy-agent/opa/version        [no test files]

I'm admittedly not very familiar with testing and pipelines on this project. Anything else I should be doing besides make go-test? I cannot run a test on macOS locally but will look into the test logic some more.

@rchildress87 rchildress87 marked this pull request as draft July 2, 2026 17:31
@rchildress87 rchildress87 marked this pull request as ready for review July 2, 2026 17:31
@rchildress87

Copy link
Copy Markdown
Author

I think this may just be a one-off with that particular test. @srenatus Will you re-run failed jobs for me when you have a moment?

@rchildress87

Copy link
Copy Markdown
Author

@srenatus, thank you.

@srenatus

srenatus commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Cool. Say, would you mind adding a script that replicates what needs to be done for pulling in the sources from Go? It would be nice to just use, say, ./refresh.sh when there's a new stdlib with (potential) changes.

@rchildress87

rchildress87 commented Jul 3, 2026 via email

Copy link
Copy Markdown
Author

@srenatus

srenatus commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Please don't give up. Would be a shame to leave this to rot. 😅

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.

Use of text/template is causing DCE (dead code elimination) to be disabled

2 participants