forkport

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MPL-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package forkport is the registry of choudoufu's fork ports on OpenTofu's new runtime (#2376, unit F0 of #2256).

A fork port fills a gap in the new runtime (internal/engine) with the fork's own code until upstream's lands, and is built to be deleted:

  • its code is one package, internal/engine/forkport/<name>, plus call sites in upstream code, each commented "choudoufu fork port (<issue>): remove when upstream <#N> lands";
  • it is listed in Ports below, with the gap rows it fills in internal/live/newruntime/gaps.json and the upstream issues whose closing expires it;
  • each of those rows names it in "fork_port" and its switch in "switch", and lists the same upstream issues;
  • the port's code, and the gap table's checks for what the port covers, ask Enabled whether it is on. Off, the row that refused the construct before the port refuses it again.

internal/live/newruntime's TestForkPortRegistry holds the registry, the packages and the gap rows to each other. scripts/upstream-sync.sh --report prints each port's expiry issues and flags "EXPIRE: remove port <name>" once all of them have closed.

Index

Constants

View Source
const AllOff = "CHOUDOUFU_NEW_RUNTIME_NO_FORK_PORTS"

AllOff turns every fork port off when set to any non-empty value.

Variables

View Source
var Ports = []Port{
	{Name: "inrunestates", Rows: []string{"in-run-estates"}, Expiry: []string{"#4058"}},
	{Name: "cancel", Rows: []string{"cancel"}},
	{Name: "tracing", Rows: []string{"tracing-spans"}},
	{Name: "replacecycle", Rows: []string{"replace-cbd-cycle"}, Expiry: []string{"#4714"}},
	{Name: "deferral", Rows: []string{"deferral"}, Expiry: []string{"#4697"}},
	{Name: "conditions", Rows: []string{"variable-validation"}},
	{Name: "forget", Rows: []string{"removed", "lifecycle-destroy"}, Expiry: []string{"#4682", "#4686", "#4693"}},
	{Name: "checkrules", Rows: []string{"checks-conditions"}, Expiry: []string{"#4390"}},
	{Name: "sensitive", Rows: []string{"sensitive"}, Expiry: []string{"#4360"}},
	{Name: "datasources", Rows: []string{"data-sources"}, Expiry: []string{"#4058", "#4740"}},
}

Ports is the registry. Adding a port is one entry here, its package, its call sites and its gap row.

Functions

func Enabled

func Enabled(name string) bool

Enabled reports whether the named port is on: neither AllOff nor its own Switch is set. This is the only place either is read. It panics on a name that is not registered, so a port cannot be consulted before it is listed.

func Switch

func Switch(name string) string

Switch is the variable that turns the named port off: CHOUDOUFU_NEW_RUNTIME_NO_PORT_<NAME>.

Types

type Port

type Port struct {
	// Name is the port's package name, internal/engine/forkport/<Name>.
	Name string
	// Rows are the ids of the gap rows the port fills.
	Rows []string
	// Expiry lists the upstream opentofu/opentofu issues, as "#NNNN", that
	// end the port: when every one has closed, upstream's code replaces it.
	// Empty when no upstream issue is filed: the port goes when its rows close.
	Expiry []string
}

Port is one registered fork port.

func Lookup

func Lookup(name string) (Port, bool)

Lookup returns the registered port with name, and whether there is one.

Directories

Path Synopsis
Package cancel is a choudoufu fork port (#2381, unit W4 of #2256): stop and Ctrl-C on OpenTofu's new runtime (internal/engine).
Package cancel is a choudoufu fork port (#2381, unit W4 of #2256): stop and Ctrl-C on OpenTofu's new runtime (internal/engine).
Package checkrules is a choudoufu fork port (#2409, of #2256): check blocks and resource preconditions and postconditions on OpenTofu's new runtime, until upstream's #4390 lands.
Package checkrules is a choudoufu fork port (#2409, of #2256): check blocks and resource preconditions and postconditions on OpenTofu's new runtime, until upstream's #4390 lands.
Package conditions is a choudoufu fork port (#2379, of #2256): a condition result derived from a sensitive or ephemeral value, on OpenTofu's new runtime.
Package conditions is a choudoufu fork port (#2379, of #2256): a condition result derived from a sensitive or ephemeral value, on OpenTofu's new runtime.
Package datasources is a choudoufu fork port (#2414, of #2256): data sources on OpenTofu's new runtime (internal/engine), until upstream's `#4058` and its pull request `#4740` land.
Package datasources is a choudoufu fork port (#2414, of #2256): data sources on OpenTofu's new runtime (internal/engine), until upstream's `#4058` and its pull request `#4740` land.
Package deferral is a choudoufu fork port (#2382, unit W5 of #2256): deferral reasons on OpenTofu's new runtime (internal/engine).
Package deferral is a choudoufu fork port (#2382, unit W5 of #2256): deferral reasons on OpenTofu's new runtime (internal/engine).
Package forget is a choudoufu fork port (#2409, wave 2 of #2256): removed blocks and lifecycle { destroy = false } on OpenTofu's new runtime (internal/engine).
Package forget is a choudoufu fork port (#2409, wave 2 of #2256): removed blocks and lifecycle { destroy = false } on OpenTofu's new runtime (internal/engine).
Package inrunestates is a choudoufu fork port (#2370, unit U9 of #2256): in-run estates and the fork's builtin terraform_estate_outputs data source on OpenTofu's new runtime (internal/engine).
Package inrunestates is a choudoufu fork port (#2370, unit U9 of #2256): in-run estates and the fork's builtin terraform_estate_outputs data source on OpenTofu's new runtime (internal/engine).
Package replacecycle is choudoufu fork port (#2380): remove when upstream #4714 lands.
Package replacecycle is choudoufu fork port (#2380): remove when upstream #4714 lands.
Package sensitive is a choudoufu fork port (#2410, of #2256): sensitive values on OpenTofu's new runtime (internal/engine).
Package sensitive is a choudoufu fork port (#2410, of #2256): sensitive values on OpenTofu's new runtime (internal/engine).
Package tracing is a choudoufu fork port (#2381, unit W4 of #2256): the fork's per-walk and per-resource-instance OpenTelemetry spans (GitHub issue #1898) on OpenTofu's new runtime (internal/engine).
Package tracing is a choudoufu fork port (#2381, unit W4 of #2256): the fork's per-walk and per-resource-instance OpenTelemetry spans (GitHub issue #1898) on OpenTofu's new runtime (internal/engine).

Jump to

Keyboard shortcuts

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