Documentation
¶
Index ¶
- Constants
- Variables
- func ActiveAppConfigs(appID string) func(*gorm.DB) *gorm.DB
- func BranchInstallsWithDB(ctx context.Context, db *gorm.DB, branchID string) ([]app.Install, error)
- func BranchPreviewConfigOrDefault(cfg *app.AppBranchConfig) app.AppBranchPreviewConfig
- func GetActionReferences(cfg *app.AppConfig, action string) []refs.Ref
- func GetComponentReferences(cfg *app.AppConfig, comp string) []refs.Ref
- func GetFakeSandboxStackData(appCfg *app.AppConfig, region string, stateMap map[string]interface{}) map[string]any
- func GetStackReferences(cfg *app.AppConfig) []refs.Ref
- func InstallGroupsMatching(groups []app.AppBranchInstallGroup, install *app.Install) []string
- func InstallMatchesGroup(group *app.AppBranchInstallGroup, install *app.Install) bool
- func IsEmail(email string) bool
- func LatestConfigInstallGroupsWithDB(ctx context.Context, db *gorm.DB, branchID string) ([]app.AppBranchInstallGroup, error)
- func NoMatchingInstallGroupError(install *app.Install) error
- func PreloadAppActionWorkflowConfigs(db *gorm.DB) *gorm.DB
- func PreloadAppBreakGlassConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigComponentConfigConnections(db *gorm.DB) *gorm.DB
- func PreloadAppConfigInputConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigKubernetesContextsConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigPermissionsConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigPolicyConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigRunnerConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigSandboxConfig(db *gorm.DB) *gorm.DB
- func PreloadAppConfigStackConfig(db *gorm.DB) *gorm.DB
- func PreloadAppOperationRoleConfig(db *gorm.DB) *gorm.DB
- func PreloadAppSecretsConfig(db *gorm.DB) *gorm.DB
- func PreloadComponentConfigConnection(db *gorm.DB) *gorm.DB
- func PreloadComponentConfigConnections(db *gorm.DB) *gorm.DB
- func ReconcileBranchInstallAppBranchGroupsWithDB(ctx context.Context, db *gorm.DB, branchID string, ...) error
- func ReconcileInstallAppBranchGroupWithDB(ctx context.Context, db *gorm.DB, installID string) error
- func ResolveInstallGroup(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, error)
- func ResolveInstallGroupAssignment(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, app.InstallAppBranchGroupAssignmentSource, error)
- func SetInstallAppBranchGroupAssignmentWithDB(ctx context.Context, db *gorm.DB, installID, branchID, group string, ...) error
- func SetInstallAppBranchGroupWithDB(ctx context.Context, db *gorm.DB, installID, branchID, group string) error
- func SetInstallAppBranchWithDB(ctx context.Context, db *gorm.DB, installID, branchID string) error
- func ValidateBranchInstallsSingleGroupWithDB(ctx context.Context, db *gorm.DB, branchID string, ...) error
- func ValidateIgnoreChangesRegex(pattern string) error
- func ValidateInstallSingleGroup(groups []app.AppBranchInstallGroup, install *app.Install) error
- func WithDefaultInstallGroup(groups []app.AppBranchInstallGroup) []app.AppBranchInstallGroup
- type CreateAppBranchRunRequest
- type EnsureAppBranchQueuesOptions
- type Helpers
- func (h *Helpers) BranchInstalls(ctx context.Context, branchID string) ([]app.Install, error)
- func (h *Helpers) BuildAppBranchRunPreview(ctx context.Context, appID string, branchConfig *app.AppBranchConfig, ...) (*app.AppBranchRunPreview, error)
- func (h *Helpers) CliVerisionAllowed(ctx context.Context, version string) (bool, error)
- func (h *Helpers) CreateAppBranch(ctx context.Context, appID string, name string, opts ...app.AppBranchManagedBy) (*app.AppBranch, error)
- func (h *Helpers) CreateAppBranchConfig(ctx context.Context, appBranchID string, ...) (*app.AppBranchConfig, error)
- func (h *Helpers) CreateAppBranchConfigWithDB(ctx context.Context, db *gorm.DB, appBranchID string, ...) (*app.AppBranchConfig, error)
- func (h *Helpers) CreateAppBranchRun(ctx context.Context, req *CreateAppBranchRunRequest) (*app.AppBranchRun, error)
- func (h *Helpers) CreateAppBranchWithDB(ctx context.Context, db *gorm.DB, appID string, name string, ...) (*app.AppBranch, error)
- func (h *Helpers) CreateAppSandboxQueue(ctx context.Context, appID string) error
- func (s *Helpers) CreateAppWorkflow(ctx context.Context, appID string, workflowType app.WorkflowType, ...) (*app.Workflow, error)
- func (s *Helpers) CreateAppWorkflowWithRequest(ctx context.Context, appID string, workflowType app.WorkflowType, ...) (*app.Workflow, error)
- func (s *Helpers) CreateWorkflow(ctx context.Context, appBranchID string, workflowType app.WorkflowType, ...) (*app.Workflow, error)
- func (s *Helpers) CreateWorkflowWithDB(ctx context.Context, db *gorm.DB, ownerID, ownerType string, ...) (*app.Workflow, error)
- func (s *Helpers) DeleteAppComponent(ctx context.Context, compID string) error
- func (h *Helpers) EnqueueAppBranchConfigSignals(ctx context.Context, appBranchID, appBranchConfigID string) error
- func (h *Helpers) EnqueueAppBranchCreatedIfFirst(ctx context.Context, appBranchID, appBranchConfigID string) error
- func (h *Helpers) EnsureAppBranchQueue(ctx context.Context, branchID string) error
- func (h *Helpers) EnsureAppBranchQueues(ctx context.Context, branchID string, opts ...EnsureAppBranchQueuesOptions) error
- func (h *Helpers) EnsureAppQueue(ctx context.Context, appID string) error
- func (h *Helpers) EnsureAppTriggerQueue(ctx context.Context, appID string) (*app.Queue, error)
- func (h *Helpers) FetchAppBranchesWithConfigs(ctx context.Context, appID string) ([]app.AppBranch, error)
- func (h *Helpers) FindBaseAppBranchRun(ctx context.Context, appBranchID string) (*app.AppBranchRun, error)
- func (h *Helpers) FindBaseAppBranchRunForHead(ctx context.Context, headRun *app.AppBranchRun) (*app.AppBranchRun, error)
- func (h *Helpers) GetAppBundleAppConfig(ctx context.Context, orgID, appID, appConfigID string) (*app.AppConfig, error)
- func (s *Helpers) GetAppComponents(ctx context.Context, appID string) ([]app.Component, error)
- func (h *Helpers) GetAppComponentsAtConfigVersion(ctx context.Context, appID string, appCfgVersion int, componentIDs []string) ([]app.Component, error)
- func (s *Helpers) GetAppInstalls(ctx context.Context, appID string) ([]app.Install, error)
- func (h *Helpers) GetComponentDependents(ctx context.Context, appCfgID string, compID string) ([]string, error)
- func (s *Helpers) GetComponents(ctx context.Context, compIDs []string) ([]app.Component, error)
- func (h *Helpers) GetConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)
- func (h *Helpers) GetConfigDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)
- func (h *Helpers) GetConfigGraph(ctx context.Context, cfg *app.AppConfig) (graph.Graph[string, *app.Component], error)
- func (h *Helpers) GetConfigReverseDefaultComponentOrder(ctx context.Context, cfg *app.AppConfig) ([]string, error)
- func (h *Helpers) GetFullAppConfig(ctx context.Context, appConfigID string, skipAdditionalChecks bool) (*app.AppConfig, error)
- func (h *Helpers) GetLatestActiveAppConfig(ctx context.Context, appID string) (*app.AppConfig, error)
- func (h *Helpers) GetLatestActiveAppConfigBare(ctx context.Context, appID string) (*app.AppConfig, error)
- func (h *Helpers) GetLatestActiveAppConfigForBranch(ctx context.Context, appID, branchID string) (*app.AppConfig, error)
- func (h *Helpers) GetPoliciesConfigByAppConfigID(ctx context.Context, appConfigID string) (*app.AppPoliciesConfig, error)
- func (h *Helpers) GetReverseConfigComponentDeployOrder(ctx context.Context, cfg *app.AppConfig, compID string) ([]string, error)
- func (h *Helpers) LatestConfigInstallGroups(ctx context.Context, branchID string) ([]app.AppBranchInstallGroup, error)
- func (h *Helpers) ListPreviewInstallCandidates(ctx context.Context, appID string, _ string, _ app.AppBranchPreviewConfig) ([]app.Install, error)
- func (h *Helpers) ListPreviewSources(ctx context.Context, branch *app.AppBranch, config *app.AppBranchConfig) (*ListPreviewSourcesResult, error)
- func (h *Helpers) QueueClient() *queueclient.Client
- func (h *Helpers) ReconcileInstallAppBranchGroup(ctx context.Context, installID string) error
- func (h *Helpers) ResolvePreviewBaselineAppConfig(ctx context.Context, runID, appBranchID string) (*PreviewBaselineAppConfig, error)
- func (h *Helpers) ResolvePreviewInstallID(ctx context.Context, appID string, cfg app.AppBranchPreviewConfig, ...) (installID, installName string, err error)
- func (h *Helpers) ResumeAppBranchRun(ctx context.Context, run *app.AppBranchRun, req *TriggerAppBranchRunRequest) (*TriggerAppBranchRunResponse, error)
- func (h *Helpers) SetInstallAppBranch(ctx context.Context, installID, branchID string) error
- func (h *Helpers) SetInstallAppBranchGroup(ctx context.Context, installID, branchID, group string) error
- func (h *Helpers) SetInstallAppBranchGroupAssignment(ctx context.Context, installID, branchID, group string, ...) error
- func (h *Helpers) TriggerAppBranchRun(ctx context.Context, req *TriggerAppBranchRunRequest) (*TriggerAppBranchRunResponse, error)
- func (h *Helpers) UploadCustomNestedStackTemplates(ctx context.Context, db *gorm.DB, stackConfig *app.AppStackConfig) error
- func (h *Helpers) VCSHelpers() *vcshelpers.Helpers
- func (h *Helpers) ValidateBranchInstallsSingleGroup(ctx context.Context, branchID string, groups []app.AppBranchInstallGroup) error
- func (h *Helpers) ValidateGraph(ctx context.Context, appID string) error
- func (h *Helpers) ValidateInstallLabelsSingleGroup(ctx context.Context, install *app.Install, newLabels labels.Labels) error
- func (h *Helpers) ValidateSameRepo(branches []app.AppBranch, vcsConfigReq *vcshelpers.VCSConfigRequest) error
- type IgnoreChangesSettings
- type ListPreviewSourcesResult
- type Params
- type PreviewBaselineAppConfig
- type PreviewRunInput
- type PreviewSourceBranch
- type PreviewSourcePR
- type ResolvedPreviewRun
- type TriggerAppBranchRunRequest
- type TriggerAppBranchRunResponse
Constants ¶
const ( AppWorkflowsQueueName = queuenames.AppWorkflowsQueueName AppSignalsQueueName = queuenames.AppSignalsQueueName AppWorkflowStepGroupsQueueName = queuenames.AppWorkflowStepGroupsQueueName AppWorkflowStepsQueueName = queuenames.AppWorkflowStepsQueueName AppGenerateStepsQueueName = queuenames.AppGenerateStepsQueueName AppInstallSyncsQueueName = queuenames.AppInstallSyncsQueueName )
const AppBranchDefaultMaxInFlight = 25
const AppBranchSandboxBuildsQueueName = queuenames.AppBranchSandboxBuildsQueueName
const (
DefaultAppBranchInstallGroupName = "default"
)
Variables ¶
var ErrAppBranchNotFound = errors.New("app branch not found")
Functions ¶
func ActiveAppConfigs ¶ added in v0.19.1126
ActiveAppConfigs restricts a query to the app's configs that finished syncing. A pending, syncing or errored config has no component_ids and no config records, so it must never stand in as the app's current config.
Ordering must be chained on the query builder by the caller, NOT added here: an Order clause inside a scope is dropped at execution time, which silently turns "newest active config" into First()'s primary-key ordering (i.e. the config with the smallest ID).
func BranchInstallsWithDB ¶ added in v0.19.1188
Callers inside a transaction must use this so they see their own writes.
func BranchPreviewConfigOrDefault ¶ added in v0.19.1158
func BranchPreviewConfigOrDefault(cfg *app.AppBranchConfig) app.AppBranchPreviewConfig
func GetComponentReferences ¶
NOTE(jm): this is a function, because it is used directly within a workflow.
func GetFakeSandboxStackData ¶ added in v0.19.850
func GetFakeSandboxStackData(appCfg *app.AppConfig, region string, stateMap map[string]interface{}) map[string]any
GetFakeSandboxStackData builds a fake stack output map for sandbox mode orgs, using real keys from the app config with random fake values. stateMap is used to render templated role names (e.g. "{{.install.name}}-admin"). NOTE: this is a standalone function because it is used directly within workflows.
func InstallGroupsMatching ¶ added in v0.19.1188
func InstallGroupsMatching(groups []app.AppBranchInstallGroup, install *app.Install) []string
func InstallMatchesGroup ¶ added in v0.19.1188
func InstallMatchesGroup(group *app.AppBranchInstallGroup, install *app.Install) bool
func LatestConfigInstallGroupsWithDB ¶ added in v0.19.1214
func NoMatchingInstallGroupError ¶ added in v0.19.1214
func PreloadAppActionWorkflowConfigs ¶
preload action workflow configs
func PreloadAppBreakGlassConfig ¶
break glass config
func PreloadAppConfigComponentConfigConnections ¶
component config connections
func PreloadAppConfigInputConfig ¶
input config
func PreloadAppConfigKubernetesContextsConfig ¶ added in v0.19.1025
kubernetes contexts config
func PreloadAppConfigPermissionsConfig ¶
permissions config
func PreloadAppConfigPolicyConfig ¶
policies config
func PreloadAppConfigRunnerConfig ¶
runner config
func PreloadAppConfigSandboxConfig ¶
sandbox config
func PreloadAppConfigStackConfig ¶
cloudformation stack config
func PreloadAppOperationRoleConfig ¶ added in v0.19.807
component role config
func PreloadComponentConfigConnection ¶ added in v0.19.1231
func PreloadComponentConfigConnections ¶
component config connections
func ReconcileBranchInstallAppBranchGroupsWithDB ¶ added in v0.19.1214
func ReconcileInstallAppBranchGroupWithDB ¶ added in v0.19.1214
func ResolveInstallGroup ¶ added in v0.19.1214
func ResolveInstallGroup(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, error)
func ResolveInstallGroupAssignment ¶ added in v0.19.1214
func ResolveInstallGroupAssignment(groups []app.AppBranchInstallGroup, install *app.Install) (*app.AppBranchInstallGroup, app.InstallAppBranchGroupAssignmentSource, error)
func SetInstallAppBranchGroupAssignmentWithDB ¶ added in v0.19.1214
func SetInstallAppBranchGroupWithDB ¶ added in v0.19.1214
func SetInstallAppBranchWithDB ¶ added in v0.19.1188
func ValidateBranchInstallsSingleGroupWithDB ¶ added in v0.19.1188
func ValidateBranchInstallsSingleGroupWithDB(ctx context.Context, db *gorm.DB, branchID string, groups []app.AppBranchInstallGroup) error
Callers inside a transaction must use this so they see their own writes.
func ValidateIgnoreChangesRegex ¶ added in v0.19.1159
ValidateIgnoreChangesRegex rejects patterns Go's regexp engine cannot compile so a bad expression fails at config time rather than mid-run.
func ValidateInstallSingleGroup ¶ added in v0.19.1188
func ValidateInstallSingleGroup(groups []app.AppBranchInstallGroup, install *app.Install) error
func WithDefaultInstallGroup ¶ added in v0.19.1214
func WithDefaultInstallGroup(groups []app.AppBranchInstallGroup) []app.AppBranchInstallGroup
withDefaultInstallGroup guarantees every config has somewhere for installs to land. A branch block that declares no install_groups, or an API caller that sends none, would otherwise produce a config where no install resolves to a group. Callers that declare groups must mark one default themselves; that is validated before it reaches here.
Types ¶
type CreateAppBranchRunRequest ¶ added in v0.19.850
type CreateAppBranchRunRequest struct {
AppBranchID string
AppBranchConfigID string
AppConfigID string
Force bool
RunType app.AppBranchRunType
PlanOnly bool
EventType string
PRNumber *int
HeadSHA string
GitRef string
BaseBranch string
IsDraftMode bool
Metadata app.AppBranchRunMetadata
Labels labels.Labels
TriggerEventDispatchID *string
Preview *PreviewRunInput
Request *app.WorkflowRequest
}
type EnsureAppBranchQueuesOptions ¶ added in v0.19.1197
type EnsureAppBranchQueuesOptions struct {
SkipRestartHint bool
}
type Helpers ¶
type Helpers struct {
// contains filtered or unexported fields
}
func (*Helpers) BranchInstalls ¶ added in v0.19.1188
BranchInstalls returns the installs the branch owns, which is the only population any of its install groups can resolve to.
func (*Helpers) BuildAppBranchRunPreview ¶ added in v0.19.1158
func (h *Helpers) BuildAppBranchRunPreview( ctx context.Context, appID string, branchConfig *app.AppBranchConfig, input *PreviewRunInput, ) (*app.AppBranchRunPreview, error)
func (*Helpers) CliVerisionAllowed ¶
func (*Helpers) CreateAppBranch ¶
func (*Helpers) CreateAppBranchConfig ¶ added in v0.19.850
func (h *Helpers) CreateAppBranchConfig( ctx context.Context, appBranchID string, connectedGithubVCSConfig *app.ConnectedGithubVCSConfig, publicGitVCSConfig *app.PublicGitVCSConfig, installGroups []app.AppBranchInstallGroup, postDeployRunbookIDs *[]string, ignoreChanges *IgnoreChangesSettings, previewConfig *app.AppBranchPreviewConfig, clearPreviewConfig bool, runConfig *app.AppBranchRunConfig, ) (*app.AppBranchConfig, error)
func (*Helpers) CreateAppBranchConfigWithDB ¶ added in v0.19.1133
func (h *Helpers) CreateAppBranchConfigWithDB( ctx context.Context, db *gorm.DB, appBranchID string, connectedGithubVCSConfig *app.ConnectedGithubVCSConfig, publicGitVCSConfig *app.PublicGitVCSConfig, installGroups []app.AppBranchInstallGroup, postDeployRunbookIDs *[]string, ignoreChanges *IgnoreChangesSettings, previewConfig *app.AppBranchPreviewConfig, clearPreviewConfig bool, runConfig *app.AppBranchRunConfig, ) (*app.AppBranchConfig, error)
Callers inside a transaction must use this, or the app_branch_id FK fails.
func (*Helpers) CreateAppBranchRun ¶ added in v0.19.850
func (h *Helpers) CreateAppBranchRun(ctx context.Context, req *CreateAppBranchRunRequest) (*app.AppBranchRun, error)
func (*Helpers) CreateAppBranchWithDB ¶ added in v0.19.1131
func (h *Helpers) CreateAppBranchWithDB( ctx context.Context, db *gorm.DB, appID string, name string, opts ...app.AppBranchManagedBy, ) (*app.AppBranch, error)
Queue creation starts Temporal workflows, so a transactional caller must call EnsureAppBranchQueues itself once committed.
func (*Helpers) CreateAppSandboxQueue ¶ added in v0.19.850
CreateAppSandboxQueue creates a Temporal queue for the app's sandbox build workflow. This enables sandbox-build signals to be enqueued and processed against the app.
func (*Helpers) CreateAppWorkflow ¶ added in v0.19.903
func (*Helpers) CreateAppWorkflowWithRequest ¶ added in v0.19.1231
func (*Helpers) CreateWorkflow ¶
func (*Helpers) CreateWorkflowWithDB ¶ added in v0.19.1096
func (*Helpers) DeleteAppComponent ¶
func (*Helpers) EnqueueAppBranchConfigSignals ¶ added in v0.19.1197
func (*Helpers) EnqueueAppBranchCreatedIfFirst ¶ added in v0.19.1164
func (h *Helpers) EnqueueAppBranchCreatedIfFirst(ctx context.Context, appBranchID, appBranchConfigID string) error
EnqueueAppBranchCreatedIfFirst enqueues app-branch-created when configID is the branch's first AppBranchConfig. Later configs are ignored. DedupeKey makes a retry of the first config a no-op.
func (*Helpers) EnsureAppBranchQueue ¶ added in v0.19.850
EnsureAppBranchQueue creates Temporal queue workflows for the given app branch. Safe to call multiple times — queueClient.Create is idempotent.
func (*Helpers) EnsureAppBranchQueues ¶ added in v0.19.1131
func (*Helpers) EnsureAppQueue ¶ added in v0.19.903
EnsureAppQueue creates all Temporal queue workflows needed for an app to execute workflows through the shared flow infrastructure.
func (*Helpers) EnsureAppTriggerQueue ¶ added in v0.19.1096
func (*Helpers) FetchAppBranchesWithConfigs ¶ added in v0.19.850
func (h *Helpers) FetchAppBranchesWithConfigs(ctx context.Context, appID string) ([]app.AppBranch, error)
FetchAppBranchesWithConfigs retrieves all app branches for an app with their configs preloaded
func (*Helpers) FindBaseAppBranchRun ¶ added in v0.19.1153
func (h *Helpers) FindBaseAppBranchRun(ctx context.Context, appBranchID string) (*app.AppBranchRun, error)
FindBaseAppBranchRun returns the most recent non-preview run on the app branch that parsed an app config and finished component builds. The run's overall status is not required to be success: a later deploy failure still leaves a usable baseline.
func (*Helpers) FindBaseAppBranchRunForHead ¶ added in v0.19.1188
func (h *Helpers) FindBaseAppBranchRunForHead(ctx context.Context, headRun *app.AppBranchRun) (*app.AppBranchRun, error)
FindBaseAppBranchRunForHead resolves preview baselines from the git branch a pull request targets. Regular branch runs compare with the previous parsed build on the same app branch.
func (*Helpers) GetAppBundleAppConfig ¶ added in v0.19.1231
func (*Helpers) GetAppComponents ¶
func (*Helpers) GetAppComponentsAtConfigVersion ¶
func (h *Helpers) GetAppComponentsAtConfigVersion(ctx context.Context, appID string, appCfgVersion int, componentIDs []string) ([]app.Component, error)
This returns all app components for a point in time
func (*Helpers) GetAppInstalls ¶
func (*Helpers) GetComponentDependents ¶
func (*Helpers) GetComponents ¶
func (*Helpers) GetConfigComponentDeployOrder ¶
func (*Helpers) GetConfigDefaultComponentOrder ¶
func (*Helpers) GetConfigGraph ¶
func (h *Helpers) GetConfigGraph(ctx context.Context, cfg *app.AppConfig) (graph.Graph[string, *app.Component], error)
GetConfigGraph builds a directed acyclic graph of component dependencies and returns both the graph and a sorted list of components in deployment order (dependencies first)
func (*Helpers) GetConfigReverseDefaultComponentOrder ¶
func (*Helpers) GetFullAppConfig ¶
func (*Helpers) GetLatestActiveAppConfig ¶ added in v0.19.1123
func (h *Helpers) GetLatestActiveAppConfig(ctx context.Context, appID string) (*app.AppConfig, error)
GetLatestActiveAppConfig returns the app's newest active config with component config connections preloaded.
func (*Helpers) GetLatestActiveAppConfigBare ¶ added in v0.19.1123
func (h *Helpers) GetLatestActiveAppConfigBare(ctx context.Context, appID string) (*app.AppConfig, error)
GetLatestActiveAppConfigBare returns the app's newest active config without preloading children.
func (*Helpers) GetLatestActiveAppConfigForBranch ¶ added in v0.19.1153
func (*Helpers) GetPoliciesConfigByAppConfigID ¶
func (*Helpers) GetReverseConfigComponentDeployOrder ¶
func (*Helpers) LatestConfigInstallGroups ¶ added in v0.19.1146
func (h *Helpers) LatestConfigInstallGroups(ctx context.Context, branchID string) ([]app.AppBranchInstallGroup, error)
LatestConfigInstallGroups returns the install groups on a branch's newest config, or nothing when the branch has no config yet.
func (*Helpers) ListPreviewInstallCandidates ¶ added in v0.19.1158
func (*Helpers) ListPreviewSources ¶ added in v0.19.1158
func (h *Helpers) ListPreviewSources(ctx context.Context, branch *app.AppBranch, config *app.AppBranchConfig) (*ListPreviewSourcesResult, error)
func (*Helpers) QueueClient ¶ added in v0.19.1101
func (h *Helpers) QueueClient() *queueclient.Client
QueueClient returns the queue client for enqueueing app-owned signals.
func (*Helpers) ReconcileInstallAppBranchGroup ¶ added in v0.19.1214
func (*Helpers) ResolvePreviewBaselineAppConfig ¶ added in v0.19.1158
func (*Helpers) ResolvePreviewInstallID ¶ added in v0.19.1158
func (*Helpers) ResumeAppBranchRun ¶ added in v0.19.1096
func (h *Helpers) ResumeAppBranchRun(ctx context.Context, run *app.AppBranchRun, req *TriggerAppBranchRunRequest) (*TriggerAppBranchRunResponse, error)
func (*Helpers) SetInstallAppBranch ¶ added in v0.19.1188
func (*Helpers) SetInstallAppBranchGroup ¶ added in v0.19.1214
func (*Helpers) SetInstallAppBranchGroupAssignment ¶ added in v0.19.1214
func (*Helpers) TriggerAppBranchRun ¶ added in v0.19.1096
func (h *Helpers) TriggerAppBranchRun(ctx context.Context, req *TriggerAppBranchRunRequest) (*TriggerAppBranchRunResponse, error)
func (*Helpers) UploadCustomNestedStackTemplates ¶ added in v0.19.1214
func (h *Helpers) UploadCustomNestedStackTemplates(ctx context.Context, db *gorm.DB, stackConfig *app.AppStackConfig) error
UploadCustomNestedStackTemplates uploads the config's custom nested stack templates and persists the resulting hashes and ready status. This runs inline with the config write so a stack generated from the config always finds its templates already in S3.
func (*Helpers) VCSHelpers ¶ added in v0.19.850
func (h *Helpers) VCSHelpers() *vcshelpers.Helpers
VCSHelpers returns the VCS helpers for git source resolution and token creation.
func (*Helpers) ValidateBranchInstallsSingleGroup ¶ added in v0.19.1188
func (*Helpers) ValidateGraph ¶
func (*Helpers) ValidateInstallLabelsSingleGroup ¶ added in v0.19.1188
func (*Helpers) ValidateSameRepo ¶ added in v0.19.850
func (h *Helpers) ValidateSameRepo( branches []app.AppBranch, vcsConfigReq *vcshelpers.VCSConfigRequest, ) error
ValidateSameRepo validates that all app branches use the same repository as the provided request Accepts the VCS config request (before creation) to validate early If both publicRepoReq and connectedRepoReq are nil, returns early with no validation Branches with no VCS config (both nil) are ignored during validation
type IgnoreChangesSettings ¶ added in v0.19.1159
IgnoreChangesSettings carries the ignore-changes fields through config creation. A nil pointer on either field means "carry the previous config's value forward", matching how the rest of this helper treats omitted input.
type ListPreviewSourcesResult ¶ added in v0.19.1158
type ListPreviewSourcesResult struct {
PullRequests []PreviewSourcePR `json:"pull_requests"`
Branches []PreviewSourceBranch `json:"branches"`
}
type PreviewBaselineAppConfig ¶ added in v0.19.1158
type PreviewRunInput ¶ added in v0.19.1158
type PreviewRunInput struct {
Source app.AppBranchRunPreviewSource
PRNumber *int
GitRef string
HeadSHA string
InputAppConfigID string
IsDraftMode bool
Override *app.AppBranchPreviewOverride
}
func MapLegacyPlanOnlyToPreviewInput ¶ added in v0.19.1158
func MapLegacyPlanOnlyToPreviewInput(req *CreateAppBranchRunRequest) *PreviewRunInput
type PreviewSourceBranch ¶ added in v0.19.1158
type PreviewSourcePR ¶ added in v0.19.1158
type ResolvedPreviewRun ¶ added in v0.19.1158
type ResolvedPreviewRun struct {
Preview *app.AppBranchRunPreview
}
type TriggerAppBranchRunRequest ¶ added in v0.19.1096
type TriggerAppBranchRunRequest struct {
Run CreateAppBranchRunRequest
QueueID string
Metadata map[string]string
Callback callback.Ref
DedupeKey *string
// ApprovalOption gates the run's plan steps. Empty means prompt.
ApprovalOption app.InstallApprovalOption
}
type TriggerAppBranchRunResponse ¶ added in v0.19.1096
type TriggerAppBranchRunResponse struct {
Run *app.AppBranchRun
Workflow *app.Workflow
QueueSignalID string
}
Source Files
¶
- create_app_branch.go
- create_app_branch_config.go
- create_app_branch_run.go
- create_app_sandbox_queue.go
- create_workflow.go
- delete_app_component.go
- enqueue_app_branch_created.go
- ensure_app_branch_queue.go
- ensure_app_queue.go
- find_base_app_branch_run.go
- get_app_bundle_app_config.go
- get_app_components.go
- get_components.go
- get_components_by_app_config_version.go
- get_config.go
- get_config_for_branch.go
- get_config_graph.go
- get_dependents.go
- get_fake_sandbox_stack_data.go
- get_full_config.go
- get_graph.go
- get_policies_config.go
- get_references.go
- helpers.go
- install_branch_ownership.go
- is_email.go
- list_preview_sources.go
- order.go
- resolve_preview_baseline_app_config.go
- resolve_preview_config.go
- scopes.go
- trigger_app_branch_run.go
- validate_app_branch_repo.go
- validate_branch_labels.go
- validate_graph.go