# Functions
CanSetMaxSlots returns an error if slotsReq differs from an invariant config or violates a constraint.
CheckExperimentConstraints returns an error if the NTSC config fails constraint checks.
CheckNTSCConstraints returns an error if the NTSC config fails constraint checks.
ConfigPolicyWarning logs a warning for the configuration policy component.
DeleteConfigPolicies deletes the invariant experiment config and constraints for the given scope (global or workspace-level) and workload type.
GetConfigPolicyField fetches the accessField from an invariant_config or constraints policy (determined by policyType) in order of precedence.
GetMergedConstraints retrieves Workspace and Global constraints and returns a merged result.
GetTaskConfigPolicies retrieves the invariant config and constraints for the given scope (global or workspace-level) and workload Type.
MarshalConfigPolicy packs a config policy into a proto struct.
MergeWithInvariantExperimentConfigs merges the config with workspace and global invariant configs, where a global invariant config takes precedence over a workspace-level invariant config.
PriorityUpdateAllowed returns true if the desired priority is within the task config policy limit.
SetTaskConfigPolicies adds the task invariant config and constraints config policies to the database.
SetTaskConfigPoliciesTx adds the task invariant config and constraints policies to the database.
UnmarshalConfigPolicies unmarshals optionally specified invariant config and constraint configurations presented as YAML or JSON strings.
UnmarshalConfigPolicy is a generic helper function to unmarshal both JSON and YAML strings.
ValidateExperimentConfig validates a model.ExperimentType config & constraints.
ValidateNTSCConfig validates a model.NTSCType config & constraints.
ValidWorkloadType checks if the string is an accepted WorkloadType.
# Constants
DefaultConstraintsStr is the default constraints val used for tests.
DefaultInvariantConfigStr is the default invariant config val used for tests.
GlobalConfigConflictErr is the error reported when an invariant config has a conflict with a value already set in the global config.
InvalidExperimentConfigPolicyErr is the error reported by an invalid experiment config policy.
InvalidNTSCConfigPolicyErr is the error reported by an invalid NTSC config policy.
NotSupportedConfigPolicyErr is the error reported when admins attempt to set NTSC invariant config.
SlotsAlreadySetErr is the error reported when slots are already set in an invariant config.
SlotsReqTooHighErr is the error reported when the requested slots violates the max slots constraint.
# Variables
AuthZProvider providers WorkspaceAuthZ implementations.
# Structs
ConfigPolicyAuthZBasic is classic OSS controls.
ConfigPolicyAuthZPermissive is the permission implementation.
ConfigPolicyAuthZRBAC is RBAC authorization for config policies.
ExperimentConfigPolicies is the invariant config and constraints for an experiment.
NTSCConfigPolicies is the invariant config and constraints for an NTSC task.
# Interfaces
ConfigPolicyAuthZ describes authz methods for config policies.