cli, gapi, lang, lib: Add a flag to skip autoedges

The GAPI API is a bit of a mess, but I think this seems to work for
standalone run and also deploys. Hopefully I didn't add any unnecessary
extra dead code here, but that's archaeology for another day.
This commit is contained in:
James Shubin
2025-03-11 03:14:58 -04:00
parent 8d34910b9b
commit 17b859d0d7
6 changed files with 27 additions and 6 deletions

View File

@@ -58,6 +58,8 @@ type DeployArgs struct {
NoGit bool `arg:"--no-git" help:"don't look at git commit id for safe deploys"`
Force bool `arg:"--force" help:"force a new deploy, even if the safety chain would break"`
NoAutoEdges bool `arg:"--no-autoedges" help:"skip the autoedges stage"`
DeployEmpty *cliUtil.EmptyArgs `arg:"subcommand:empty" help:"deploy empty payload"`
DeployLang *cliUtil.LangArgs `arg:"subcommand:lang" help:"deploy lang (mcl) payload"`
DeployYaml *cliUtil.YamlArgs `arg:"subcommand:yaml" help:"deploy yaml graph payload"`
@@ -251,6 +253,8 @@ func (obj *DeployArgs) Run(ctx context.Context, data *cliUtil.Data) (bool, error
deploy.Noop = obj.Noop
deploy.Sema = obj.Sema
deploy.NoAutoEdges = obj.NoAutoEdges
str, err := deploy.ToB64()
if err != nil {
return false, errwrap.Wrapf(err, "encoding error")

View File

@@ -141,6 +141,8 @@ func (obj *RunArgs) Run(ctx context.Context, data *cliUtil.Data) (bool, error) {
Noop: obj.Noop,
Sema: obj.Sema,
//Update: obj.Update,
NoAutoEdges: obj.NoAutoEdges,
},
Fs: standaloneFs,