pdb-compat-allowlist

command
v1.43.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Command pdb-compat-allowlist writes internal/pdbcompat/allowlist_gen.go.

It copies the Path A prepare_query allowlists from schema.PrepareQueryAllows in ent/schema/pdb_allowlists.go. It loads the ent schema graph from ./ent/schema to build FilterExcludes (upstream FILTER_EXCLUDE parity) and the Path B edge map, keyed by PeeringDB type string. The edge map holds the outgoing ent edges of each type plus the column edges declared in schema.ColumnEdges (same file as PrepareQueryAllows). A column edge that does not match the ent graph stops codegen. The edge map is emitted at codegen time, so the server does not walk client.Schema.Tables at runtime, and the go generate drift check covers the output.

Invoked from ent/generate.go after ent codegen so the gen.Graph reflects the latest schema annotations.

Usage:

go run ./cmd/pdb-compat-allowlist

Working directory is expected to be the repo root; paths are relative to that (./ent/schema input, ./internal/pdbcompat/ allowlist_gen.go output).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL