diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1c73a821ba..b9cc5bcff04 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -944,8 +944,7 @@ jobs: # This is the same trap the govulncheck job documents (codeql.yml), but that # job works around it by forcing CGO_ENABLED=0; that's not an option here since # it would silently disable the race detector itself. Install libudev-dev - # instead, reusing the floci-go job's apt-get invocation below (same trap, hit - # there because that job also leaves CGO_ENABLED at the runner default). + # instead. The floci-go job hit the same trap and now disables CGO instead. # # GOFIPS140=latest (set inside the `race` command itself, .atmos.d/test.yaml) # is unaffected by CGO_ENABLED: Go's FIPS 140-3 module is pure Go, no cgo. @@ -1578,22 +1577,14 @@ jobs: - name: Verify OpenTofu run: tofu version - - name: Install Linux build dependencies - run: | - # The Azure mirror used by GitHub's Ubuntu runners can stall long - # enough to exhaust this job's timeout. Use Ubuntu's primary archive - # for this small dependency install. Current runner images use a - # mirror+file URI, while older ones contain the Azure URL directly. - # Pin both forms to the HTTP archive endpoint allowed by this job. - sudo sed -i \ - -e 's|mirror+file:/etc/apt/apt-mirrors\.txt|http://archive.ubuntu.com/ubuntu|g' \ - -e 's|http://azure\.archive\.ubuntu\.com/ubuntu|http://archive.ubuntu.com/ubuntu|g' \ - /etc/apt/sources.list.d/ubuntu.sources - sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 update - sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y --no-install-recommends libudev-dev pkg-config - + # CGO stays off, as in the repository's other Go test paths. The only cgo + # code in the build is the USB HID library behind the SAML U2F support, + # which needs libudev-dev and therefore an apt install. Under this job's + # egress allowlist apt intermittently cannot reach archive.ubuntu.com + # (its address rotates), which failed the whole job before any test ran. - name: Run Floci Go E2E tests env: + CGO_ENABLED: "0" ATMOS_TEST_FLOCI: "true" FLOCI_ENDPOINT_URL: "http://localhost:4566" FLOCI_GCP_ENDPOINT: "http://localhost:4588" diff --git a/.gitignore b/.gitignore index 1cfe9270714..d8c12b2a31f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,8 @@ tools/gomodcheck/.gomodcheck # Frozen compatibility fixtures must be committed even when they are archives. !pkg/artifact/compat/testdata/**/*.tar *.gz +# Byte-exact compatibility fixtures whose digests the tests pin. +!/pkg/artifact/compat/testdata/**/*.tar /bin # Nix diff --git a/agent-skills/skills/atmos-steps/SKILL.md b/agent-skills/skills/atmos-steps/SKILL.md index b7810ba6fb3..b9ee4bf9128 100644 --- a/agent-skills/skills/atmos-steps/SKILL.md +++ b/agent-skills/skills/atmos-steps/SKILL.md @@ -97,7 +97,7 @@ type-specific subpages (e.g. `atmos.tools/steps/type/shell`) as the canonical reference. Current canonical step types include: - Command and integration: `atmos`, `shell`, `script`, `exec`, `container`, - `emulator`, `http`, `archive`, `require`, `workdir`, `cast`, `store`. + `emulator`, `http`, `archive`, `artifact`, `require`, `workdir`, `cast`, `store`. - Orchestration: `test`, `parallel`, `matrix`, `wait`, `wait-all`, `cancel`. - Interactive: `input`, `confirm`, `choose`, `filter`, `file`, `write`. - UI and output: `toast`, `markdown`, `spin`, `table`, `pager`, `format`, diff --git a/cmd/artifacts/list.go b/cmd/artifacts/list.go index 2b6badb018c..fe68f9e3da0 100644 --- a/cmd/artifacts/list.go +++ b/cmd/artifacts/list.go @@ -10,6 +10,7 @@ import ( errUtils "github.com/cloudposse/atmos/errors" "github.com/cloudposse/atmos/pkg/artifact" "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" "github.com/cloudposse/atmos/pkg/flags" "github.com/cloudposse/atmos/pkg/list/column" "github.com/cloudposse/atmos/pkg/list/format" @@ -103,7 +104,11 @@ func (c *collection) execute(cmd *cobra.Command, args []string) error { return err } - envelope, err := c.run(commandContext(cmd), in) + // One report per command: the query is recorded after it ran and written when the command ends. + reporting := report.NewSession(atmosConfigPtr) + defer reporting.FlushAndLog() + + envelope, err := c.run(commandContext(cmd), in, reporting) if renderErr := renderCollection(outputFormat, envelope, err != nil); renderErr != nil && err == nil { return renderErr } @@ -120,9 +125,11 @@ type listedArtifact = invoke.Listed // run maps the flags onto operation parameters and runs the query through the shared // implementation. The envelope is never nil: a failed query still yields an empty array and the -// error text, while the returned error keeps the exit code nonzero. -func (c *collection) run(ctx context.Context, in *input) (*listEnvelope, error) { +// error text, while the returned error keeps the exit code nonzero. A failure before the service +// runs is recorded into the report too, so CI shows a failed row instead of no report at all. +func (c *collection) run(ctx context.Context, in *input, reporting report.Collector) (*listEnvelope, error) { failed := func(err error) (*listEnvelope, error) { + reporting.Record(report.EntryFor(c.action, nil, err)) return &listEnvelope{Artifacts: []listedArtifact{}, Error: err.Error()}, err } if atmosConfigPtr == nil { @@ -149,6 +156,7 @@ func (c *collection) run(ctx context.Context, in *input) (*listEnvelope, error) params.Name = firstArg(in) } outcome, err := invoke.Run(ctx, svc, params) + reporting.Record(report.EntryFor(c.action, outcome, err)) return outcome.Collection, err } diff --git a/cmd/artifacts/parity_test.go b/cmd/artifacts/parity_test.go new file mode 100644 index 00000000000..5a8a5f58baf --- /dev/null +++ b/cmd/artifacts/parity_test.go @@ -0,0 +1,78 @@ +package artifacts + +import ( + "context" + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + runnerstep "github.com/cloudposse/atmos/pkg/runner/step" + "github.com/cloudposse/atmos/pkg/schema" +) + +// TestCLIAndArtifactStepReportTheSamePublication runs the same publication through the real +// command and through the artifact step against real local repositories, and compares the +// structured output of the command with the step's typed result and named outputs. +func TestCLIAndArtifactStepReportTheSamePublication(t *testing.T) { + f := wiretest.New(t) + h, _ := newHarness(t) + atmosConfigPtr = f.Config + newService = func(*schema.AtmosConfiguration, ServiceOptions) (artifact.Service, error) { return f.Recorder, nil } + + cli := h.run("publish", f.Source, "--repository="+wiretest.Alias, "--name="+wiretest.Name, "--version="+wiretest.Version, + "--labels=team=platform", "--format=json") + require.NoError(t, cli.err) + var fromCLI invoke.Result + require.NoError(t, json.Unmarshal([]byte(cli.stdout), &fromCLI)) + + // The step publishes to a sibling repository, so it is a fresh creation with the same content. + sibling := wiretest.New(t) + vars := runnerstep.NewVariables() + vars.SetAtmosConfig(sibling.Config) + step := &schema.WorkflowStep{ + Name: "publish", Type: schema.TaskTypeArtifact, Action: "publish", Source: sibling.Source, Repository: wiretest.Alias, + ArtifactName: wiretest.Name, Version: wiretest.Version, Metadata: &schema.ArtifactStepMetadata{Labels: map[string]string{"team": "platform"}}, + } + result, err := (&runnerstep.ArtifactHandler{}).Execute(context.Background(), step, vars) + require.NoError(t, err) + fromStep, ok := result.Metadata[runnerstep.ArtifactMetadataKey].(*invoke.Result) + require.True(t, ok) + + // SizeMeasured is internal state omitted from JSON; compare the public wire values while + // independently checking that the typed step remembers the measurement. + assert.True(t, fromStep.SizeMeasured) + cliOperation, err := json.Marshal(f.Normalize(&fromCLI.OperationResult)) + require.NoError(t, err) + stepOperation, err := json.Marshal(sibling.Normalize(&fromStep.OperationResult)) + require.NoError(t, err) + assert.JSONEq(t, string(cliOperation), string(stepOperation), "the command and the step report the same result") + assert.Equal(t, fromCLI.Record, fromStep.Record) + + var named map[string]any + require.NoError(t, json.Unmarshal([]byte(cli.stdout), &named)) + require.Contains(t, result.Outputs, "size") + require.Contains(t, named, "size") + for name, value := range result.Outputs { + if name == "location" { + continue // Rooted in each fixture's own repository directory. + } + if name == "size" { + assert.EqualValues(t, fromCLI.Size, mustSize(t, value), "size") + continue + } + assert.Equal(t, value, named[name], "named output %q has the same name and value in the command's structured output", name) + } + assert.Contains(t, named, "location") +} + +func mustSize(t *testing.T, value string) int64 { + t.Helper() + var size int64 + require.NoError(t, json.Unmarshal([]byte(value), &size)) + return size +} diff --git a/cmd/artifacts/report_test.go b/cmd/artifacts/report_test.go new file mode 100644 index 00000000000..d5b2b908987 --- /dev/null +++ b/cmd/artifacts/report_test.go @@ -0,0 +1,179 @@ +package artifacts + +import ( + "encoding/json" + "errors" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact" + _ "github.com/cloudposse/atmos/pkg/ci/providers/generic" // Register the generic CI provider, as the binary does. + "github.com/cloudposse/atmos/pkg/schema" +) + +// ciReportFiles enables CI reporting on the harness and points the generic CI provider at files. +func ciReportFiles(t *testing.T, h *harness) (summary, outputs string) { + t.Helper() + dir := t.TempDir() + summary, outputs = filepath.Join(dir, "summary.md"), filepath.Join(dir, "output.txt") + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + t.Setenv("ATMOS_CI_SUMMARY", summary) + t.Setenv("ATMOS_CI_OUTPUT", outputs) + h.config.CI.Enabled = true + return summary, outputs +} + +func contentOf(t *testing.T, path string) string { + t.Helper() + content, err := os.ReadFile(path) + if os.IsNotExist(err) { + return "" + } + require.NoError(t, err) + return string(content) +} + +// The harness service is a strict mock: every report below is built from the result the operation +// returned, so an extra metadata or evidence request would fail the test as an unexpected call. +func TestCommandWritesOneReportAndKeepsStructuredStdoutValid(t *testing.T) { + h, svc := newHarness(t) + summary, outputs := ciReportFiles(t, h) + svc.EXPECT().Publish(gomock.Any(), gomock.Any()).Return(operation(artifact.ActionPublish, artifact.OutcomeCreated), nil) + + got := h.run("publish", "./dist", "--repository=dir", "--name=team/app", "--version=1.0.0", "--format=json") + + require.NoError(t, got.err) + var envelope map[string]any + require.NoError(t, json.Unmarshal([]byte(got.stdout), &envelope), "stdout stays a valid JSON document") + assert.Equal(t, "created", envelope["outcome"]) + assert.NotContains(t, got.stdout, "## Artifacts", "the report never goes to stdout") + + assert.Equal(t, 1, strings.Count(contentOf(t, summary), "### ✅ 1. Publish `team/app:1.0.0`")) + assert.Contains(t, contentOf(t, outputs), "artifact_ref=team/app:1.0.0\n") + assert.Contains(t, contentOf(t, outputs), "artifact_resolved_digest="+string(manifestDigest)+"\n") +} + +func TestFailedCommandReportsTheFailureAndStaysFailed(t *testing.T) { + h, svc := newHarness(t) + summary, _ := ciReportFiles(t, h) + failure := artifact.OperationResult{OperationID: "op-9", Action: artifact.ActionVerify, Repository: "dir", Requested: "team/app:1.0.0"} + svc.EXPECT().Verify(gomock.Any(), gomock.Any()).Return( + &artifact.VerifyResult{Operation: failure, Verification: artifact.VerificationResult{Status: artifact.VerificationUnchecked}}, + errors.Join(errUtils.ErrArtifactVerificationFailed, errors.New("no permitted signature")), + ) + + got := h.run("verify", "team/app:1.0.0", "--repository=dir", "--format=json") + + require.ErrorIs(t, got.err, errUtils.ErrArtifactVerificationFailed, "reporting never turns a verification failure into success") + content := contentOf(t, summary) + assert.Contains(t, content, "1 operation: 1 failed.") + assert.Contains(t, content, "no permitted signature") + assert.Contains(t, content, "No trust configuration was supplied", "an unchecked signature is never reported as verified") +} + +func TestReportingFailurePreservesTheSuccessfulExitStatus(t *testing.T) { + cases := map[string]func(t *testing.T, h *harness){ + "template failure": func(t *testing.T, h *harness) { + h.config.CI.Templates.BasePath = t.TempDir() + h.config.CI.Templates.Artifacts = map[string]string{"summary": "does-not-exist.md"} + }, + "provider failure": func(t *testing.T, _ *harness) { + t.Setenv("ATMOS_CI_SUMMARY", filepath.Join(t.TempDir(), "missing-dir", "summary.md")) + t.Setenv("ATMOS_CI_OUTPUT", filepath.Join(t.TempDir(), "missing-dir", "output.txt")) + }, + } + for name, breakReporting := range cases { + t.Run(name, func(t *testing.T) { + h, svc := newHarness(t) + ciReportFiles(t, h) + breakReporting(t, h) + svc.EXPECT().Publish(gomock.Any(), gomock.Any()).Return(operation(artifact.ActionPublish, artifact.OutcomeCreated), nil) + + got := h.run("publish", "./dist", "--repository=dir", "--name=team/app", "--version=1.0.0", "--format=json") + + require.NoError(t, got.err, "a reporting error is logged and never changes the exit status") + assert.Contains(t, got.stdout, `"outcome": "created"`) + }) + } +} + +func TestListQueryIsReportedOnce(t *testing.T) { + h, svc := newHarness(t) + summary, _ := ciReportFiles(t, h) + svc.EXPECT().List(gomock.Any(), gomock.Any()).Return(&artifact.ListResult{Artifacts: []artifact.ListEntry{ + {Name: "team/app", Version: "1.0.0", Kind: "files"}, + }}, nil) + + got := h.run("list", "--format=json") + + require.NoError(t, got.err) + assert.Equal(t, 1, strings.Count(contentOf(t, summary), "## Artifacts")) + assert.Contains(t, contentOf(t, summary), "Listed 1 artifact.") +} + +func TestDisabledReportingWritesNothing(t *testing.T) { + h, svc := newHarness(t) + summary, outputs := ciReportFiles(t, h) + h.config.CI.Enabled = false + svc.EXPECT().Publish(gomock.Any(), gomock.Any()).Return(operation(artifact.ActionPublish, artifact.OutcomeCreated), nil) + + got := h.run("publish", "./dist", "--repository=dir", "--name=team/app", "--version=1.0.0", "--format=json") + + require.NoError(t, got.err) + assert.Empty(t, contentOf(t, summary)) + assert.Empty(t, contentOf(t, outputs)) +} + +// A failure before the service runs still reaches the CI report, so the job summary shows a failed +// row instead of nothing. +func TestPreServiceFailuresAreReported(t *testing.T) { + failConstruction := func(*schema.AtmosConfiguration, ServiceOptions) (artifact.Service, error) { + return nil, errUtils.ErrArtifactConfigInvalid + } + tests := []struct { + name string + setup func(h *harness) + args []string + want error + }{ + {"publish without a repository", func(*harness) {}, []string{"publish", "./dist", "--name=team/app", "--version=1.0.0"}, errUtils.ErrRequiredFlagNotProvided}, + {"publish with a failing service construction", func(*harness) { newService = failConstruction }, []string{"publish", "./dist", "-r", "dir", "--name=team/app", "--version=1.0.0"}, errUtils.ErrArtifactConfigInvalid}, + {"inspect with a failing service construction", func(*harness) { newService = failConstruction }, []string{"inspect", "team/app:1", "-r", "dir"}, errUtils.ErrArtifactConfigInvalid}, + {"list with invalid labels", func(*harness) {}, []string{"list", "--labels=nope"}, errUtils.ErrInvalidFlag}, + {"search with a failing service construction", func(*harness) { newService = failConstruction }, []string{"search", "vpc", "-r", "dir"}, errUtils.ErrArtifactConfigInvalid}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + h, _ := newHarness(t) + summary, outputs := ciReportFiles(t, h) + tt.setup(h) + + got := h.run(tt.args...) + + require.ErrorIs(t, got.err, tt.want) + content := contentOf(t, summary) + assert.Contains(t, content, "1 operation: 1 failed.") + assert.Contains(t, content, "❌ Failed") + assert.Empty(t, contentOf(t, outputs), "a failure with no result writes no output variables") + }) + } +} + +func TestMissingConfigurationIsReported(t *testing.T) { + h, _ := newHarness(t) + summary, _ := ciReportFiles(t, h) + // The report session follows the loaded configuration, so a missing one has nothing to report to. + atmosConfigPtr = nil + got := h.run("inspect", "team/app:1", "-r", "dir", "--format=json") + require.ErrorIs(t, got.err, errUtils.ErrArtifactConfigInvalid) + assert.Empty(t, contentOf(t, summary)) +} diff --git a/cmd/artifacts/run.go b/cmd/artifacts/run.go index 6805b44fd03..fd349dd87f5 100644 --- a/cmd/artifacts/run.go +++ b/cmd/artifacts/run.go @@ -11,6 +11,7 @@ import ( errUtils "github.com/cloudposse/atmos/errors" "github.com/cloudposse/atmos/pkg/artifact" "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" "github.com/cloudposse/atmos/pkg/flags" "github.com/cloudposse/atmos/pkg/perf" "github.com/cloudposse/atmos/pkg/tags" @@ -89,7 +90,11 @@ func (c *command) execute(cmd *cobra.Command, args []string) error { return err } - res, err := c.invoke(commandContext(cmd), in) + // One report per command: the operation is recorded after it ran and written when the command ends. + reporting := report.NewSession(atmosConfigPtr) + defer reporting.FlushAndLog() + + res, err := c.invoke(commandContext(cmd), in, reporting) if res == nil { res = &result{} } @@ -102,23 +107,29 @@ func (c *command) execute(cmd *cobra.Command, args []string) error { // invoke builds the service, maps the flags onto operation parameters, and runs the operation // through the shared implementation. The result is non-nil whenever the operation produced one, -// even alongside an error. -func (c *command) invoke(ctx context.Context, in *input) (*result, error) { +// even alongside an error. A failure before the service runs is recorded into the report too, so +// CI shows a failed row instead of no report at all. +func (c *command) invoke(ctx context.Context, in *input, reporting report.Collector) (*result, error) { + failed := func(err error) (*result, error) { + reporting.Record(report.EntryFor(c.action, nil, err)) + return nil, err + } if atmosConfigPtr == nil { - return nil, errUtils.Build(errUtils.ErrArtifactConfigInvalid). + return failed(errUtils.Build(errUtils.ErrArtifactConfigInvalid). WithExplanation("Atmos configuration is not loaded."). WithHint("Run this command from a project directory that contains an `atmos.yaml`, or pass `--config`."). - Err() + Err()) } svc, err := newService(atmosConfigPtr, ServiceOptions{AcceptTransparencyLog: in.v.GetBool(in.key(flagYes))}) if err != nil { - return nil, err + return failed(err) } params, err := c.params(in) if err != nil { - return nil, err + return failed(err) } outcome, err := invoke.Run(ctx, svc, params) + reporting.Record(report.EntryFor(c.action, outcome, err)) return outcome.Result, err } diff --git a/cmd/cmd_utils.go b/cmd/cmd_utils.go index c66a6a7dc7d..08572e72557 100644 --- a/cmd/cmd_utils.go +++ b/cmd/cmd_utils.go @@ -1119,6 +1119,15 @@ func executeCustomCommand( // Initialize step executor once before loop - reused across steps to preserve outputs. executor := stepPkg.NewStepExecutor() stepVars := executor.Variables() + // Artifact steps record into one CI report that is written after the command ends, even on failure. + flushArtifactReport := stepVars.UseArtifactReport(&atmosConfig) + defer flushArtifactReport() + // os.Exit skips deferred calls, so from here on every exit path writes the artifact report first. + // The closure shadows the package function of the same name for the rest of this command. + exitOrRecordDependencyErr := func(cmd *cobra.Command, err error, title, suggestion string) { + flushArtifactReport() + exitOrRecordDependencyErr(cmd, err, title, suggestion) + } stepVars.SetTemplateDelimiters(stepDelims) stepVars.SetTemplateRenderer(func(name, input string, data any) (string, error) { return e.ProcessStepTmpl(&atmosConfig, name, input, data, stepDelims) @@ -1598,7 +1607,9 @@ func executeCustomCommand( } return runExtendedStep(stepCtx, workflowStep) case schema.TaskTypeExec: - // Replace the Atmos process with the command (shell exec semantics). + // Replace the Atmos process with the command (shell exec semantics). A successful + // replacement skips the deferred flush, so write the artifact report first. + stepVars.FlushArtifactReport() return process.ReplaceShellSession(&process.ExecSpec{ Command: commandToRun, Name: fmt.Sprintf("%s-step-%d", commandConfig.Name, i), @@ -1659,6 +1670,8 @@ func executeCustomCommand( // tflint steps bounds the whole logical step: one deadline wraps the retry loop, so backoff waits // and later attempts end with the timeout instead of each attempt getting a fresh one. runStepBounded := func() error { + restoreArtifactScope := stepVars.BeginArtifactStep() + defer restoreArtifactScope() runRetrying := func(ctx context.Context) error { if step.Retry == nil { return runStep(ctx) diff --git a/cmd/custom_command_artifact_report_test.go b/cmd/custom_command_artifact_report_test.go new file mode 100644 index 00000000000..5cdaf5f66a0 --- /dev/null +++ b/cmd/custom_command_artifact_report_test.go @@ -0,0 +1,52 @@ +package cmd + +import ( + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + "github.com/cloudposse/atmos/pkg/schema" +) + +// TestCustomCommandArtifactStepWritesOneReport asserts that a custom command owns one artifact +// report: written once after the command's steps, with the retry's final attempt only. +func TestCustomCommandArtifactStepWritesOneReport(t *testing.T) { + _ = NewTestKit(t) + f := wiretest.New(t) + f.Recorder.FailPublications(1, os.ErrDeadlineExceeded) + dir := t.TempDir() + summary, outputs := filepath.Join(dir, "summary.md"), filepath.Join(dir, "output.txt") + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + t.Setenv("ATMOS_CI_SUMMARY", summary) + t.Setenv("ATMOS_CI_OUTPUT", outputs) + f.Config.CI.Enabled = true + require.NoError(t, os.WriteFile(summary, []byte("## Earlier job step\n"), 0o600)) + + fields := f.StepFields() + fields["type"] = "artifact" + fields["name"] = "publish" + fields["retry"] = map[string]any{"max_attempts": 2, "backoff_strategy": "constant", "initial_delay": time.Millisecond.String()} + + runCustomCommand(t, f, "artifact-report", decodeCustomCommandSteps(t, fields)) + + content, err := os.ReadFile(summary) + require.NoError(t, err) + text := string(content) + assert.True(t, strings.HasPrefix(text, "## Earlier job step\n"), "existing summary content remains") + assert.Equal(t, 1, strings.Count(text, "## Artifacts")) + assert.Equal(t, 1, strings.Count(text, "### ✅ 1. Publish")) + assert.Contains(t, text, "**Attempts:** 2") + out, err := os.ReadFile(outputs) + require.NoError(t, err) + assert.Contains(t, string(out), "artifact_publish_outcome=created\n") +} + +var _ = schema.CIConfig{Enabled: true} diff --git a/cmd/custom_command_artifact_test.go b/cmd/custom_command_artifact_test.go new file mode 100644 index 00000000000..eb9ccaf6e1c --- /dev/null +++ b/cmd/custom_command_artifact_test.go @@ -0,0 +1,91 @@ +package cmd + +import ( + "errors" + "testing" + "time" + + "github.com/go-viper/mapstructure/v2" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + "github.com/cloudposse/atmos/pkg/schema" +) + +// decodeCustomCommandSteps decodes steps the way atmos.yaml custom commands are decoded, through +// the mapstructure path that Viper's merged configuration takes. +func decodeCustomCommandSteps(t *testing.T, steps ...map[string]any) schema.Tasks { + t.Helper() + var holder struct { + Steps schema.Tasks `mapstructure:"steps"` + } + decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{Result: &holder, WeaklyTypedInput: true, DecodeHook: schema.TasksDecodeHook()}) + require.NoError(t, err) + items := make([]any, 0, len(steps)) + for _, step := range steps { + items = append(items, step) + } + require.NoError(t, decoder.Decode(map[string]any{"steps": items})) + for index := range holder.Steps { + require.NoError(t, holder.Steps[index].LoadError) + } + return holder.Steps +} + +// runCustomCommand registers a custom command with the steps and runs it. +func runCustomCommand(t *testing.T, f *wiretest.Fixture, name string, steps schema.Tasks) { + t.Helper() + config := *f.Config + config.BasePath = t.TempDir() + config.Commands = []schema.Command{{Name: name, WorkingDirectory: config.BasePath, Steps: steps}} + require.NoError(t, processCustomCommands(config, config.Commands, RootCmd)) + command, _, err := RootCmd.Find([]string{name}) + require.NoError(t, err) + command.Run(command, nil) +} + +func TestCustomCommandArtifactStepMatchesTheSharedImplementation(t *testing.T) { + _ = NewTestKit(t) + f := wiretest.New(t) + fields := f.StepFields() + fields["type"] = "artifact" + fields["name"] = "publish" + + runCustomCommand(t, f, "artifact-publish", decodeCustomCommandSteps(t, fields)) + + results := f.Recorder.Results() + require.Len(t, results, 1) + baseline := f.Baseline(t) + assert.Equal(t, f.Normalize(&baseline.OperationResult), f.Normalize(&results[0]), "same result as the CLI implementation") + assert.Equal(t, artifact.OutcomeCreated, results[0].Outcome) + assert.Contains(t, results[0].Location, f.Root) + + requests := f.Recorder.Requests() + require.Len(t, requests, 1) + assert.Equal(t, f.Source, requests[0].Source) + assert.Equal(t, map[string]string{"team": "platform"}, requests[0].Metadata.Labels) + assert.Equal(t, wiretest.OperationID, requests[0].Execution.OperationID) +} + +func TestCustomCommandArtifactStepRetryKeepsTheOperationIdentity(t *testing.T) { + _ = NewTestKit(t) + f := wiretest.New(t) + f.Recorder.FailPublications(2, errors.New("temporary registry failure")) + fields := f.StepFields() + fields["type"] = "artifact" + fields["name"] = "publish" + fields["retry"] = map[string]any{"max_attempts": 3, "backoff_strategy": "constant", "initial_delay": time.Millisecond.String()} + + runCustomCommand(t, f, "artifact-retry", decodeCustomCommandSteps(t, fields)) + + requests := f.Recorder.Requests() + require.Len(t, requests, 3) + for _, request := range requests { + assert.Equal(t, requests[0].Execution, request.Execution, "every attempt is the same logical operation") + assert.Equal(t, 1, request.Execution.MaxAttempts) + } + results := f.Recorder.Results() + assert.Equal(t, artifact.OutcomeCreated, results[2].Outcome) +} diff --git a/cmd/scaffold/scaffold_artifact_e2e_test.go b/cmd/scaffold/scaffold_artifact_e2e_test.go new file mode 100644 index 00000000000..c06c2caffe7 --- /dev/null +++ b/cmd/scaffold/scaffold_artifact_e2e_test.go @@ -0,0 +1,187 @@ +package scaffold + +import ( + "io/fs" + "os" + "path/filepath" + "testing" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/fixtures" + "github.com/cloudposse/atmos/pkg/artifact/roundtriptest" + "github.com/cloudposse/atmos/pkg/oci/ocitest" + "github.com/cloudposse/atmos/pkg/project/config" +) + +const ( + publishedScaffoldName = "landing-zone" + publishedScaffoldVersion = "2.0.0" + + publishedScaffoldManifest = `apiVersion: atmos/v1 +kind: AtmosScaffoldConfig +metadata: + name: landing-zone + description: A landing zone + version: 2.0.0 +spec: + fields: + - name: project_name + type: input + default: demo +` + + // The root README is ordinary scaffold content, rendered like any other template file. + publishedScaffoldReadme = "\n# {{ .Config.project_name }}\n\nGenerated project.\n" + + packageReadme = "# Landing zone package\n\nDistribution notes.\n" + packageChangelog = "# Changelog\n\n- 2.0.0 first release\n" +) + +// writePublishedScaffold writes a scaffold that has BOTH README roles: a root README that is part of +// what generation produces, and a package README and CHANGELOG that describe the distribution. +func writePublishedScaffold(t *testing.T, dir, updateContent string) { + t.Helper() + fixtures.WriteFile(t, dir, "scaffold.yaml", publishedScaffoldManifest, 0o644) + fixtures.WriteFile(t, dir, "README.md", publishedScaffoldReadme, 0o644) + fixtures.WriteFile(t, dir, "static.txt", "static content\n", 0o644) + fixtures.WriteFile(t, dir, "update.txt", updateContent, 0o644) + fixtures.WriteFile(t, dir, "nested/deep.txt", "deep content\n", 0o644) + fixtures.WriteFile(t, dir, fixtures.ReservedDir+"/README.md", packageReadme, 0o644) + fixtures.WriteFile(t, dir, fixtures.ReservedDir+"/CHANGELOG.md", packageChangelog, 0o644) +} + +// generateScaffold drives the real `scaffold generate` command. +func generateScaffold(t *testing.T, src, target string, flags map[string]string) { + t.Helper() + cmd := &cobra.Command{} + scaffoldGenerateParser.RegisterFlags(cmd) + require.NoError(t, cmd.Flags().Set("interactive", "false")) + for name, value := range flags { + require.NoError(t, cmd.Flags().Set(name, value)) + } + require.NoError(t, scaffoldGenerateCmd.RunE(cmd, []string{src, target})) +} + +// treeSnapshot maps every file below root to its content, skipping the project record, which +// records where each generation came from and so differs by source on purpose. +func treeSnapshot(t *testing.T, root string) map[string]string { + t.Helper() + files := map[string]string{} + require.NoError(t, filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { + if err != nil || d.IsDir() { + return err + } + rel, err := filepath.Rel(root, path) + if err != nil { + return err + } + if filepath.ToSlash(rel) == ".atmos/scaffold.yaml" { + return nil + } + content, err := os.ReadFile(path) + if err != nil { + return err + } + files[filepath.ToSlash(rel)] = string(content) + return nil + })) + require.NotEmpty(t, files, "the generated tree must not be empty") + return files +} + +// TestScaffoldGenerate_PublishedScaffoldMatchesGeneratingFromTheDirectory publishes a scaffold with +// both README roles and generates from it. The output is identical to generating from the original +// directory and contains no distribution files. +func TestScaffoldGenerate_PublishedScaffoldMatchesGeneratingFromTheDirectory(t *testing.T) { + t.Cleanup(func() { viper.Reset() }) + reg := roundtriptest.New(t) + src := t.TempDir() + writePublishedScaffold(t, src, "v1 content\n") + + published := reg.Publish(t, &artifact.PublishRequest{Source: src, Kind: "scaffold"}) + require.Equal(t, artifact.OutcomeCreated, published.Outcome) + assert.Equal(t, publishedScaffoldName+":"+publishedScaffoldVersion, published.Ref, "name and version default from the scaffold manifest") + + fromDirectory := filepath.Join(t.TempDir(), "from-directory") + generateScaffold(t, src, fromDirectory, nil) + fromArtifact := filepath.Join(t.TempDir(), "from-artifact") + generateScaffold(t, reg.URI(publishedScaffoldName, publishedScaffoldVersion), fromArtifact, nil) + + want := treeSnapshot(t, fromDirectory) + got := treeSnapshot(t, fromArtifact) + assert.Equal(t, want, got, "generating from the published scaffold is identical to generating from the directory") + assert.Equal(t, "# demo\n\nGenerated project.\n", got["README.md"], "the root README keeps its rendering behavior") + for _, tree := range []string{fromDirectory, fromArtifact} { + assert.NoDirExists(t, filepath.Join(tree, ".atmos", "artifact"), "no distribution files leak into generated output") + assert.NoFileExists(t, filepath.Join(tree, "manifest.json")) + } + + record, err := config.LoadProjectRecord(fromArtifact) + require.NoError(t, err) + require.NotNil(t, record, "the generation still writes its project record") + assert.Equal(t, reg.URI(publishedScaffoldName, publishedScaffoldVersion), record.Spec.Source) + assert.Equal(t, publishedScaffoldVersion, record.Metadata.Version) +} + +// TestScaffoldGenerate_PublishedScaffoldUpdateFlow runs the existing rendered-strategy update flow +// against published scaffold versions. +func TestScaffoldGenerate_PublishedScaffoldUpdateFlow(t *testing.T) { + t.Cleanup(func() { viper.Reset() }) + reg := roundtriptest.New(t) + v1 := t.TempDir() + writePublishedScaffold(t, v1, "v1 content\n") + reg.Publish(t, &artifact.PublishRequest{Source: v1, Kind: "scaffold"}) + + v2 := t.TempDir() + writePublishedScaffold(t, v2, "v2 content\n") + reg.Publish(t, &artifact.PublishRequest{Source: v2, Kind: "scaffold", Version: "2.1.0"}) + + target := filepath.Join(t.TempDir(), "project") + generateScaffold(t, reg.URI(publishedScaffoldName, publishedScaffoldVersion), target, map[string]string{"update-strategy": "rendered"}) + require.Equal(t, "v1 content\n", readRenderedFile(t, filepath.Join(target, "update.txt"))) + require.NoError(t, os.WriteFile(filepath.Join(target, "static.txt"), []byte("hand-edited content\n"), 0o644)) + + generateScaffold(t, reg.URI(publishedScaffoldName, "2.1.0"), target, map[string]string{"update": "true", "update-strategy": "rendered"}) + + assert.Equal(t, "v2 content\n", readRenderedFile(t, filepath.Join(target, "update.txt")), "the template's change is applied") + assert.Equal(t, "hand-edited content\n", readRenderedFile(t, filepath.Join(target, "static.txt")), "the hand edit survives the update") + assert.NoDirExists(t, filepath.Join(target, ".atmos", "artifact"), "an update never writes distribution files") +} + +// TestScaffoldGenerate_LegacyOCIScaffoldStillWorks keeps the pre-existing single-layer scaffold +// image format working next to the Atmos package format. +func TestScaffoldGenerate_LegacyOCIScaffoldStillWorks(t *testing.T) { + t.Cleanup(func() { viper.Reset() }) + image := ocitest.NewRegistry(t, "legacy/scaffold:v1", map[string]string{ + "scaffold.yaml": publishedScaffoldManifest, + "README.md": publishedScaffoldReadme, + "static.txt": "static content\n", + }) + target := filepath.Join(t.TempDir(), "legacy") + + generateScaffold(t, "oci://"+image, target, nil) + + files := treeSnapshot(t, target) + assert.Equal(t, "static content\n", files["static.txt"]) + assert.Equal(t, "# demo\n\nGenerated project.\n", files["README.md"]) +} + +// TestScaffoldGenerate_LocalSourceNeverGeneratesDistributionMetadata covers the local-directory and +// verbatim-copy source strategies: the author's .atmos/artifact files never reach generated output. +func TestScaffoldGenerate_LocalSourceNeverGeneratesDistributionMetadata(t *testing.T) { + t.Cleanup(func() { viper.Reset() }) + src := t.TempDir() + writePublishedScaffold(t, src, "v1 content\n") + fixtures.WriteFile(t, src, ".atmos/other.txt", "kept\n", 0o644) + target := filepath.Join(t.TempDir(), "project") + + generateScaffold(t, src, target, nil) + + assert.NoDirExists(t, filepath.Join(target, ".atmos", "artifact")) + assert.FileExists(t, filepath.Join(target, ".atmos", "other.txt"), "other files under .atmos are ordinary scaffold content") +} diff --git a/cmd/standalone_script.go b/cmd/standalone_script.go index 84561cb3928..68f1623cdd4 100644 --- a/cmd/standalone_script.go +++ b/cmd/standalone_script.go @@ -162,6 +162,8 @@ func runStandaloneScript(cmd *cobra.Command, file *script.File) error { processEnv := script.ProcessEnvironment(envpkg.MergeGlobalEnv(os.Environ(), atmosConfig.Env), standaloneSelectionEnv(cmd)) vars := runnerstep.NewVariables() vars.SetAtmosConfig(&atmosConfig) + // Artifact steps record into one CI report that is written after the script ends, even on failure. + defer vars.UseArtifactReport(&atmosConfig)() if err := vars.ApplyTemplateDelimiters(&atmosConfig); err != nil { return err } diff --git a/demo/casts/atmos.d/screengrabs/cli.yaml b/demo/casts/atmos.d/screengrabs/cli.yaml index f708dbb0524..e800b2106f8 100644 --- a/demo/casts/atmos.d/screengrabs/cli.yaml +++ b/demo/casts/atmos.d/screengrabs/cli.yaml @@ -118,6 +118,12 @@ commands: atmos artifacts show --help atmos artifacts show readme --help atmos artifacts show changelog --help + atmos artifacts catalog --help + atmos artifacts catalog build --help + atmos artifacts catalog publish --help + atmos artifacts catalog add --help + atmos artifacts catalog remove --help + atmos artifacts catalog sync --help atmos auth --help atmos auth console --help atmos auth env --help @@ -454,6 +460,7 @@ commands: atmos scaffold list --help atmos scaffold validate --help atmos scaffold generate --help + atmos scaffold publish --help """ FIXTURE = REPO / ".context" / "cast-fixtures" / "demo-stacks" OUT = REPO / "website" / "static" / "casts" / "screengrabs" @@ -637,6 +644,12 @@ commands: atmos artifacts show --help atmos artifacts show readme --help atmos artifacts show changelog --help + atmos artifacts catalog --help + atmos artifacts catalog build --help + atmos artifacts catalog publish --help + atmos artifacts catalog add --help + atmos artifacts catalog remove --help + atmos artifacts catalog sync --help atmos auth --help atmos auth console --help atmos auth env --help @@ -973,6 +986,7 @@ commands: atmos scaffold list --help atmos scaffold validate --help atmos scaffold generate --help + atmos scaffold publish --help """ commands = [line.strip() for line in COMMANDS.splitlines() if line.strip()] diff --git a/errors/artifact_report.go b/errors/artifact_report.go new file mode 100644 index 00000000000..60a39cdeb78 --- /dev/null +++ b/errors/artifact_report.go @@ -0,0 +1,14 @@ +package errors + +import "errors" + +// Artifact report errors. Reporting is best-effort: these sentinels describe problems rendering or +// writing the CI summary and outputs of artifact operations. They are logged by the execution +// boundary and never change the exit status of the artifact operation itself. +var ( + // ErrArtifactReportRender is returned when the artifact summary template cannot be loaded or rendered. + ErrArtifactReportRender = errors.New("failed to render the artifact report") + + // ErrArtifactReportWrite is returned when the artifact summary or CI outputs cannot be written. + ErrArtifactReportWrite = errors.New("failed to write the artifact report") +) diff --git a/errors/errors.go b/errors/errors.go index 7a989a94a6e..52cef382105 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -1384,6 +1384,7 @@ var ( ErrManifestPrototypeNil = errors.New("manifest prototype is nil") ErrManifestSchemaGenerate = errors.New("failed to generate manifest JSON schema") ErrManifestValidation = errors.New("manifest validation failed") + ErrManifestIncludeRoot = errors.New("failed to resolve manifest include root") // Generator errors. ErrReadTemplatesDirectory = errors.New("failed to read templates directory") diff --git a/internal/exec/workflow_artifact_report_test.go b/internal/exec/workflow_artifact_report_test.go new file mode 100644 index 00000000000..ddd91d54a48 --- /dev/null +++ b/internal/exec/workflow_artifact_report_test.go @@ -0,0 +1,171 @@ +package exec + +import ( + "errors" + "os" + "path/filepath" + "strconv" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + "github.com/cloudposse/atmos/pkg/ci" + "github.com/cloudposse/atmos/pkg/ci/providers/generic" + stepPkg "github.com/cloudposse/atmos/pkg/runner/step" + "github.com/cloudposse/atmos/pkg/schema" +) + +// workflowReportFiles enables CI reporting on config and points the generic CI provider at files. +func workflowReportFiles(t *testing.T, config *schema.AtmosConfiguration) (summary, outputs string) { + t.Helper() + // Other tests in this package reset the provider registry, which drops the generic provider + // that its init registered, so register it again. + ci.Register(generic.NewProvider()) + dir := t.TempDir() + summary, outputs = filepath.Join(dir, "summary.md"), filepath.Join(dir, "output.txt") + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + t.Setenv("ATMOS_CI_SUMMARY", summary) + t.Setenv("ATMOS_CI_OUTPUT", outputs) + config.CI.Enabled = true + return summary, outputs +} + +func fileContent(t *testing.T, path string) string { + t.Helper() + content, err := os.ReadFile(path) + if os.IsNotExist(err) { + return "" + } + require.NoError(t, err) + return string(content) +} + +// distinctOperationIDs gives every logical operation its own ID, as production does. The fixture pins +// one ID for all operations so that independent runs compare byte for byte. +func distinctOperationIDs(t *testing.T) { + t.Helper() + count := 0 + restore := stepPkg.UseArtifactIdentity(func() string { + count++ + return "op-" + strconv.Itoa(count) + }, func() time.Time { return wiretest.PreparedAt }) + t.Cleanup(restore) +} + +func twoPublications(f *wiretest.Fixture, second string) string { + return ` +workflows: + publish: + steps: + - name: first + type: artifact + action: publish + source: "` + yamlPath(f.Source) + `" + repository: dir + artifact_name: team/app + version: "1.0.0" + - name: second + type: artifact + action: publish + source: "` + yamlPath(f.Source) + `" + repository: dir + artifact_name: team/app + version: "` + second + `" +` +} + +func TestWorkflowWritesOneOrderedArtifactReport(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + distinctOperationIDs(t) + config, definition, path := artifactWorkflow(t, twoPublications(f, "2.0.0")) + summary, outputs := workflowReportFiles(t, config) + require.NoError(t, os.WriteFile(summary, []byte("## Earlier job step\n"), 0o600)) + + require.NoError(t, ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "")) + + content := fileContent(t, summary) + assert.True(t, strings.HasPrefix(content, "## Earlier job step\n"), "existing summary content remains") + assert.Equal(t, 1, strings.Count(content, "## Artifacts"), "one report for the whole workflow") + assert.Contains(t, content, "2 operations: 2 succeeded.") + first := strings.Index(content, "### ✅ 1. Publish") + second := strings.Index(content, "### ✅ 2. Publish") + require.Positive(t, first) + require.Greater(t, second, first) + assert.Contains(t, content, "**Step:** first") + assert.Contains(t, content, "**Step:** second") + + out := fileContent(t, outputs) + assert.Contains(t, out, "artifact_first_outcome=created\n") + assert.Contains(t, out, "artifact_second_outcome=created\n") +} + +func TestWorkflowFailureStillWritesTheArtifactReport(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + broken := errors.New("repository unavailable") + f.Recorder.FailPublications(1, broken) + config, definition, path := artifactWorkflow(t, twoPublications(f, "2.0.0")) + summary, _ := workflowReportFiles(t, config) + + err := ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "") + + require.ErrorIs(t, err, broken, "the workflow keeps failing") + content := fileContent(t, summary) + assert.Contains(t, content, "1 operation: 1 failed.", "the first failure ended the workflow, so one operation was reported") + assert.Contains(t, content, "repository unavailable") +} + +func TestWorkflowRetryReportsTheFinalAttemptOnce(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + f.Recorder.FailPublications(2, errors.New("temporary registry failure")) + config, definition, path := artifactWorkflow(t, ` +workflows: + publish: + steps: + - name: publish + type: artifact + action: publish + source: "`+yamlPath(f.Source)+`" + repository: dir + artifact_name: team/app + version: "1.0.0" + retry: + max_attempts: 3 + backoff_strategy: constant + initial_delay: 1ms +`) + summary, _ := workflowReportFiles(t, config) + + require.NoError(t, ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "")) + + content := fileContent(t, summary) + assert.Equal(t, 1, strings.Count(content, "### ✅ 1. Publish")) + assert.Contains(t, content, "**Attempts:** 3") + assert.NotContains(t, content, "temporary registry failure") +} + +func TestWorkflowReportingIsOffWhenCIIsDisabled(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + config, definition, path := artifactWorkflow(t, twoPublications(f, "2.0.0")) + summary, outputs := workflowReportFiles(t, config) + config.CI.Enabled = false + + require.NoError(t, ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "")) + + assert.Empty(t, fileContent(t, summary)) + assert.Empty(t, fileContent(t, outputs)) + assert.Len(t, f.Recorder.Requests(), 2, "both publications still ran") +} diff --git a/internal/exec/workflow_artifact_retry_test.go b/internal/exec/workflow_artifact_retry_test.go new file mode 100644 index 00000000000..764bdecb830 --- /dev/null +++ b/internal/exec/workflow_artifact_retry_test.go @@ -0,0 +1,40 @@ +package exec + +import ( + "context" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + stepPkg "github.com/cloudposse/atmos/pkg/runner/step" + "github.com/cloudposse/atmos/pkg/schema" +) + +func TestExecuteWorkflowRetriesArtifactStep(t *testing.T) { + ctrl := gomock.NewController(t) + svc := artifact.NewMockService(ctrl) + var executions []artifact.Execution + svc.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, req artifact.PublishRequest) (*artifact.OperationResult, error) { + executions = append(executions, req.Execution) + if len(executions) == 1 { + return nil, errors.New("transient") + } + return &artifact.OperationResult{Outcome: artifact.OutcomeCreated}, nil + }).Times(2) + restore := stepPkg.UseArtifactServiceFactory(func(*schema.AtmosConfiguration, invoke.ServiceOptions) (artifact.Service, error) { return svc, nil }) + t.Cleanup(restore) + attempts := 2 + delay := time.Millisecond + workflow := &schema.WorkflowDefinition{Steps: []schema.WorkflowStep{{Name: "publish", Type: "artifact", Action: "publish", Source: t.TempDir(), Repository: "test", ArtifactName: "app", Version: "1", Retry: &schema.RetryConfig{MaxAttempts: &attempts, InitialDelay: &delay, MaxDelay: &delay}}}} + err := ExecuteWorkflow(schema.AtmosConfiguration{}, "test", "test.yaml", workflow, false, "", "", "") + require.NoError(t, err) + require.Len(t, executions, 2) + assert.Equal(t, executions[0].OperationID, executions[1].OperationID) + assert.NotEmpty(t, executions[0].OperationID) +} diff --git a/internal/exec/workflow_artifact_test.go b/internal/exec/workflow_artifact_test.go new file mode 100644 index 00000000000..b4039ffffe5 --- /dev/null +++ b/internal/exec/workflow_artifact_test.go @@ -0,0 +1,201 @@ +package exec + +import ( + "context" + "errors" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + stepPkg "github.com/cloudposse/atmos/pkg/runner/step" + "github.com/cloudposse/atmos/pkg/schema" +) + +// artifactWorkflow loads a workflow from YAML, so the test exercises the same decoding as a +// workflow file. +func artifactWorkflow(t *testing.T, manifest string) (*schema.AtmosConfiguration, *schema.WorkflowDefinition, string) { + t.Helper() + dir := t.TempDir() + path := filepath.Join(dir, "artifacts.yaml") + require.NoError(t, os.WriteFile(path, []byte(manifest), 0o600)) + definitions, err := LoadWorkflowConfig(&schema.AtmosConfiguration{}, path) + require.NoError(t, err) + definition := definitions["publish"] + return &schema.AtmosConfiguration{BasePath: dir}, &definition, path +} + +// yamlPath renders a path for an unquoted-safe, double-quoted YAML scalar on every platform. +func yamlPath(path string) string { + return strings.ReplaceAll(filepath.ToSlash(path), `"`, `\"`) +} + +func TestWorkflowArtifactStepMatchesTheSharedImplementation(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + config, definition, path := artifactWorkflow(t, ` +workflows: + publish: + steps: + - name: publish + type: artifact + action: publish + source: "`+yamlPath(f.Source)+`" + repository: dir + artifact_name: team/app + version: "1.0.0" + metadata: + labels: + team: platform +`) + require.NoError(t, ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "")) + + result, ok := stepExecutorState.GetResult("publish") + require.True(t, ok) + payload, ok := result.Metadata[stepPkg.ArtifactMetadataKey].(*invoke.Result) + require.True(t, ok, "the typed result is stored under Metadata[artifact]") + + baseline := f.Baseline(t) + assert.Equal(t, f.Normalize(&baseline.OperationResult), f.Normalize(&payload.OperationResult), "same result as the CLI implementation") + assert.Equal(t, baseline.Record, payload.Record) + assert.Equal(t, invoke.NamedOutputs(&payload.OperationResult), result.Outputs, "named outputs are the result's named fields") + assert.Equal(t, artifact.OutcomeCreated, payload.Outcome) + assert.True(t, strings.HasPrefix(payload.Location, f.Root), "the repository root is the configured one: %s", payload.Location) + + requests := f.Recorder.Requests() + require.Len(t, requests, 1) + // The workflow declares the absolute source with slashes (see yamlPath), so compare on that form. + assert.Equal(t, filepath.ToSlash(f.Source), filepath.ToSlash(requests[0].Source)) + assert.Equal(t, wiretest.OperationID, requests[0].Execution.OperationID) + assert.True(t, wiretest.PreparedAt.Equal(requests[0].Execution.PreparedAt)) +} + +func TestWorkflowArtifactStepRetryKeepsTheOperationIdentity(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + f.Recorder.FailPublications(2, errors.New("temporary registry failure")) + config, definition, path := artifactWorkflow(t, ` +workflows: + publish: + steps: + - name: publish + type: artifact + action: publish + source: "`+yamlPath(f.Source)+`" + repository: dir + artifact_name: team/app + version: "1.0.0" + retry: + max_attempts: 3 + backoff_strategy: constant + initial_delay: 1ms +`) + require.NoError(t, ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "")) + + requests := f.Recorder.Requests() + require.Len(t, requests, 3, "the runner's retry loop owns the attempts") + for _, request := range requests { + assert.Equal(t, requests[0].Execution, request.Execution, "every attempt is the same logical operation") + assert.Equal(t, 1, request.Execution.MaxAttempts, "the service's transport retries do not multiply the runner's") + } + results := f.Recorder.Results() + require.Len(t, results, 3) + assert.Empty(t, results[0].Outcome, "a failed attempt carries no outcome") + assert.Equal(t, artifact.OutcomeCreated, results[2].Outcome) + for _, result := range results { + assert.Equal(t, wiretest.OperationID, result.OperationID) + } + result, ok := stepExecutorState.GetResult("publish") + require.True(t, ok) + assert.Equal(t, "created", result.Outputs["outcome"], "the final outcome is what later steps see") +} + +func TestWorkflowArtifactStepFailureStopsOrContinues(t *testing.T) { + broken := errors.New("repository unavailable") + manifest := func(f *wiretest.Fixture, continueField string) string { + return ` +workflows: + publish: + steps: + - name: publish + type: artifact + action: publish + source: "` + yamlPath(f.Source) + `" + repository: dir + artifact_name: team/app + version: "1.0.0" +` + continueField + ` + - name: inspect + type: artifact + action: inspect + repository: dir + ref: "team/app:1.0.0" +` + } + + t.Run("a failure stops the workflow and later steps never run", func(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + f.Recorder.FailPublications(1, broken) + config, definition, path := artifactWorkflow(t, manifest(f, "")) + err := ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "") + require.ErrorIs(t, err, broken) + _, inspected := stepExecutorState.GetResult("inspect") + assert.False(t, inspected) + assert.Len(t, f.Recorder.Requests(), 1) + }) + + t.Run("continue forgives the failure and the next step runs", func(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + f.Recorder.FailPublications(1, broken) + config, definition, path := artifactWorkflow(t, manifest(f, " continue: always")) + // The inspect step fails with not found, because the publication failed; it is the + // workflow's own last step, so the workflow fails there rather than at the forgiven step. + err := ExecuteWorkflow(*config, "publish", path, definition, false, "", "", "") + require.ErrorIs(t, err, errUtils.ErrArtifactNotFound) + assert.NotErrorIs(t, err, broken, "the forgiven failure is not the workflow's failure") + }) +} + +func TestWorkflowArtifactStepCancellationStopsRetries(t *testing.T) { + ResetStepExecutorState() + t.Cleanup(ResetStepExecutorState) + f := wiretest.New(t) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + maxAttempts := 5 + step := schema.WorkflowStep{ + Name: "publish", Type: schema.TaskTypeArtifact, Action: "publish", Source: f.Source, Repository: wiretest.Alias, + ArtifactName: wiretest.Name, Version: wiretest.Version, + Retry: &schema.RetryConfig{MaxAttempts: &maxAttempts, BackoffStrategy: schema.BackoffConstant, InitialDelay: durationPtr(time.Millisecond)}, + } + f.Recorder.FailPublications(5, errors.New("transfer aborted")) + attempts := 0 + err := stepPkg.RetryWithConditions(ctx, step.Retry, func() error { + attempts++ + cancel() // The operator interrupts the run while the first attempt is in flight. + return executeExtendedStep(ctx, &step, &schema.WorkflowDefinition{}, nil, extendedStepOptions{AtmosConfig: f.Config}) + }) + require.ErrorIs(t, err, context.Canceled) + assert.Equal(t, 1, attempts, "a canceled operation is not retried") + assert.Len(t, f.Recorder.Requests(), 1) + for _, request := range f.Recorder.Requests() { + assert.Equal(t, wiretest.OperationID, request.Execution.OperationID) + } +} + +func durationPtr(d time.Duration) *time.Duration { return &d } diff --git a/internal/exec/workflow_utils.go b/internal/exec/workflow_utils.go index afbdf17b312..3a70740e6ff 100644 --- a/internal/exec/workflow_utils.go +++ b/internal/exec/workflow_utils.go @@ -407,6 +407,8 @@ func ExecuteWorkflow( // behave identically in both. Flags are protected so a flag value containing // template markers is not re-evaluated on later passes (mirrors cmd_utils). workflowVars := stepExecutorState.Variables() + // Artifact steps record into one CI report that is written after the workflow ends, even on failure. + defer workflowVars.UseArtifactReport(&atmosConfig)() // Step templates honor templates.settings.delimiters for projects on the // templates.step_delimiters edition behavior; earlier pins keep "{{ }}". if err := workflowVars.ApplyTemplateDelimiters(&atmosConfig); err != nil { @@ -960,6 +962,8 @@ func ExecuteWorkflow( // Validated earlier to be the final step; no retry wrapper (the // process is replaced, so a retry could never run). stepPkg.RenderCommand(&step, workflowDefinition, command) + // A successful replacement skips the deferred flush, so write the artifact report first. + workflowVars.FlushArtifactReport() err = process.ReplaceShellSession(&process.ExecSpec{ Command: command, Name: fmt.Sprintf("%s-step-%d", workflow, stepIdx), diff --git a/pkg/api/steps.go b/pkg/api/steps.go index 9de7be6e937..a6d09461c44 100644 --- a/pkg/api/steps.go +++ b/pkg/api/steps.go @@ -15,6 +15,29 @@ type StepLibrary interface { Run(context.Context, *StepCall) (*StepResult, error) } +// GroupScheduler is implemented by a StepLibrary that positions parallel groups. A scheduler that +// implements fan-out calls ScheduleGroup once per group, before it starts the first branch, and forks +// the branches from the returned library. Each group gets a position of its own, so the work of two +// consecutive groups is never interleaved. +type GroupScheduler interface { + StepLibrary + + // ScheduleGroup reserves the position of one parallel group that starts now. + ScheduleGroup() ScheduledForker +} + +// ScheduledForker is implemented by a StepLibrary that can fork a branch of a parallel group at a +// known scheduled position. A scheduler that implements fan-out calls ForkAt instead of Fork, with +// the zero-based index of the branch in the group, so work recorded by the branches (such as artifact +// reports) is ordered by where each branch was scheduled rather than by when it finished. The library +// of a group comes from [GroupScheduler.ScheduleGroup]. +type ScheduledForker interface { + StepLibrary + + // ForkAt isolates a branch like Fork and records the branch's scheduled index. + ForkAt(index int) StepLibrary +} + // StepCall contains native Go step configuration. // Writers and process settings belong to the calling script thread. type StepCall struct { diff --git a/pkg/artifact/discovery/cache/open_other.go b/pkg/artifact/discovery/cache/open_other.go new file mode 100644 index 00000000000..3e613b081a1 --- /dev/null +++ b/pkg/artifact/discovery/cache/open_other.go @@ -0,0 +1,7 @@ +//go:build !unix + +package cache + +import "os" + +func openSnapshot(path string) (*os.File, error) { return os.Open(path) } diff --git a/pkg/artifact/discovery/cache/open_unix.go b/pkg/artifact/discovery/cache/open_unix.go new file mode 100644 index 00000000000..be534afb303 --- /dev/null +++ b/pkg/artifact/discovery/cache/open_unix.go @@ -0,0 +1,17 @@ +//go:build unix + +package cache + +import ( + "os" + + "golang.org/x/sys/unix" +) + +func openSnapshot(path string) (*os.File, error) { + fd, err := unix.Open(path, unix.O_RDONLY|unix.O_NONBLOCK|unix.O_CLOEXEC, 0) + if err != nil { + return nil, err + } + return os.NewFile(uintptr(fd), path), nil +} diff --git a/pkg/artifact/discovery/cache/open_unix_test.go b/pkg/artifact/discovery/cache/open_unix_test.go new file mode 100644 index 00000000000..d8f478f2c9d --- /dev/null +++ b/pkg/artifact/discovery/cache/open_unix_test.go @@ -0,0 +1,20 @@ +//go:build unix + +package cache_test + +import ( + "testing" + + "github.com/cloudposse/atmos/pkg/artifact/discovery/cache" + "github.com/stretchr/testify/require" + "golang.org/x/sys/unix" +) + +func TestOfflineRejectsFIFO(t *testing.T) { + h := newHarness(t, "scope") + source := h.source("repository") + require.NoError(t, unix.Mkdir(h.store.Directory(), cache.DirectoryMode)) + require.NoError(t, unix.Mkfifo(h.store.Path("repository", "ref"), 0o600)) + _, _, err := h.load(t, source, cache.Mode{Offline: true}) + require.ErrorIs(t, err, errOffline) +} diff --git a/pkg/artifact/discovery/cache/store.go b/pkg/artifact/discovery/cache/store.go index 6d711dc412f..c760bd5e5d7 100644 --- a/pkg/artifact/discovery/cache/store.go +++ b/pkg/artifact/discovery/cache/store.go @@ -7,7 +7,6 @@ import ( "encoding/json" "fmt" "io" - "os" "path/filepath" "time" @@ -183,11 +182,15 @@ func (s *Store) Fresh(fetched time.Time) bool { // read returns the raw bytes of a snapshot file within the size bound, or nil when it is absent, // unreadable, or oversized. func (s *Store) read(path string) []byte { - file, err := os.Open(path) + file, err := openSnapshot(path) if err != nil { return nil } defer file.Close() + info, err := file.Stat() + if err != nil || !info.Mode().IsRegular() { + return nil + } raw, err := io.ReadAll(io.LimitReader(file, s.maxSize+1)) if err != nil || int64(len(raw)) > s.maxSize { return nil diff --git a/pkg/artifact/invoke/mock_detailed_service.go b/pkg/artifact/invoke/mock_detailed_service.go new file mode 100644 index 00000000000..2de32c7fbff --- /dev/null +++ b/pkg/artifact/invoke/mock_detailed_service.go @@ -0,0 +1,223 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/cloudposse/atmos/pkg/artifact/invoke (interfaces: DetailedService) +// +// Generated by this command: +// +// mockgen -destination=mock_detailed_service.go -package=invoke github.com/cloudposse/atmos/pkg/artifact/invoke DetailedService +// + +// Package invoke is a generated GoMock package. +package invoke + +import ( + context "context" + reflect "reflect" + + artifact "github.com/cloudposse/atmos/pkg/artifact" + service "github.com/cloudposse/atmos/pkg/artifact/service" + gomock "go.uber.org/mock/gomock" +) + +// MockDetailedService is a mock of DetailedService interface. +type MockDetailedService struct { + ctrl *gomock.Controller + recorder *MockDetailedServiceMockRecorder + isgomock struct{} +} + +// MockDetailedServiceMockRecorder is the mock recorder for MockDetailedService. +type MockDetailedServiceMockRecorder struct { + mock *MockDetailedService +} + +// NewMockDetailedService creates a new mock instance. +func NewMockDetailedService(ctrl *gomock.Controller) *MockDetailedService { + mock := &MockDetailedService{ctrl: ctrl} + mock.recorder = &MockDetailedServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDetailedService) EXPECT() *MockDetailedServiceMockRecorder { + return m.recorder +} + +// Copy mocks base method. +func (m *MockDetailedService) Copy(ctx context.Context, request artifact.CopyRequest) (*artifact.OperationResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Copy", ctx, request) + ret0, _ := ret[0].(*artifact.OperationResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Copy indicates an expected call of Copy. +func (mr *MockDetailedServiceMockRecorder) Copy(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockDetailedService)(nil).Copy), ctx, request) +} + +// Delete mocks base method. +func (m *MockDetailedService) Delete(ctx context.Context, request artifact.DeleteRequest) (*artifact.OperationResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, request) + ret0, _ := ret[0].(*artifact.OperationResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockDetailedServiceMockRecorder) Delete(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDetailedService)(nil).Delete), ctx, request) +} + +// Inspect mocks base method. +func (m *MockDetailedService) Inspect(ctx context.Context, request artifact.InspectRequest) (*artifact.InspectResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Inspect", ctx, request) + ret0, _ := ret[0].(*artifact.InspectResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Inspect indicates an expected call of Inspect. +func (mr *MockDetailedServiceMockRecorder) Inspect(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inspect", reflect.TypeOf((*MockDetailedService)(nil).Inspect), ctx, request) +} + +// List mocks base method. +func (m *MockDetailedService) List(ctx context.Context, request artifact.ListRequest) (*artifact.ListResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, request) + ret0, _ := ret[0].(*artifact.ListResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockDetailedServiceMockRecorder) List(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDetailedService)(nil).List), ctx, request) +} + +// Pin mocks base method. +func (m *MockDetailedService) Pin(ctx context.Context, request artifact.PinRequest) (*artifact.PinResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Pin", ctx, request) + ret0, _ := ret[0].(*artifact.PinResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Pin indicates an expected call of Pin. +func (mr *MockDetailedServiceMockRecorder) Pin(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pin", reflect.TypeOf((*MockDetailedService)(nil).Pin), ctx, request) +} + +// Publish mocks base method. +func (m *MockDetailedService) Publish(ctx context.Context, request artifact.PublishRequest) (*artifact.OperationResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Publish", ctx, request) + ret0, _ := ret[0].(*artifact.OperationResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Publish indicates an expected call of Publish. +func (mr *MockDetailedServiceMockRecorder) Publish(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockDetailedService)(nil).Publish), ctx, request) +} + +// PublishDetailed mocks base method. +func (m *MockDetailedService) PublishDetailed(ctx context.Context, request artifact.PublishRequest) (*service.PublishOutcome, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PublishDetailed", ctx, request) + ret0, _ := ret[0].(*service.PublishOutcome) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// PublishDetailed indicates an expected call of PublishDetailed. +func (mr *MockDetailedServiceMockRecorder) PublishDetailed(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishDetailed", reflect.TypeOf((*MockDetailedService)(nil).PublishDetailed), ctx, request) +} + +// Pull mocks base method. +func (m *MockDetailedService) Pull(ctx context.Context, request artifact.PullRequest) (*artifact.OperationResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Pull", ctx, request) + ret0, _ := ret[0].(*artifact.OperationResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Pull indicates an expected call of Pull. +func (mr *MockDetailedServiceMockRecorder) Pull(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pull", reflect.TypeOf((*MockDetailedService)(nil).Pull), ctx, request) +} + +// Search mocks base method. +func (m *MockDetailedService) Search(ctx context.Context, request artifact.SearchRequest) (*artifact.ListResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Search", ctx, request) + ret0, _ := ret[0].(*artifact.ListResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Search indicates an expected call of Search. +func (mr *MockDetailedServiceMockRecorder) Search(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockDetailedService)(nil).Search), ctx, request) +} + +// ShowDocument mocks base method. +func (m *MockDetailedService) ShowDocument(ctx context.Context, request artifact.ShowDocumentRequest) (*artifact.DocumentResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ShowDocument", ctx, request) + ret0, _ := ret[0].(*artifact.DocumentResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ShowDocument indicates an expected call of ShowDocument. +func (mr *MockDetailedServiceMockRecorder) ShowDocument(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShowDocument", reflect.TypeOf((*MockDetailedService)(nil).ShowDocument), ctx, request) +} + +// Sign mocks base method. +func (m *MockDetailedService) Sign(ctx context.Context, request artifact.SignRequest) (*artifact.SignResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Sign", ctx, request) + ret0, _ := ret[0].(*artifact.SignResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Sign indicates an expected call of Sign. +func (mr *MockDetailedServiceMockRecorder) Sign(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sign", reflect.TypeOf((*MockDetailedService)(nil).Sign), ctx, request) +} + +// Verify mocks base method. +func (m *MockDetailedService) Verify(ctx context.Context, request artifact.VerifyRequest) (*artifact.VerifyResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Verify", ctx, request) + ret0, _ := ret[0].(*artifact.VerifyResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Verify indicates an expected call of Verify. +func (mr *MockDetailedServiceMockRecorder) Verify(ctx, request any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockDetailedService)(nil).Verify), ctx, request) +} diff --git a/pkg/artifact/invoke/run.go b/pkg/artifact/invoke/run.go index 8e15b4c8f38..86fbaff0ae5 100644 --- a/pkg/artifact/invoke/run.go +++ b/pkg/artifact/invoke/run.go @@ -11,12 +11,20 @@ import ( "github.com/cloudposse/atmos/pkg/perf" ) -// detailedPublisher is implemented by the real service. It returns the sealed Record next to the +// DetailedPublisher is implemented by the real service. It returns the sealed Record next to the // operation result, which a dry run needs in order to show the files it selected. -type detailedPublisher interface { +type DetailedPublisher interface { PublishDetailed(ctx context.Context, request artifact.PublishRequest) (*service.PublishOutcome, error) } +// DetailedService is a service that also publishes with details, as the real service does. +// +//go:generate mockgen -destination=mock_detailed_service.go -package=invoke github.com/cloudposse/atmos/pkg/artifact/invoke DetailedService +type DetailedService interface { + artifact.Service + DetailedPublisher +} + // Run executes one operation against the service and returns its typed result. // // The returned Outcome is never nil, and the matching Result or Collection is never nil, even when @@ -108,7 +116,7 @@ func runPublish(ctx context.Context, svc artifact.Service, params *Params) (*Res Force: params.Force, DryRun: params.DryRun, } - if detailed, ok := svc.(detailedPublisher); ok { + if detailed, ok := svc.(DetailedPublisher); ok { outcome, err := detailed.PublishDetailed(ctx, request) res := fromOperation(&outcome.Operation) if outcome.Record.Name != "" { diff --git a/pkg/artifact/report/assemble.go b/pkg/artifact/report/assemble.go new file mode 100644 index 00000000000..c6a001dc74d --- /dev/null +++ b/pkg/artifact/report/assemble.go @@ -0,0 +1,132 @@ +package report + +import ( + "fmt" + "sort" + "strings" +) + +// orderEntries sorts entries into report order: by scheduled position, then by arrival. Entries +// without a position follow every positioned one, in arrival order, so a sequential run is ordered +// by when its steps ran and a parallel run by where its branches were scheduled. +func orderEntries(entries []*pending) []*Entry { + sort.SliceStable(entries, func(i, j int) bool { + left, right := entries[i], entries[j] + if c := comparePositions(left.entry.Position, right.entry.Position); c != 0 { + return c < 0 + } + return left.arrival < right.arrival + }) + ordered := make([]*Entry, len(entries)) + for index, item := range entries { + ordered[index] = item.entry + } + return ordered +} + +// comparePositions compares two scheduled positions lexicographically. A nil position is greater +// than any non-nil one; a shorter position that is a prefix of a longer one is smaller. +func comparePositions(left, right []int) int { + switch { + case left == nil && right == nil: + return 0 + case left == nil: + return 1 + case right == nil: + return -1 + } + for index := 0; index < len(left) && index < len(right); index++ { + if left[index] != right[index] { + if left[index] < right[index] { + return -1 + } + return 1 + } + } + return len(left) - len(right) +} + +// assemble builds the report context and the section contexts for the ordered entries. +func assemble(entries []*Entry) (*Report, []*Operation) { + report := &Report{Heading: reportHeading, Total: len(entries)} + operations := make([]*Operation, 0, len(entries)) + for index, entry := range entries { + operation := buildOperation(index+1, entry) + operations = append(operations, operation) + report.Rows = append(report.Rows, rowOf(operation)) + count(report, operation) + } + report.Overview = overview(report) + return report, operations +} + +// count adds one operation to the totals. An unchanged operation is a success that wrote nothing, +// and is counted once, as unchanged. +func count(report *Report, operation *Operation) { + switch operation.Kind { + case kindFailed: + report.Failed++ + case kindCanceled: + report.Canceled++ + case kindUnchanged: + report.Unchanged++ + default: + report.Succeeded++ + } +} + +// overview words the totals: "3 operations: 1 succeeded, 1 unchanged, 1 failed". +func overview(report *Report) string { + noun := "operations" + if report.Total == 1 { + noun = "operation" + } + parts := make([]string, 0, 4) + for _, item := range []struct { + count int + word string + }{ + {report.Succeeded, "succeeded"}, + {report.Unchanged, "unchanged"}, + {report.Failed, "failed"}, + {report.Canceled, "canceled"}, + } { + if item.count > 0 { + parts = append(parts, fmt.Sprintf("%d %s", item.count, item.word)) + } + } + return fmt.Sprintf("%d %s: %s.", report.Total, noun, strings.Join(parts, ", ")) +} + +// rowOf builds the overview table row of an operation. Code spans are made table-safe by escaping +// pipes, which a table cell would otherwise split on. +func rowOf(operation *Operation) Row { + artifactText := operation.Ref + if artifactText == "" { + artifactText = operation.Requested + } + if artifactText == "" && operation.Collection != nil { + artifactText = fmt.Sprintf("%d artifacts", operation.Collection.Count) + } + row := Row{ + Number: operation.Number, + Operation: operation.ActionLabel, + Icon: operation.Icon, + Status: operation.Status, + Artifact: cellSafe(artifactText), + Repository: cellSafe(operation.Repository), + Destination: cellSafe(operation.Destination), + Size: operation.Size, + Duration: operation.Duration, + } + if len(operation.Digests) > 0 { + primary := operation.Digests[0] + row.Digest = primary.Short + " (" + strings.ToLower(primary.Label) + ")" + } + return row +} + +// cellSafe escapes the pipes of an already-built code span so it stays inside one table cell. +func cellSafe(span string) string { + return strings.ReplaceAll(span, "|", `\|`) +} diff --git a/pkg/artifact/report/boundary_test.go b/pkg/artifact/report/boundary_test.go new file mode 100644 index 00000000000..581e6bbe024 --- /dev/null +++ b/pkg/artifact/report/boundary_test.go @@ -0,0 +1,49 @@ +package report + +import ( + "go/parser" + "go/token" + "io/fs" + "path/filepath" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +// TestOnlyReportDependsOnCIReporting enforces the package boundary: pkg/artifact/report is the only +// package under pkg/artifact that imports CI reporting, so the domain, services, and wiring stay +// free of it. A new package that needs to report must record into a [Collector] instead. +func TestOnlyReportDependsOnCIReporting(t *testing.T) { + root, err := filepath.Abs("..") + require.NoError(t, err) + checked, withCI := 0, 0 + err = filepath.WalkDir(root, func(path string, entry fs.DirEntry, walkErr error) error { + if walkErr != nil || entry.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { + return walkErr + } + relative, err := filepath.Rel(root, path) + require.NoError(t, err) + inReport := strings.HasPrefix(filepath.ToSlash(relative), "report/") + parsed, err := parser.ParseFile(token.NewFileSet(), path, nil, parser.ImportsOnly) + require.NoError(t, err) + checked++ + for _, spec := range parsed.Imports { + imported, err := strconv.Unquote(spec.Path.Value) + require.NoError(t, err) + if imported != "github.com/cloudposse/atmos/pkg/ci" && !strings.HasPrefix(imported, "github.com/cloudposse/atmos/pkg/ci/") { + continue + } + if inReport { + withCI++ + continue + } + require.Failf(t, "forbidden import", "%s imports %s; only pkg/artifact/report may depend on CI reporting", filepath.ToSlash(relative), imported) + } + return nil + }) + require.NoError(t, err) + require.Positive(t, checked, "no source files were checked") + require.Positive(t, withCI, "the report package no longer imports CI reporting; update this test") +} diff --git a/pkg/artifact/report/build.go b/pkg/artifact/report/build.go new file mode 100644 index 00000000000..1b565ed8843 --- /dev/null +++ b/pkg/artifact/report/build.go @@ -0,0 +1,324 @@ +package report + +import ( + "fmt" + "sort" + "strings" + + "github.com/opencontainers/go-digest" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" +) + +const ( + // The maxDiagnostics constant caps the diagnostics listed for one operation. + maxDiagnostics = 20 + + // The maxInventoryFiles constant caps the payload entries listed for one operation. + maxInventoryFiles = 25 + + // The maxListedArtifacts constant caps the artifacts listed for one list or search. + maxListedArtifacts = 20 + + // The maxLabels constant caps the labels listed for one operation. + maxLabels = 20 +) + +// buildOperation turns one recorded entry into the template context of its section. It reads the +// typed result only: nothing here calls a service or repository. +func buildOperation(number int, entry *Entry) *Operation { + result, collection := resultsOf(entry) + op := &result.OperationResult + action := op.Action + if action == "" { + action = entry.Action + } + outcome := op.Outcome + if collection != nil && outcome == "" { + outcome = artifact.OutcomeRead + } + word, kind := statusOf(action, outcome, result, collection, entry.Err) + + section := &Operation{ + Number: number, + Step: plain(entry.Step), + Action: string(action), + ActionLabel: actionLabel(action), + Icon: kindIcons[kind], + Status: word, + Kind: kind, + Repository: code(op.Repository), + Ref: code(op.Ref), + Destination: code(op.Location), + Size: humanSize(op.Size), + ExactSize: exactSize(op.Size), + Duration: formatDuration(op.Duration), + Attempts: max(entry.Attempt, 1), + Digests: digestsOf(op), + Aliases: codes(op.Aliases), + } + if op.Requested != "" && op.Requested != op.Ref { + section.Requested = code(op.Requested) + } + section.Title = titleOf(section, op) + section.Lock = lockFor(action, op.LockScope, outcome, entry.Err != nil) + fillDetails(section, entry, result, collection) + return section +} + +// resultsOf returns the single-artifact result and the collection of an entry. The result is never +// nil, so a failure before the service ran still reports its identity. +func resultsOf(entry *Entry) (*invoke.Result, *invoke.Collection) { + var result *invoke.Result + var collection *invoke.Collection + if entry.Outcome != nil { + result, collection = entry.Outcome.Result, entry.Outcome.Collection + } + if result == nil { + result = &invoke.Result{} + } + return result, collection +} + +// statusOf returns the status wording and kind of an operation. A listing that could not cover +// every repository is a success with a warning, never a plain success. +func statusOf(action artifact.Action, outcome artifact.Outcome, result *invoke.Result, collection *invoke.Collection, err error) (word, kind string) { + word, kind = classify(action, outcome, result.Verification, err) + if collection != nil && collection.Incomplete && kind == kindSuccess { + return word + " (incomplete)", kindPartial + } + return word, kind +} + +// fillDetails adds the digests note, signature, diagnostics, error, record details, and collection +// summary to a section. +func fillDetails(section *Operation, entry *Entry, result *invoke.Result, collection *invoke.Collection) { + section.Integrity = integrityNote(section, result) + section.Signature = signatureOf(artifact.Action(section.Action), result) + section.Diagnostics, section.DiagnosticsMore = diagnosticsOf(result.Diagnostics) + section.Error = errorBlock(entry, result) + addRecordDetails(section, result) + section.Collection = collectionOf(collection) + section.Summary = summaryOf(section, collection) +} + +// titleOf is the section heading text: the action and the best reference known. +func titleOf(section *Operation, op *artifact.OperationResult) string { + reference := section.Ref + if reference == "" { + reference = code(op.Requested) + } + if reference == "" { + return section.ActionLabel + } + return section.ActionLabel + " " + reference +} + +// codes renders each value as a code span and drops empty ones. +func codes(values []string) []string { + out := make([]string, 0, len(values)) + for _, value := range values { + if span := code(value); span != "" { + out = append(out, span) + } + } + if len(out) == 0 { + return nil + } + return out +} + +// digestsOf lists the digests an operation reported, each labelled with what it identifies. The +// four digest types are never merged: a manifest digest, a record digest, a content digest, and a +// transfer checksum answer different questions. +func digestsOf(op *artifact.OperationResult) []Digest { + candidates := []struct { + label, meaning string + value digest.Digest + }{ + {"Resolved", "OCI manifest or index digest; the record digest for local and S3 repositories", op.ResolvedDigest}, + {"Record", "canonical bytes of the package Record", op.RecordDigest}, + {"Content", "portable content identity of the inventory and documents", op.ContentDigest}, + {"Representation", "checksum of the transferred payload; it proves integrity, not the publisher", op.RepresentationDigest}, + } + var digests []Digest + for _, candidate := range candidates { + if candidate.value == "" { + continue + } + digests = append(digests, Digest{ + Label: candidate.label, + Meaning: candidate.meaning, + Value: code(string(candidate.value)), + Short: code(shortDigest(candidate.value)), + }) + } + return digests +} + +// integrityNote says what the reported digests prove. A checksum or content digest shows the bytes +// are intact; only a verified signature authenticates the publisher. +func integrityNote(section *Operation, result *invoke.Result) string { + if len(section.Digests) == 0 { + return "" + } + if result.Verification != nil && result.Verification.Status == artifact.VerificationVerified { + return "The signature was verified against the configured trust policy, so the signer is authenticated. The digests identify the verified content." + } + return "Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature." +} + +// errorBlock renders the failure message as a fenced block. The message is masked and stripped of +// URL credentials, and the fence cannot be closed by the message. +func errorBlock(entry *Entry, result *invoke.Result) string { + message := "" + switch { + case entry.Err != nil: + message = entry.Err.Error() + case result.Error != "": + message = result.Error + } + return fenced(message) +} + +// diagnosticsOf converts operation diagnostics, capped at maxDiagnostics. +func diagnosticsOf(diagnostics []artifact.Diagnostic) (listed []Diagnostic, more int) { + for index := range diagnostics { + if index >= maxDiagnostics { + more = len(diagnostics) - maxDiagnostics + break + } + listed = append(listed, Diagnostic{ + Severity: string(diagnostics[index].Severity), + Code: code(diagnostics[index].Code), + Message: plain(diagnostics[index].Message), + }) + } + return listed, more +} + +// addRecordDetails fills the description, labels, and inventory from the Record the result carries: +// the sealed Record of a publication, or the Record of an inspection. +func addRecordDetails(section *Operation, result *invoke.Result) { + record := result.Record + if record == nil && result.Inspection != nil { + record = result.Inspection.Record + } + if record == nil { + return + } + section.Description = plain(record.Metadata.Description) + section.Labels = labelsOf(record.Metadata.Labels) + section.Inventory = inventoryOf(record.Inventory) +} + +// labelsOf lists labels sorted by key, capped at maxLabels. +func labelsOf(labels map[string]string) []Label { + keys := make([]string, 0, len(labels)) + for key := range labels { + keys = append(keys, key) + } + sort.Strings(keys) + listed := make([]Label, 0, len(keys)) + for _, key := range keys { + if len(listed) == maxLabels { + break + } + listed = append(listed, Label{Key: code(key), Value: code(labels[key])}) + } + if len(listed) == 0 { + return nil + } + return listed +} + +// inventoryOf summarizes the payload entries of a Record. +func inventoryOf(entries []artifact.Entry) *Inventory { + if len(entries) == 0 { + return nil + } + inventory := &Inventory{Count: len(entries)} + var total int64 + for index := range entries { + total += entries[index].Size + if index < maxInventoryFiles { + inventory.Files = append(inventory.Files, File{Path: code(entries[index].Path), Size: humanSize(entries[index].Size)}) + } + } + inventory.More = max(len(entries)-maxInventoryFiles, 0) + inventory.Bytes = humanSize(total) + return inventory +} + +// collectionOf summarizes a list or search result. +func collectionOf(collection *invoke.Collection) *Collection { + if collection == nil { + return nil + } + view := &Collection{Count: len(collection.Artifacts), Incomplete: collection.Incomplete} + for index := range collection.Repositories { + listing := &collection.Repositories[index] + view.Repositories = append(view.Repositories, RepositoryResult{ + Repository: code(listing.Repository), + Count: listing.Count, + Source: plain(listing.Source), + }) + } + for index := range collection.Artifacts { + if index >= maxListedArtifacts { + view.More = len(collection.Artifacts) - maxListedArtifacts + break + } + view.Artifacts = append(view.Artifacts, code(collection.Artifacts[index].Ref)) + } + return view +} + +// summaryOf states in one sentence what happened. +func summaryOf(section *Operation, collection *invoke.Collection) string { + target := section.Ref + if target == "" { + target = section.Requested + } + // A failed or canceled operation states the failure even when it returned a partial collection. + if section.Kind == kindFailed || section.Kind == kindCanceled { + return failureSummary(section, target) + } + if collection != nil { + return collectionSummary(section, collection) + } + subject := strings.TrimSpace(strings.ToLower(section.Status) + " " + target) + if section.Repository != "" { + subject += " in repository " + section.Repository + } + return titleCase(strings.TrimSpace(subject)) + "." +} + +// failureSummary words a failed or canceled operation without claiming any outcome. +func failureSummary(section *Operation, target string) string { + verb := "failed" + switch section.Status { + case "Canceled": + verb = "was canceled" + case "Timed out": + verb = "timed out" + } + text := "The " + strings.ToLower(section.Action) + " operation" + if target != "" { + text += " for " + target + } + return text + " " + verb + "." +} + +// collectionSummary words a list or search result, including an incomplete listing. +func collectionSummary(section *Operation, collection *invoke.Collection) string { + text := fmt.Sprintf("%s %d artifact", strings.TrimSuffix(section.Status, " (incomplete)"), len(collection.Artifacts)) + if len(collection.Artifacts) != 1 { + text += "s" + } + if collection.Incomplete { + text += "; the listing is incomplete because a repository could not be listed" + } + return text + "." +} diff --git a/pkg/artifact/report/classify.go b/pkg/artifact/report/classify.go new file mode 100644 index 00000000000..b63fe62c622 --- /dev/null +++ b/pkg/artifact/report/classify.go @@ -0,0 +1,181 @@ +package report + +import ( + "context" + "errors" + "strings" + + "github.com/cloudposse/atmos/pkg/artifact" +) + +// Result kinds. They classify an operation for the icon and for the counts of the overview. +const ( + kindSuccess = "success" + kindUnchanged = "unchanged" + kindDryRun = "dry-run" + kindUnchecked = "unchecked" + kindPartial = "incomplete" + kindFailed = "failed" + kindCanceled = "canceled" +) + +// kindIcons maps a result kind to its status symbol. +var kindIcons = map[string]string{ + kindSuccess: "✅", + kindUnchanged: "➖", + kindDryRun: "🔍", + kindUnchecked: "⚠️", + kindPartial: "⚠️", + kindFailed: "❌", + kindCanceled: "🚫", +} + +// outcomeWords holds the status wording of a successful operation by action and outcome. +var outcomeWords = map[artifact.Action]map[artifact.Outcome]string{ + artifact.ActionPublish: { + artifact.OutcomeCreated: "Published", + artifact.OutcomeUnchanged: "Unchanged", + artifact.OutcomeReplaced: "Replaced", + artifact.OutcomeDryRun: "Dry run", + }, + artifact.ActionPull: { + artifact.OutcomeRead: "Downloaded", + artifact.OutcomeCreated: "Downloaded", + artifact.OutcomeUnchanged: "Unchanged", + artifact.OutcomeReplaced: "Replaced", + }, + artifact.ActionCopy: { + artifact.OutcomeCreated: "Copied", + artifact.OutcomeUnchanged: "Unchanged", + artifact.OutcomeReplaced: "Replaced", + }, + artifact.ActionDelete: { + artifact.OutcomeDeleted: "Deleted", + artifact.OutcomeUnchanged: "Unchanged", + }, + artifact.ActionSign: { + artifact.OutcomeCreated: "Signed", + artifact.OutcomeUnchanged: "Already signed", + }, + artifact.ActionInspect: {artifact.OutcomeRead: "Inspected"}, + artifact.ActionShow: {artifact.OutcomeRead: "Shown"}, + artifact.ActionList: {artifact.OutcomeRead: "Listed"}, + artifact.ActionSearch: {artifact.OutcomeRead: "Searched"}, + artifact.ActionPin: {artifact.OutcomeRead: "Pinned"}, +} + +// mutatingActions are the actions that change repository state and so coordinate a lock. +var mutatingActions = map[artifact.Action]bool{ + artifact.ActionPublish: true, + artifact.ActionCopy: true, + artifact.ActionDelete: true, + artifact.ActionSign: true, +} + +// knownActions lists the actions that have a section template, in documentation order. +var knownActions = []artifact.Action{ + artifact.ActionPublish, artifact.ActionPull, artifact.ActionCopy, artifact.ActionInspect, + artifact.ActionList, artifact.ActionSearch, artifact.ActionDelete, artifact.ActionShow, + artifact.ActionSign, artifact.ActionVerify, artifact.ActionPin, +} + +// classify returns the status wording and result kind of one operation. The error decides first, +// so a partial result of a failed attempt is never reported as success. +func classify(action artifact.Action, outcome artifact.Outcome, verification *artifact.VerificationResult, err error) (word, kind string) { + if err != nil { + return classifyFailure(err) + } + if action == artifact.ActionVerify && verification != nil { + return classifyVerification(verification.Status) + } + word = outcomeWords[action][outcome] + if word == "" { + word = titleCase(string(outcome)) + } + if word == "" { + word = "Completed" + } + switch outcome { + case artifact.OutcomeUnchanged: + return word, kindUnchanged + case artifact.OutcomeDryRun: + return word, kindDryRun + case artifact.OutcomeFailed: + return "Failed", kindFailed + default: + return word, kindSuccess + } +} + +// classifyFailure separates a canceled operation from a failed one. +func classifyFailure(err error) (word, kind string) { + switch { + case errors.Is(err, context.Canceled): + return "Canceled", kindCanceled + case errors.Is(err, context.DeadlineExceeded): + return "Timed out", kindFailed + default: + return "Failed", kindFailed + } +} + +// classifyVerification words the result of a verify operation. Only a verified status claims that +// the signer was authenticated; unchecked means no trust configuration was supplied. +func classifyVerification(status artifact.VerificationStatus) (word, kind string) { + switch status { + case artifact.VerificationVerified: + return "Verified", kindSuccess + case artifact.VerificationUnchecked: + return "Unchecked", kindUnchecked + default: + return "Verification failed", kindFailed + } +} + +// titleCase upper-cases the first letter of a lowercase word. +func titleCase(word string) string { + if word == "" { + return "" + } + return strings.ToUpper(word[:1]) + word[1:] +} + +// actionLabel is the title-cased action, for example Publish. +func actionLabel(action artifact.Action) string { + if action == "" { + return "Operation" + } + return titleCase(string(action)) +} + +// isKnownAction reports whether name is an action that has a section template. +func isKnownAction(name string) bool { + for _, action := range knownActions { + if string(action) == name { + return true + } + } + return false +} + +// lockFor describes the lock guarantee of a finished mutation. A scope the operation did not +// report is stated as such for a successful mutation and omitted for everything else, so the +// report never invents a guarantee. +func lockFor(action artifact.Action, scope artifact.LockScope, outcome artifact.Outcome, failed bool) *Lock { + switch scope { + case artifact.LockScopeHost: + return &Lock{ + Scope: "host", + Guarantee: "Writers on this host were serialized. Writers on other hosts are not excluded.", + } + case artifact.LockScopeRepository: + return &Lock{ + Scope: "repository", + Guarantee: "Writers on every host were serialized through the repository's own coordination.", + } + } + if failed || !mutatingActions[action] || outcome == artifact.OutcomeDryRun { + return nil + } + return &Lock{Scope: "none", Guarantee: "The operation did not report a lock, so no exclusion between writers is claimed."} +} diff --git a/pkg/artifact/report/collector.go b/pkg/artifact/report/collector.go index 4067dcf4cc5..995f8df3c99 100644 --- a/pkg/artifact/report/collector.go +++ b/pkg/artifact/report/collector.go @@ -1,6 +1,7 @@ package report import ( + "github.com/cloudposse/atmos/pkg/artifact" "github.com/cloudposse/atmos/pkg/artifact/invoke" "github.com/cloudposse/atmos/pkg/perf" ) @@ -16,9 +17,20 @@ type Entry struct { // carries the same ID, so a renderer deduplicates by it and keeps the final attempt. OperationID string + // Action is the requested action. It names the operation when the result carries none, as for a + // list or search collection or for a failure before the service ran. + Action artifact.Action + // Attempt counts the attempts of this logical operation, starting at one. Attempt int + // Position is the scheduled position of the logical operation: one integer per nesting level, + // compared lexicographically. The boundary that schedules the operation sets it, so a report + // orders operations by where they were scheduled rather than by when they finished. Every + // attempt of one logical operation carries the same position. A nil position orders after + // every positioned entry, in arrival order. + Position []int + // Outcome is the typed outcome of single-artifact actions. It is nil for list and search. Outcome *invoke.Outcome @@ -44,3 +56,16 @@ func (Discard) Record(*Entry) { } var _ Collector = Discard{} + +// EntryFor builds the entry of a standalone command from the outcome of [invoke.Run] and its +// error. A command runs each operation once, so the attempt is one, and the operation's own ID, when +// the service reported one, identifies it. +func EntryFor(action artifact.Action, outcome *invoke.Outcome, err error) *Entry { + defer perf.Track(nil, "report.EntryFor")() + + entry := &Entry{Action: action, Attempt: 1, Outcome: outcome, Err: err} + if outcome != nil && outcome.Result != nil { + entry.OperationID = outcome.Result.OperationID + } + return entry +} diff --git a/pkg/artifact/report/doc.go b/pkg/artifact/report/doc.go index acb3b1aacf5..86759d73020 100644 --- a/pkg/artifact/report/doc.go +++ b/pkg/artifact/report/doc.go @@ -1,9 +1,18 @@ -// Package report defines the seam through which artifact operations report their results to a -// summary renderer. +// Package report renders the results of artifact operations as CI job summaries and CI output +// variables. // -// This package holds only the [Collector] interface and a no-op default. Execution boundaries -// (the artifact step handler, and in the future the CLI) record each completed or failed -// operation into an injected collector; a renderer implements the interface and decides what to -// show. Collectors are passed explicitly through runner services and options, never through -// context values. +// The package has two halves. [Collector] is the seam execution boundaries record into: the +// artifact step handler, the CLI commands, and (through the step handler) workflows, custom +// commands, and hooks. [Session] is the collector that renders. It buffers every recorded +// attempt, keeps the final attempt of each logical operation, orders the operations by their +// scheduled position, and on [Session.Flush] writes exactly one summary through the existing +// ci.Reporter, so the ci.* gates, provider routing, masking, and template loader apply unchanged. +// +// The renderer works over typed results only. It never mutates a repository and never asks a +// repository for more metadata or evidence: a disabled summary costs nothing, and an enabled one +// reports exactly what the operation already returned. Collectors are passed explicitly through +// runner services and options, never through context values. +// +// This is the only package under pkg/artifact that depends on CI reporting. The domain, +// services, and wiring packages stay free of it, which a boundary test enforces. package report diff --git a/pkg/artifact/report/edges_internal_test.go b/pkg/artifact/report/edges_internal_test.go new file mode 100644 index 00000000000..5340e431d43 --- /dev/null +++ b/pkg/artifact/report/edges_internal_test.go @@ -0,0 +1,203 @@ +package report + +import ( + "context" + "fmt" + "io/fs" + "strings" + "testing" + "time" + + "github.com/opencontainers/go-digest" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" +) + +func TestComparePositions(t *testing.T) { + tests := []struct { + name string + left, right []int + want int + }{ + {"both unscheduled", nil, nil, 0}, + {"unscheduled sorts last", nil, []int{0}, 1}, + {"scheduled sorts first", []int{0}, nil, -1}, + {"lower index first", []int{1, 5}, []int{2}, -1}, + {"higher index last", []int{3}, []int{2, 9}, 1}, + {"prefix is smaller", []int{1}, []int{1, 0}, -1}, + {"longer is greater", []int{1, 0, 0}, []int{1}, 2}, + {"equal", []int{1, 2}, []int{1, 2}, 0}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, comparePositions(tt.left, tt.right)) + }) + } +} + +func TestClassify(t *testing.T) { + tests := []struct { + name string + action artifact.Action + outcome artifact.Outcome + verification *artifact.VerificationResult + err error + wantWord string + wantKind string + }{ + {"canceled", artifact.ActionPull, "", nil, context.Canceled, "Canceled", kindCanceled}, + {"deadline", artifact.ActionPull, "", nil, fmt.Errorf("wrapped: %w", context.DeadlineExceeded), "Timed out", kindFailed}, + {"other error", artifact.ActionPull, "", nil, assert.AnError, "Failed", kindFailed}, + {"failed outcome without error", artifact.ActionPublish, artifact.OutcomeFailed, nil, nil, "Failed", kindFailed}, + {"verified", artifact.ActionVerify, "", &artifact.VerificationResult{Status: artifact.VerificationVerified}, nil, "Verified", kindSuccess}, + {"unchecked", artifact.ActionVerify, "", &artifact.VerificationResult{Status: artifact.VerificationUnchecked}, nil, "Unchecked", kindUnchecked}, + {"verification failed", artifact.ActionVerify, "", &artifact.VerificationResult{Status: artifact.VerificationFailed}, nil, "Verification failed", kindFailed}, + {"error wins over a verified partial result", artifact.ActionVerify, "", &artifact.VerificationResult{Status: artifact.VerificationVerified}, assert.AnError, "Failed", kindFailed}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + word, kind := classify(tt.action, tt.outcome, tt.verification, tt.err) + + assert.Equal(t, tt.wantWord, word) + assert.Equal(t, tt.wantKind, kind) + }) + } +} + +func TestActionLabelAndKnownActions(t *testing.T) { + assert.Equal(t, "Operation", actionLabel("")) + assert.Equal(t, "Publish", actionLabel(artifact.ActionPublish)) + assert.True(t, isKnownAction(string(artifact.ActionVerify))) + assert.False(t, isKnownAction("teleport")) +} + +func TestDefaultTemplatesOpenRejectsUnknownNames(t *testing.T) { + known := templatesPrefix + string(artifact.ActionPublish) + templateSuffix + file, err := defaultTemplates{}.Open(known) + require.NoError(t, err) + require.NoError(t, file.Close()) + + for _, name := range []string{ + string(artifact.ActionPublish) + templateSuffix, // Missing the directory prefix. + templatesPrefix + string(artifact.ActionPublish), // Missing the file suffix. + templatesPrefix + "teleport" + templateSuffix, // No section for the action. + templatesPrefix + "../" + frameCommand + "x.md", // Not a template name. + } { + t.Run(name, func(t *testing.T) { + _, err := defaultTemplates{}.Open(name) + + require.ErrorIs(t, err, fs.ErrNotExist) + }) + } +} + +func TestShortDigestAndSizes(t *testing.T) { + long := "sha256:" + strings.Repeat("ab", 32) + assert.Equal(t, "sha256:"+strings.Repeat("ab", shortDigestLength/2)+ellipsis, shortDigest(digest.Digest(long))) + assert.Equal(t, "sha256:abc", shortDigest(digest.Digest("sha256:abc")), "a short digest is kept whole") + assert.Equal(t, "no-algorithm", shortDigest(digest.Digest("no-algorithm")), "text without an algorithm is kept whole") + + assert.Empty(t, humanSize(0)) + assert.Empty(t, exactSize(-1)) + assert.Equal(t, "1.0 KiB (1,024 bytes)", exactSize(1024)) +} + +func TestFormatDuration(t *testing.T) { + tests := []struct { + duration time.Duration + want string + }{ + {0, ""}, + {-time.Second, ""}, + {time.Microsecond, "<1 ms"}, + {250 * time.Millisecond, "250 ms"}, + {1500 * time.Millisecond, "1.5 s"}, + {90*time.Second + 400*time.Millisecond, "1m30s"}, + } + for _, tt := range tests { + t.Run(tt.want, func(t *testing.T) { + assert.Equal(t, tt.want, formatDuration(tt.duration)) + }) + } +} + +func TestShortDigestTextAndSubjects(t *testing.T) { + assert.Equal(t, "sha256:short", shortDigestText("sha256:short")) + assert.Equal(t, "sha256:0123456789ab"+ellipsis, shortDigestText("sha256:0123456789abcdef0123")) + + empty := &Signature{} + applySubject(empty, nil) + applySubject(empty, &artifact.SignatureSubject{}) + assert.Equal(t, &Signature{}, empty, "a missing subject leaves the signature untouched") + + assert.Nil(t, claimsOf(nil)) + assert.Nil(t, evidenceOf(nil)) +} + +func TestLabelsDiagnosticsAndInventoryAreCapped(t *testing.T) { + labels := make(map[string]string) + for index := range maxLabels + 5 { + labels[fmt.Sprintf("key-%02d", index)] = "v" + } + listed := labelsOf(labels) + require.Len(t, listed, maxLabels) + assert.Equal(t, code("key-00"), listed[0].Key, "labels are sorted by key") + assert.Equal(t, code(fmt.Sprintf("key-%02d", maxLabels-1)), listed[maxLabels-1].Key) + assert.Nil(t, labelsOf(nil)) + + diagnostics := make([]artifact.Diagnostic, maxDiagnostics+3) + for index := range diagnostics { + diagnostics[index] = artifact.Diagnostic{Severity: "warning", Message: fmt.Sprintf("message %d", index)} + } + shown, more := diagnosticsOf(diagnostics) + require.Len(t, shown, maxDiagnostics) + assert.Equal(t, 3, more) + assert.Equal(t, plain("message 0"), shown[0].Message) + assert.Equal(t, plain(fmt.Sprintf("message %d", maxDiagnostics-1)), shown[maxDiagnostics-1].Message) + + assert.Nil(t, inventoryOf(nil)) +} + +func TestTruncateMarkdownClosesWhatTheCutOpened(t *testing.T) { + body := "intro\n" + codeFence + "\ncode that runs on " + strings.Repeat("x", 400) + "\n" + codeFence + "\n" + + detailsOpen + "\n" + strings.Repeat("y", 400) + "\n" + detailsClose + "\n" + detailsOpen + "\n" + strings.Repeat("z", 400) + + // Cut inside the first fence, with a collapsible section still open at the cut. + cutInFence := truncateMarkdown(body, len(truncationNote)+len(codeFence)*2+closeAllowance*(len(detailsClose)+1)+40) + assert.Equal(t, 0, strings.Count(cutInFence, codeFence)%2, "the fence is balanced") + assert.True(t, strings.HasSuffix(cutInFence, truncationNote)) + + // Cut inside the second collapsible section. + reserved := len(truncationNote) + len(codeFence) + 1 + closeAllowance*(len(detailsClose)+1) + cutInDetails := truncateMarkdown(body, reserved+strings.Index(body, strings.Repeat("z", 10))+5) + assert.Equal(t, strings.Count(cutInDetails, detailsOpen), strings.Count(cutInDetails, detailsClose), "every opened section is closed") + assert.True(t, strings.HasSuffix(cutInDetails, truncationNote)) + + // A limit below the note keeps the output within the limit. + assert.LessOrEqual(t, len(truncateMarkdown(body, 10)), 10) +} + +func TestCutAtRuneNeverSplitsARune(t *testing.T) { + text := "abé世z" // 1+1+2+3+1 bytes. + assert.Equal(t, text, cutAtRune(text, len(text))) + assert.Equal(t, "ab", cutAtRune(text, 3), "a cut inside the two-byte rune backs up to its start") + assert.Equal(t, "abé", cutAtRune(text, 5), "a cut inside the three-byte rune backs up to its start") + assert.Equal(t, "abé", cutAtRune(text, 4)) +} + +func TestVerificationSignatureListsEvidenceAndPolicy(t *testing.T) { + result := &invoke.Result{Verification: &artifact.VerificationResult{ + Status: artifact.VerificationVerified, + PolicyFingerprint: "sha256:0123456789abcdef0123", + EvidenceDigests: []digest.Digest{"sha256:aaa", "sha256:bbb"}, + }} + + signature := verificationSignature(result) + + assert.Equal(t, "verified", signature.Status) + assert.Equal(t, code("sha256:0123456789ab"+ellipsis), signature.Policy) + assert.Equal(t, []Evidence{{Digest: code("sha256:aaa")}, {Digest: code("sha256:bbb")}}, signature.Evidence) +} diff --git a/pkg/artifact/report/escape.go b/pkg/artifact/report/escape.go new file mode 100644 index 00000000000..61dfcd1a916 --- /dev/null +++ b/pkg/artifact/report/escape.go @@ -0,0 +1,201 @@ +package report + +import ( + "fmt" + "net/url" + "regexp" + "strings" + "time" + "unicode" + + "github.com/dustin/go-humanize" + "github.com/opencontainers/go-digest" + + atmosio "github.com/cloudposse/atmos/pkg/io" +) + +const ( + // The shortDigestLength constant is the number of hex characters of a digest shown in a table cell. + shortDigestLength = 12 + + // The minFenceLength constant is the shortest Markdown code fence. + minFenceLength = 3 + + // The backtick constant is the Markdown code delimiter character. + backtick = "`" + + // The ellipsis constant marks a shortened value. + ellipsis = "…" + + // The millisPerSecond constant converts milliseconds to seconds for duration formatting. + millisPerSecond = 1000 +) + +// redactedURL replaces a URL that cannot be parsed, so none of its parts reach the report. +const redactedURL = "" + +// urlPattern finds URLs in free text so credentials and query strings can be removed from them. +// The scheme is required, so a bare OCI reference such as ghcr.io/org/repo:1.0 is never touched. +var urlPattern = regexp.MustCompile("[a-zA-Z][a-zA-Z0-9+.-]*://[^\\s\"'<>`]+") + +// markdownEscaper backslash-escapes the characters that change meaning in running Markdown text and +// in table cells, and turns the HTML-significant characters into entities. +var markdownEscaper = strings.NewReplacer( + `\`, `\\`, + "`", "\\`", + "*", `\*`, + "_", `\_`, + "[", `\[`, + "]", `\]`, + "(", `\(`, + ")", `\)`, + "|", `\|`, + "~", `\~`, + "#", `\#`, + "&", "&", + "<", "<", + ">", ">", + "://", "://", +) + +// scrub masks secrets, removes credentials and query strings from URLs, and collapses every +// control character (including newlines) to a single space. It is the first step of every value +// that reaches the report, so a signed URL or a secret never reaches the template. +func scrub(value string) string { + value = atmosio.MaskString(value) + value = redactURLs(value) + return collapse(value) +} + +// collapse replaces runs of whitespace and control characters with one space and trims the result. +func collapse(value string) string { + var builder strings.Builder + space := false + for _, r := range value { + if unicode.IsControl(r) || unicode.IsSpace(r) { + space = builder.Len() > 0 + continue + } + if space { + builder.WriteByte(' ') + space = false + } + builder.WriteRune(r) + } + return builder.String() +} + +// redactURLs drops the user information, query string, and fragment of every URL in value. Those +// parts carry presigned-URL signatures and tokens, and a summary must never contain them. +func redactURLs(value string) string { + return urlPattern.ReplaceAllStringFunc(value, func(raw string) string { + parsed, err := url.Parse(raw) + if err != nil { + // An unparsable URL cannot be cleaned reliably, and the parse error would quote its user + // information, so the whole URL is replaced. + return redactedURL + } + if parsed.User == nil && parsed.RawQuery == "" && parsed.Fragment == "" && !parsed.ForceQuery { + return raw + } + parsed.User = nil + parsed.RawQuery = "" + parsed.ForceQuery = false + parsed.Fragment = "" + return parsed.String() + }) +} + +// plain renders untrusted text as escaped Markdown that is safe in running text and in table cells. +func plain(value string) string { + return markdownEscaper.Replace(scrub(value)) +} + +// code renders untrusted text as an inline code span. The span uses a backtick run longer than any +// run inside the value, so the value can never close the span or open an HTML tag. +func code(value string) string { + value = scrub(value) + if value == "" { + return "" + } + delimiter := strings.Repeat(backtick, longestBacktickRun(value)+1) + if strings.HasPrefix(value, backtick) || strings.HasSuffix(value, backtick) { + value = " " + value + " " + } + return delimiter + value + delimiter +} + +// longestBacktickRun returns the length of the longest run of backticks in value. +func longestBacktickRun(value string) int { + longest, current := 0, 0 + for _, r := range value { + if r == '`' { + current++ + longest = max(longest, current) + continue + } + current = 0 + } + return longest +} + +// fenced renders untrusted multi-line text as a fenced code block that the text cannot close. The +// text keeps its line breaks but is masked and stripped of URL credentials and query strings. +func fenced(value string) string { + value = atmosio.MaskString(value) + value = redactURLs(value) + value = strings.TrimSpace(strings.Map(func(r rune) rune { + if r == '\n' || r == '\t' || !unicode.IsControl(r) { + return r + } + return -1 + }, value)) + if value == "" { + return "" + } + fence := strings.Repeat(backtick, max(minFenceLength, longestBacktickRun(value)+1)) + return fence + "text\n" + value + "\n" + fence +} + +// shortDigest shortens a digest for a table cell and keeps its algorithm, for example sha256:0123456789ab…. +func shortDigest(value digest.Digest) string { + text := string(value) + algorithm, hex, found := strings.Cut(text, ":") + if !found || len(hex) <= shortDigestLength { + return text + } + return algorithm + ":" + hex[:shortDigestLength] + ellipsis +} + +// humanSize formats a byte count for people; zero is reported as empty because an operation that +// transferred nothing has no size to show. +func humanSize(size int64) string { + if size <= 0 { + return "" + } + return humanize.IBytes(uint64(size)) +} + +// exactSize formats a byte count with its exact value, for the details view. +func exactSize(size int64) string { + if size <= 0 { + return "" + } + return fmt.Sprintf("%s (%s bytes)", humanize.IBytes(uint64(size)), humanize.Comma(size)) +} + +// formatDuration formats an operation duration compactly; zero is reported as empty. +func formatDuration(duration time.Duration) string { + switch { + case duration <= 0: + return "" + case duration < time.Millisecond: + return "<1 ms" + case duration < time.Second: + return fmt.Sprintf("%d ms", duration.Milliseconds()) + case duration < time.Minute: + return fmt.Sprintf("%.1f s", float64(duration.Milliseconds())/millisPerSecond) + default: + return duration.Round(time.Second).String() + } +} diff --git a/pkg/artifact/report/helpers_test.go b/pkg/artifact/report/helpers_test.go new file mode 100644 index 00000000000..d93fad6b4fe --- /dev/null +++ b/pkg/artifact/report/helpers_test.go @@ -0,0 +1,188 @@ +package report_test + +import ( + "flag" + "os" + "path/filepath" + "strings" + "sync" + "testing" + "time" + + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" + "github.com/cloudposse/atmos/pkg/ci" + "github.com/cloudposse/atmos/pkg/schema" +) + +// update regenerates the golden files under testdata. Run: go test ./pkg/artifact/report -update. +var update = flag.Bool("update", false, "regenerate the golden files") + +// Compile-time sentinels for the schema fields these tests set. +var ( + _ = schema.CIConfig{Enabled: true} + _ = schema.CISummaryConfig{Enabled: ptr(true)} + _ = schema.CIOutputConfig{Enabled: ptr(true)} + _ = schema.CITemplatesConfig{BasePath: "x", Artifacts: map[string]string{"summary": "x.md"}} +) + +func ptr[T any](value T) *T { return &value } + +// digestOf returns a deterministic sha256-shaped digest for a one-character seed. +func digestOf(seed string) digest.Digest { + hex := "" + for len(hex) < 64 { + hex += seed + } + return digest.Digest("sha256:" + hex[:64]) +} + +// fakeReporter records what the session writes. It embeds the interface so only the methods the +// session uses are implemented; any other call panics, which fails the test loudly. +type fakeReporter struct { + ci.Reporter + + mu sync.Mutex + summaries []string + outputs []output + summaryErr error + outputErr error +} + +type output struct{ Key, Value string } + +func (f *fakeReporter) Summary(markdown string) (ci.Receipt, error) { + f.mu.Lock() + defer f.mu.Unlock() + f.summaries = append(f.summaries, markdown) + return ci.Receipt{}, f.summaryErr +} + +func (f *fakeReporter) Output(key, value string) (ci.Receipt, error) { + f.mu.Lock() + defer f.mu.Unlock() + f.outputs = append(f.outputs, output{key, value}) + return ci.Receipt{}, f.outputErr +} + +// factory returns a reporter factory that counts how often the session builds a reporter. +func (f *fakeReporter) factory(builds *int) func(*schema.AtmosConfiguration) ci.Reporter { + return func(*schema.AtmosConfiguration) ci.Reporter { + if builds != nil { + *builds++ + } + return f + } +} + +// enabledConfig enables the CI master switch, which turns on summaries and outputs by default. +func enabledConfig() *schema.AtmosConfiguration { + return &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true}} +} + +// result wraps an operation result in an outcome. +func result(op *artifact.OperationResult, mutate ...func(*invoke.Result)) *invoke.Outcome { + res := &invoke.Result{OperationResult: *op} + for _, apply := range mutate { + apply(res) + } + return &invoke.Outcome{Result: res} +} + +// entry builds a recorded attempt. +func entry(step, id string, attempt int, outcome *invoke.Outcome, err error, position ...int) *report.Entry { + return &report.Entry{Step: step, OperationID: id, Attempt: attempt, Position: position, Outcome: outcome, Err: err} +} + +// published is a successful publication. +func published(id, ref string) *invoke.Outcome { + return result(&artifact.OperationResult{ + OperationID: id, Action: artifact.ActionPublish, Outcome: artifact.OutcomeCreated, Repository: "shared", + Requested: ref, Ref: ref, Location: "oci://ghcr.io/acme/" + ref, + ResolvedDigest: digestOf("a"), RecordDigest: digestOf("b"), ContentDigest: digestOf("c"), RepresentationDigest: digestOf("d"), + Size: 49152, Duration: 1200 * time.Millisecond, LockScope: artifact.LockScopeHost, + }, func(res *invoke.Result) { + res.Record = &artifact.Record{ + Name: "components/vpc", Version: "1.2.0", Kind: "files", + Metadata: artifact.Metadata{Description: "VPC component", Labels: map[string]string{"team": "net", "tier": "1"}}, + Inventory: []artifact.Entry{{Path: "main.tf", Type: artifact.EntryFile, Size: 1024}, {Path: "variables.tf", Type: artifact.EntryFile, Size: 2048}}, + } + }) +} + +// subjectOf returns a record signature subject. +func subjectOf(seed string) artifact.SignatureSubject { + return artifact.SignatureSubject{Kind: artifact.SubjectRecord, Digest: digestOf(seed), MediaType: "application/vnd.atmos.artifact.record.v1+json", Size: 512} +} + +// signed is a successful sign. +func signed(id string) *invoke.Outcome { + subject := subjectOf("b") + return result(&artifact.OperationResult{ + OperationID: id, Action: artifact.ActionSign, Outcome: artifact.OutcomeCreated, Repository: "shared", + Requested: "components/vpc:1.2.0", Ref: "components/vpc:1.2.0", RecordDigest: digestOf("b"), LockScope: artifact.LockScopeRepository, + Duration: 300 * time.Millisecond, + }, func(res *invoke.Result) { + res.Subject = &subject + res.Evidence = []artifact.SignatureEvidence{{ + Subject: subject, Format: artifact.EvidenceSigstoreBundle, + Descriptor: ocispec.Descriptor{Digest: digestOf("e"), Size: 100}, + }} + }) +} + +// verified is a verify operation with the given status. +func verified(id string, status artifact.VerificationStatus) *invoke.Outcome { + verification := &artifact.VerificationResult{Subject: subjectOf("b"), Status: status, PolicyFingerprint: "sha256:" + string(digestOf("f"))[7:]} + if status == artifact.VerificationVerified { + verification.Claims = []artifact.SignerClaim{ + {Identity: "https://github.com/acme/infra/.github/workflows/release.yaml@refs/heads/main", Issuer: "https://token.actions.githubusercontent.com"}, + {KeyID: "SHA256:abcdef"}, + } + } + return result(&artifact.OperationResult{ + OperationID: id, Action: artifact.ActionVerify, Outcome: artifact.OutcomeRead, Repository: "shared", + Requested: "components/vpc:1.2.0", Ref: "components/vpc:1.2.0", RecordDigest: digestOf("b"), + }, func(res *invoke.Result) { + res.Verification = verification + res.Subject = &verification.Subject + }) +} + +// golden compares got with testdata/.md, or rewrites it under -update. +func golden(t *testing.T, name, got string) { + t.Helper() + path := filepath.Join("testdata", name+".md") + // Repository checks keep exactly one final newline in text files, so compare on that form. + got = strings.TrimRight(got, "\n") + "\n" + if *update { + require.NoError(t, os.MkdirAll("testdata", 0o755)) + require.NoError(t, os.WriteFile(path, []byte(got), 0o644)) + } + want, err := os.ReadFile(path) + require.NoError(t, err, "missing golden file; run: go test ./pkg/artifact/report -update") + require.Equal(t, string(want), got) +} + +// flushOne records the entries into a session with the fake reporter, flushes, and returns the one summary. +func flushOne(t *testing.T, config *schema.AtmosConfiguration, entries ...*report.Entry) string { + t.Helper() + fake := &fakeReporter{} + session := report.NewSession(config, report.WithReporter(fake.factory(nil))) + for _, item := range entries { + session.Record(item) + } + require.NoError(t, session.Flush()) + require.Len(t, fake.summaries, 1, "exactly one summary per flush") + return fake.summaries[0] +} + +// newSession builds a session that reports through the fake reporter. +func newSession(config *schema.AtmosConfiguration, fake *fakeReporter, options ...report.Option) *report.Session { + return report.NewSession(config, append([]report.Option{report.WithReporter(fake.factory(nil))}, options...)...) +} diff --git a/pkg/artifact/report/integration_test.go b/pkg/artifact/report/integration_test.go new file mode 100644 index 00000000000..c63812de263 --- /dev/null +++ b/pkg/artifact/report/integration_test.go @@ -0,0 +1,107 @@ +package report_test + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact/report" + "github.com/cloudposse/atmos/pkg/ci" + "github.com/cloudposse/atmos/pkg/ci/providers/generic" + "github.com/cloudposse/atmos/pkg/schema" +) + +// ciFiles points the generic provider at temporary summary and output files. +func ciFiles(t *testing.T) (summary, outputs string) { + t.Helper() + dir := t.TempDir() + summary, outputs = filepath.Join(dir, "summary.md"), filepath.Join(dir, "output.txt") + t.Setenv("ATMOS_CI_SUMMARY", summary) + t.Setenv("ATMOS_CI_OUTPUT", outputs) + return summary, outputs +} + +// realSession builds a session whose reporter is a real ci.Reporter bound to the generic provider, +// so the ci.* gates and the file-backed writers apply. +func realSession(config *schema.AtmosConfiguration) *report.Session { + return report.NewSession(config, report.WithReporter(func(cfg *schema.AtmosConfiguration) ci.Reporter { + return ci.NewReporterForProvider(cfg, generic.NewProvider(), nil) + })) +} + +func read(t *testing.T, path string) string { + t.Helper() + content, err := os.ReadFile(path) + if os.IsNotExist(err) { + return "" + } + require.NoError(t, err) + return string(content) +} + +func TestReportIsAppendedToExistingSummaryContent(t *testing.T) { + summary, outputs := ciFiles(t) + require.NoError(t, os.WriteFile(summary, []byte("## Earlier step\n\nunrelated content\n"), 0o644)) + session := realSession(enabledConfig()) + session.Record(entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil)) + require.NoError(t, session.Flush()) + + content := read(t, summary) + assert.Contains(t, content, "## Earlier step\n\nunrelated content\n", "existing job summary content remains") + assert.Contains(t, content, "### ✅ 1. Publish `components/vpc:1.2.0`") + assert.Less(t, strings.Index(content, "unrelated content"), strings.Index(content, "## Artifacts")) + assert.Contains(t, read(t, outputs), "artifact_ref=components/vpc:1.2.0\n") + assert.Contains(t, read(t, outputs), "artifact_publish_resolved_digest=sha256:") +} + +func TestReportGatesWithTheRealReporter(t *testing.T) { + cases := []struct { + name string + config *schema.AtmosConfiguration + wantSummary bool + wantOutputs bool + }{ + {"ci disabled", &schema.AtmosConfiguration{}, false, false}, + {"summaries disabled", &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Summary: schema.CISummaryConfig{Enabled: ptr(false)}}}, false, true}, + {"outputs disabled", &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Output: schema.CIOutputConfig{Enabled: ptr(false)}}}, true, false}, + {"enabled", enabledConfig(), true, true}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + summary, outputs := ciFiles(t) + session := realSession(tc.config) + session.Record(entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil)) + require.NoError(t, session.Flush()) + assert.Equal(t, tc.wantSummary, read(t, summary) != "") + assert.Equal(t, tc.wantOutputs, read(t, outputs) != "") + }) + } +} + +func TestDefaultReporterHonorsForcedCIMode(t *testing.T) { + summary, outputs := ciFiles(t) + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + session := report.NewSession(enabledConfig()) + session.Record(entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil)) + require.NoError(t, session.Flush()) + assert.Contains(t, read(t, summary), "## Artifacts") + assert.Contains(t, read(t, outputs), "artifact_outcome=created") +} + +func TestUnconfiguredCIWritesNothing(t *testing.T) { + summary, outputs := ciFiles(t) + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + session := report.NewSession(&schema.AtmosConfiguration{}) + session.Record(entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil)) + require.NoError(t, session.Flush()) + assert.Empty(t, read(t, summary)) + assert.Empty(t, read(t, outputs)) +} diff --git a/pkg/artifact/report/model.go b/pkg/artifact/report/model.go new file mode 100644 index 00000000000..5d49c152153 --- /dev/null +++ b/pkg/artifact/report/model.go @@ -0,0 +1,259 @@ +package report + +// Report is the template context of the frame template (ci.templates.artifacts.summary). Every +// string is already escaped Markdown: a template prints the fields as they are and never needs to +// escape them. Strings that are code spans, such as references and digests, are wrapped in +// backticks already. +type Report struct { + // Heading is the report heading text. + Heading string + + // Overview is a one-line count of the operations and their outcomes. + Overview string + + // Total is the number of operations in the report. + Total int + + // Succeeded, Unchanged, Failed, and Canceled count the operations by result. An unchanged + // operation succeeded without writing anything and is counted only as unchanged. + Succeeded int + Unchanged int + Failed int + Canceled int + + // Rows are the compact overview table rows, one per operation, in report order. + Rows []Row + + // Sections are the rendered per-operation sections, in report order. When the size limit + // forced operations out of the report, only the first Total-Omitted operations have a section. + Sections []string + + // Omitted is the number of operation sections left out to fit the summary size limit. + Omitted int + + // Notice is a visible note about a degraded report, such as omitted sections. It is empty + // when the report is complete. + Notice string +} + +// Row is one row of the overview table. +type Row struct { + // Number is the one-based position of the operation in the report. + Number int + + // Operation is the action, for example Publish or Pull. + Operation string + + // Icon is the status symbol, and Status the status wording, for example Published. + Icon string + Status string + + // Artifact is the resolved reference as a code span, or the requested one when none resolved. + Artifact string + + // Repository is the configured repository alias as a code span. + Repository string + + // Destination is the primary resolved location as a code span, with credentials and query + // strings removed. + Destination string + + // Digest is the shortened primary digest with its type, for example `sha256:0123456789ab…` (resolved). + Digest string + + // Size and Duration are human-readable values; empty when the operation has none. + Size string + Duration string +} + +// Operation is the template context of one per-operation section (ci.templates.artifacts.). +// Every string is already escaped Markdown. +type Operation struct { + // Number is the one-based position of the operation in the report. + Number int + + // Step is the name of the step that ran the operation, or empty for a standalone command. + Step string + + // Action is the action name, for example publish, and ActionLabel its title-cased form. + Action string + ActionLabel string + + // Title is the section heading text: the action label and the reference. + Title string + + // Icon, Status, and Kind classify the result. Kind is one of success, unchanged, dry-run, + // unchecked, failed, or canceled. + Icon string + Status string + Kind string + + // Summary is one sentence stating what happened. + Summary string + + // Repository, Requested, Ref, and Destination are code spans. Requested is empty when it equals Ref. + Repository string + Requested string + Ref string + Destination string + + // Aliases lists the additional locations or tags that resolve to the same content, as code spans. + Aliases []string + + // Size and Duration are human-readable. ExactSize adds the byte count. + Size string + ExactSize string + Duration string + + // Attempts is the number of attempts the final result took; one means no retry. + Attempts int + + // Lock is the lock guarantee of a mutation, or nil when the operation did not coordinate one. + Lock *Lock + + // Digests lists every digest the operation reported, each labelled with its type. + Digests []Digest + + // Integrity says what the digests prove and what they do not. + Integrity string + + // Signature is the signature subject, evidence, and verification result, or nil when the + // operation neither signed nor verified. + Signature *Signature + + // Error is the fenced error block of a failed operation. + Error string + + // Diagnostics are the non-fatal messages of the operation, capped; DiagnosticsMore counts the rest. + Diagnostics []Diagnostic + DiagnosticsMore int + + // Description and Labels come from the published Record. + Description string + Labels []Label + + // Inventory lists the payload files of a published or inspected Record. + Inventory *Inventory + + // Collection summarizes a list or search result. + Collection *Collection +} + +// Lock states the guarantee of the lock that coordinated a mutation. +type Lock struct { + // Scope is the actual lock scope: host, repository, or none. + Scope string + + // Guarantee says in a sentence what the scope does and does not exclude. + Guarantee string +} + +// Digest is one labelled digest. +type Digest struct { + // Label names the digest type: Resolved, Record, Content, or Representation. + Label string + + // Meaning says what the digest identifies. + Meaning string + + // Value is the full digest as a code span, and Short its shortened form. + Value string + Short string +} + +// Signature reports the signature facts of a sign or verify operation. Signed and verified are +// different claims: signing stores evidence, and only verification against a trust policy +// authenticates the signer. +type Signature struct { + // Status is signed, verified, unchecked, or failed. + Status string + + // Statement says in a sentence what the status does and does not prove. + Statement string + + // Subject is the immutable thing the signature covers: its kind and digest. + SubjectKind string + SubjectDigest string + SubjectMediaType string + + // Policy is the shortened fingerprint of the verification policy that was applied. + Policy string + + // Claims are the verified signer identities. + Claims []Claim + + // Evidence lists the signature evidence that was stored or considered. + Evidence []Evidence +} + +// Claim is a verified signer identity. Identity and Issuer are set for keyless signing and KeyID +// for key-based signing. +type Claim struct { + Identity string + Issuer string + KeyID string +} + +// Evidence is one evidence blob. +type Evidence struct { + // Format is the evidence encoding, and Digest the evidence blob digest as a code span. + Format string + Digest string +} + +// Diagnostic is one non-fatal message. +type Diagnostic struct { + // Severity is info, warning, or error; Code may be empty. + Severity string + Code string + Message string +} + +// Label is one metadata label as code spans. +type Label struct { + Key string + Value string +} + +// Inventory lists payload files. +type Inventory struct { + // Count is the number of entries in the Record, and Bytes their total size. + Count int + Bytes string + + // Files are the first entries; More counts the entries not listed. + Files []File + More int +} + +// File is one payload entry. +type File struct { + // Path is a code span, and Size a human-readable size, empty for directories and symlinks. + Path string + Size string +} + +// Collection summarizes a list or search. +type Collection struct { + // Count is the number of artifacts returned. + Count int + + // Incomplete is true when a repository could not be listed, so Count is not the whole collection. + Incomplete bool + + // Repositories reports each repository's result. + Repositories []RepositoryResult + + // Artifacts lists the first returned artifacts as code spans; More counts the rest. + Artifacts []string + More int +} + +// RepositoryResult is the listing outcome of one repository. +type RepositoryResult struct { + // Repository is the alias as a code span, Count the entries it returned, and Source where they + // came from: live, cache, or catalog. + Repository string + Count int + Source string +} diff --git a/pkg/artifact/report/outputs.go b/pkg/artifact/report/outputs.go new file mode 100644 index 00000000000..08c62626d77 --- /dev/null +++ b/pkg/artifact/report/outputs.go @@ -0,0 +1,121 @@ +package report + +import ( + "fmt" + "strings" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/ci" + atmosio "github.com/cloudposse/atmos/pkg/io" + log "github.com/cloudposse/atmos/pkg/logger" +) + +// OutputPrefix namespaces the CI output variables of artifact operations, so a job that publishes +// an artifact and also runs Terraform never sees two features write the same name. +const OutputPrefix = "artifact_" + +// writeOutputs writes the named outputs of every single-artifact operation to the CI output +// variables, in report order. Each operation writes artifact_ (outcome, ref, location, +// resolved_digest, record_digest, content_digest, representation_digest, size), the same names a +// step exposes as StepResult.Outputs, so the last operation in the report owns the unqualified +// names. An operation that ran in a named step also writes artifact__, which stays +// unambiguous when a job runs several operations. List and search have no named outputs. +// +// The location has its credentials and query string removed first, and every value is masked: a CI +// output variable is readable by every later step and job. +// +// Step names that differ but normalize to the same segment (publish-vpc and publish_vpc) can write +// the same qualified name. A qualified name is claimed by the first step that actually writes it, +// in report order; a later step with a different name writes only the unqualified names for that +// output and a warning says so, so a qualified name never carries another step's value. Steps that +// write disjoint outputs (for example a delete and a publish) do not conflict. +func writeOutputs(reporter ci.Reporter, entries []*Entry) error { + claims := newNameClaims() + for _, entry := range entries { + if entry.Outcome == nil || entry.Outcome.Result == nil { + continue + } + segment := outputStepName(entry.Step) + for _, pair := range invoke.OutputPairs(&entry.Outcome.Result.OperationResult) { + value := outputValue(pair) + for _, name := range outputNames(claims.qualifier(entry.Step, segment, pair.Name), pair.Name) { + // A provider that cannot write one output cannot write the rest, so the first + // failure ends the attempt instead of repeating the same error for every variable. + if _, err := reporter.Output(name, value); err != nil { + return fmt.Errorf("%w: %w", errUtils.ErrArtifactReportWrite, err) + } + } + } + } + return nil +} + +// nameClaims remembers which step name owns each step-qualified output name. +type nameClaims struct { + owners map[string]string + warned map[string]bool +} + +func newNameClaims() *nameClaims { + return &nameClaims{owners: map[string]string{}, warned: map[string]bool{}} +} + +// qualifier returns the segment to qualify one output of a step with, or "" when the step has no +// usable segment or another step name already owns the qualified name of this output. +func (c *nameClaims) qualifier(step, segment, name string) string { + if segment == "" { + return "" + } + qualified := OutputPrefix + segment + "_" + name + owner, claimed := c.owners[qualified] + if !claimed { + c.owners[qualified] = step + return segment + } + if owner == step { + return segment + } + if !c.warned[step] { + c.warned[step] = true + log.Warn("Artifact step output names collide; step-qualified outputs are skipped for the later step", + "step", atmosio.MaskString(step), "collides_with", atmosio.MaskString(owner), + "output_prefix", atmosio.MaskString(OutputPrefix+segment+"_")) + } + return "" +} + +// outputNames returns the output variable names for one value: the unqualified name and, for an +// operation in a named step, the step-qualified name. +func outputNames(step, name string) []string { + names := []string{OutputPrefix + name} + if step != "" { + names = append(names, OutputPrefix+step+"_"+name) + } + return names +} + +// outputValue is the value written for a named output. The location is stripped of credentials and +// query strings first; every value then passes through the secret masker, because a registered +// secret can appear in a reference or in a location path as well. +func outputValue(pair invoke.Pair) string { + if pair.Name == invoke.OutputLocation { + return atmosio.MaskString(redactURLs(pair.Value)) + } + return atmosio.MaskString(pair.Value) +} + +// outputStepName turns a step name into a safe output-name segment: lowercase letters, digits, +// and underscores. A name with no usable characters yields an empty segment. +func outputStepName(step string) string { + var builder strings.Builder + for _, r := range strings.ToLower(step) { + switch { + case r >= 'a' && r <= 'z', r >= '0' && r <= '9': + builder.WriteRune(r) + default: + builder.WriteByte('_') + } + } + return strings.Trim(builder.String(), "_") +} diff --git a/pkg/artifact/report/outputs_test.go b/pkg/artifact/report/outputs_test.go new file mode 100644 index 00000000000..fdd18657e9b --- /dev/null +++ b/pkg/artifact/report/outputs_test.go @@ -0,0 +1,169 @@ +package report_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" + atmosio "github.com/cloudposse/atmos/pkg/io" + "github.com/cloudposse/atmos/pkg/schema" +) + +func outputMap(fake *fakeReporter) map[string]string { + values := map[string]string{} + for _, item := range fake.outputs { + values[item.Key] = item.Value + } + return values +} + +func TestOutputsUseTheNamedStepOutputs(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + outcome := published("op-1", "components/vpc:1.2.0") + session.Record(entry("Publish VPC", "op-1", 1, outcome, nil)) + require.NoError(t, session.Flush()) + + values := outputMap(fake) + for _, pair := range invoke.OutputPairs(&outcome.Result.OperationResult) { + assert.Equal(t, pair.Value, values[report.OutputPrefix+pair.Name], "unqualified %s", pair.Name) + assert.Equal(t, pair.Value, values[report.OutputPrefix+"publish_vpc_"+pair.Name], "step-qualified %s", pair.Name) + } + for _, name := range []string{"ref", "location", "resolved_digest", "record_digest", "content_digest", "representation_digest", "size", "outcome"} { + assert.Contains(t, values, "artifact_"+name) + } + assert.Equal(t, "created", values["artifact_outcome"]) + assert.Equal(t, "49152", values["artifact_size"]) +} + +func TestOutputsOmitValuesTheOperationDidNotProduce(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(entry("", "a", 1, result(&artifact.OperationResult{Action: artifact.ActionDelete, Outcome: artifact.OutcomeDeleted, Ref: "x/y:1"}), nil)) + require.NoError(t, session.Flush()) + values := outputMap(fake) + assert.Equal(t, map[string]string{"artifact_outcome": "deleted", "artifact_ref": "x/y:1"}, values) +} + +func TestOutputsLastOperationOwnsTheUnqualifiedNames(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(entry("second", "b", 1, published("b", "x/two:1"), nil, 2)) + session.Record(entry("first", "a", 1, published("a", "x/one:1"), nil, 0)) + require.NoError(t, session.Flush()) + values := outputMap(fake) + assert.Equal(t, "x/two:1", values["artifact_ref"], "report order decides the unqualified names") + assert.Equal(t, "x/one:1", values["artifact_first_ref"]) + assert.Equal(t, "x/two:1", values["artifact_second_ref"]) +} + +func TestOutputsDoNotLeakSignedUrls(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + outcome := published("a", "x/y:1") + outcome.Result.Location = "https://bucket.example/key?X-Amz-Signature=abc" + session.Record(entry("", "a", 1, outcome, nil)) + require.NoError(t, session.Flush()) + assert.Equal(t, "https://bucket.example/key", outputMap(fake)["artifact_location"]) +} + +func TestOutputsSkipCollectionsAndFailedWithoutResult(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(&report.Entry{Action: artifact.ActionList, Attempt: 1, Outcome: &invoke.Outcome{Collection: &invoke.Collection{}}}) + session.Record(&report.Entry{Action: artifact.ActionPull, Attempt: 1}) + require.NoError(t, session.Flush()) + assert.Empty(t, fake.outputs) +} + +func TestOutputsRespectTheirGate(t *testing.T) { + disabled := &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Output: schema.CIOutputConfig{Enabled: ptr(false)}}} + fake := &fakeReporter{} + session := newSession(disabled, fake) + session.Record(entry("", "a", 1, published("a", "x/y:1"), nil)) + require.NoError(t, session.Flush()) + assert.Empty(t, fake.outputs, "ci.output.enabled=false writes no output variables") + assert.Len(t, fake.summaries, 1, "the summary is independent of the output gate") +} + +func TestOutputsMaskRegisteredSecretsInEveryValue(t *testing.T) { + const secret = "mask-me-output-value" + atmosio.RegisterSecret(secret) + outcome := published("a", "x/"+secret+":1") + outcome.Result.Location = "oci://registry.example/" + secret + "/x?X-Amz-Signature=abc" + + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(entry("publish", "a", 1, outcome, nil)) + require.NoError(t, session.Flush()) + + require.NotEmpty(t, fake.outputs) + for _, item := range fake.outputs { + assert.NotContains(t, item.Value, secret, "output %s is masked", item.Key) + assert.NotContains(t, item.Value, "X-Amz-Signature", "output %s has no query string", item.Key) + } +} + +func TestOutputsDoNotShareAQualifiedNameBetweenDistinctStepNames(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + // publish-vpc and publish_vpc normalize to the same segment. + session.Record(entry("publish-vpc", "a", 1, published("a", "x/dash:1"), nil, 0)) + session.Record(entry("publish_vpc", "b", 1, published("b", "x/underscore:1"), nil, 2)) + require.NoError(t, session.Flush()) + + values := outputMap(fake) + assert.Equal(t, "x/dash:1", values["artifact_publish_vpc_ref"], "the first step in report order keeps the qualified name") + assert.Equal(t, "x/underscore:1", values["artifact_ref"], "the unqualified names still follow the last operation") + + qualifiedWrites := 0 + for _, item := range fake.outputs { + if item.Key == "artifact_publish_vpc_ref" { + qualifiedWrites++ + } + } + assert.Equal(t, 1, qualifiedWrites, "the qualified name is written once, never shadowed by another step") +} + +func TestOutputsRepeatedStepNameKeepsItsQualifiedName(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(entry("publish", "a", 1, published("a", "x/one:1"), nil, 0)) + session.Record(entry("publish", "b", 1, published("b", "x/two:1"), nil, 2)) + require.NoError(t, session.Flush()) + assert.Equal(t, "x/two:1", outputMap(fake)["artifact_publish_ref"], "the same step name is one owner, and the last run wins") +} + +func TestOutputsClaimQualifiedNamesPerOutputNotPerStep(t *testing.T) { + deleted := func(id string) *invoke.Outcome { + return result(&artifact.OperationResult{OperationID: id, Action: artifact.ActionDelete, Outcome: artifact.OutcomeDeleted}) + } + t.Run("a delete step does not shadow a later publish step with a colliding segment", func(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + // The delete writes only the outcome; the publish writes the digests the delete never produced. + session.Record(entry("publish-vpc", "a", 1, deleted("a"), nil, 0)) + session.Record(entry("publish_vpc", "b", 1, published("b", "x/underscore:1"), nil, 1)) + require.NoError(t, session.Flush()) + + values := outputMap(fake) + assert.Equal(t, "deleted", values["artifact_publish_vpc_outcome"], "the first writer of a name keeps it") + assert.Equal(t, "x/underscore:1", values["artifact_publish_vpc_ref"], "the publish step owns the names the delete never wrote") + assert.Equal(t, string(digestOf("a")), values["artifact_publish_vpc_resolved_digest"]) + }) + t.Run("a name written by both steps stays with the first step", func(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake) + session.Record(entry("publish-vpc", "a", 1, published("a", "x/dash:1"), nil, 0)) + session.Record(entry("publish_vpc", "b", 1, published("b", "x/underscore:1"), nil, 1)) + require.NoError(t, session.Flush()) + + values := outputMap(fake) + assert.Equal(t, "x/dash:1", values["artifact_publish_vpc_ref"]) + assert.Equal(t, "x/underscore:1", values["artifact_ref"], "the unqualified names follow the last operation") + }) +} diff --git a/pkg/artifact/report/render.go b/pkg/artifact/report/render.go new file mode 100644 index 00000000000..48ed0aab103 --- /dev/null +++ b/pkg/artifact/report/render.go @@ -0,0 +1,264 @@ +package report + +import ( + "fmt" + "io/fs" + "strings" + "unicode/utf8" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/ci/templates" + atmosio "github.com/cloudposse/atmos/pkg/io" + "github.com/cloudposse/atmos/pkg/schema" +) + +const ( + // DefaultMaxBytes is the largest summary the renderer produces. GitHub rejects a step summary + // over 1 MiB, so the default leaves headroom below it for content other steps already wrote. + DefaultMaxBytes = 1024*1024 - 64*1024 + + // The compactDiagnostics constant is the number of diagnostics a size-reduced report keeps per operation. + compactDiagnostics = 3 + + // The reportHeading constant is the heading of the summary. + reportHeading = "Artifacts" + + // The closeAllowance constant is the number of unclosed collapsible sections a hard truncation closes. + closeAllowance = 4 + + // The codeFence constant is the Markdown fence a hard truncation must leave balanced. + codeFence = "```" + + // The lineBreak constant is the newline the renderer trims and appends around blocks. + lineBreak = "\n" + + detailsOpen = "
" + detailsClose = "
" +) + +// truncationNote is appended after a hard truncation. It is visible in the rendered summary. +const truncationNote = "\n\n> [!WARNING]\n> This summary was cut to fit the size limit. The workflow log has the full results.\n" + +// templateSet loads the frame and per-action templates once, in the loader's order: an explicit +// ci.templates.artifacts. file, then /artifacts/.md, then the embedded +// default. A configured file that cannot be read is an error, never a silent fallback. +type templateSet struct { + loader *templates.Loader + defaults fs.FS + frame string + sections map[string]string +} + +// newTemplateSet loads the frame template. +func newTemplateSet(config *schema.AtmosConfiguration) (*templateSet, error) { + set := &templateSet{loader: templates.NewLoader(config), defaults: defaultTemplates{}, sections: map[string]string{}} + frame, err := set.loader.Load(componentType, frameCommand, set.defaults) + if err != nil { + return nil, renderError(err) + } + set.frame = frame + return set, nil +} + +// section returns the template of one action's section, loading it on first use. +func (s *templateSet) section(action string) (string, error) { + if action == "" || !isKnownAction(action) { + action = "inspect" + } + if content, ok := s.sections[action]; ok { + return content, nil + } + content, err := s.loader.Load(componentType, action, s.defaults) + if err != nil { + return "", renderError(err) + } + s.sections[action] = content + return content, nil +} + +// renderAll renders the report, degrading it in visible steps until it fits maxBytes: first the +// bulky details are dropped, then trailing operation sections, and only then is the text cut. +func renderAll(set *templateSet, report *Report, operations []*Operation, maxBytes int) (string, error) { + shown, compact := len(operations), false + for { + markdown, err := renderOnce(set, report, operations, shown, compact) + if err != nil { + return "", err + } + if len(markdown) <= maxBytes { + return markdown, nil + } + switch { + case !compact: + compact = true + case shown > 0: + shown /= 2 + default: + return truncateMarkdown(markdown, maxBytes), nil + } + } +} + +// renderOnce renders the frame with the first shown sections, optionally with compacted details. +func renderOnce(set *templateSet, report *Report, operations []*Operation, shown int, compact bool) (string, error) { + view := *report + view.Sections = make([]string, 0, shown) + for _, operation := range operations[:shown] { + current := operation + if compact { + current = compacted(operation) + } + section, err := renderSection(set, current) + if err != nil { + return "", err + } + view.Sections = append(view.Sections, section) + } + view.Omitted = len(operations) - shown + var removed []string + if compact { + removed = compactedDetails(operations[:shown]) + } + view.Notice = degradationNotice(view.Omitted, len(operations), removed) + + frame, err := set.loader.RenderStrict(set.frame, &view) + if err != nil { + return "", renderError(err) + } + return atmosio.MaskString(frame), nil +} + +// renderSection renders one operation's section with the template of its action. +func renderSection(set *templateSet, operation *Operation) (string, error) { + content, err := set.section(operation.Action) + if err != nil { + return "", err + } + rendered, err := set.loader.RenderStrict(content, operation) + if err != nil { + return "", renderError(err) + } + return strings.TrimRight(rendered, lineBreak), nil +} + +// compacted returns a copy of an operation without the bulky details. The counts that remain say +// what was left out. +func compacted(operation *Operation) *Operation { + copied := *operation + copied.Inventory = nil + copied.Labels = nil + copied.Description = "" + if copied.Collection != nil { + collection := *copied.Collection + collection.Artifacts = nil + collection.More = 0 + copied.Collection = &collection + } + if len(copied.Diagnostics) > compactDiagnostics { + copied.DiagnosticsMore += len(copied.Diagnostics) - compactDiagnostics + copied.Diagnostics = copied.Diagnostics[:compactDiagnostics] + } + return &copied +} + +// degradationNotice words what a size-reduced report left out. It is empty for a complete report. +// The removed list names the details compaction actually dropped, so the notice never claims a +// removal that did not happen. +func degradationNotice(omitted, total int, removed []string) string { + var notices []string + if omitted > 0 { + notices = append(notices, fmt.Sprintf("%d of %d operation sections were left out to keep this summary within the size limit. The table above lists every operation.", omitted, total)) + } + if len(removed) > 0 { + notices = append(notices, "Details were left out to keep this summary within the size limit: "+strings.Join(removed, ", ")+".") + } + return strings.Join(notices, " ") +} + +// compactedDetails names the details that compacted() removes from the given operations, in a +// stable order. It is empty when compaction changes nothing, for example when a long summary alone +// made the report too large. +func compactedDetails(operations []*Operation) []string { + var found compactionFlags + for _, operation := range operations { + found.merge(flagsOf(operation)) + } + var removed []string + for _, detail := range []struct { + dropped bool + name string + }{ + {found.inventory, "inventory"}, + {found.metadata, "metadata"}, + {found.references, "artifact references"}, + {found.diagnostics, "long diagnostic lists"}, + } { + if detail.dropped { + removed = append(removed, detail.name) + } + } + return removed +} + +// compactionFlags records which kinds of detail compaction would drop. +type compactionFlags struct { + inventory, metadata, references, diagnostics bool +} + +// merge adds the flags of another operation. +func (f *compactionFlags) merge(other compactionFlags) { + f.inventory = f.inventory || other.inventory + f.metadata = f.metadata || other.metadata + f.references = f.references || other.references + f.diagnostics = f.diagnostics || other.diagnostics +} + +// flagsOf reports which details of one operation compaction would drop. +func flagsOf(operation *Operation) compactionFlags { + collection := operation.Collection + return compactionFlags{ + inventory: operation.Inventory != nil, + metadata: len(operation.Labels) > 0 || operation.Description != "", + references: collection != nil && (len(collection.Artifacts) > 0 || collection.More > 0), + diagnostics: len(operation.Diagnostics) > compactDiagnostics, + } +} + +// truncateMarkdown cuts the text at a rune boundary below maxBytes, closes the code fence and +// collapsible sections the cut left open, and appends a visible note. +// +// A limit smaller than the note leaves no room for report text, so the result is the start of the +// note cut to the limit: the output never exceeds a positive limit. +func truncateMarkdown(markdown string, maxBytes int) string { + if maxBytes < len(truncationNote) { + return cutAtRune(strings.TrimLeft(truncationNote, lineBreak), maxBytes) + } + reserved := len(truncationNote) + len(codeFence) + 1 + closeAllowance*(len(detailsClose)+1) + budget := max(maxBytes-reserved, 0) + markdown = cutAtRune(markdown, budget) + if strings.Count(markdown, codeFence)%2 == 1 { + markdown += lineBreak + codeFence + } + unclosed := strings.Count(markdown, detailsOpen) - strings.Count(markdown, detailsClose) + for index := 0; index < unclosed && index < closeAllowance; index++ { + markdown += lineBreak + detailsClose + } + return markdown + truncationNote +} + +// cutAtRune returns the longest prefix of text that ends at a rune boundary and is at most limit bytes. +func cutAtRune(text string, limit int) string { + if limit >= len(text) { + return text + } + cut := limit + for cut > 0 && !utf8.RuneStart(text[cut]) { + cut-- + } + return text[:cut] +} + +// renderError wraps a template loading or rendering failure with the report render sentinel. +func renderError(err error) error { + return fmt.Errorf("%w: %w", errUtils.ErrArtifactReportRender, err) +} diff --git a/pkg/artifact/report/render_test.go b/pkg/artifact/report/render_test.go new file mode 100644 index 00000000000..eaa9f673b72 --- /dev/null +++ b/pkg/artifact/report/render_test.go @@ -0,0 +1,110 @@ +package report_test + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" +) + +// TestRenderGoldens renders one summary per outcome and compares it with the golden file. +func TestRenderGoldens(t *testing.T) { + copied := result(&artifact.OperationResult{ + OperationID: "c", Action: artifact.ActionCopy, Outcome: artifact.OutcomeCreated, Repository: "mirror", + Requested: "components/vpc:1.2.0", Ref: "components/vpc:1.2.0", Location: "s3://backups/components/vpc/1.2.0", + ResolvedDigest: digestOf("a"), Size: 1 << 20, Duration: 2500 * time.Millisecond, LockScope: artifact.LockScopeRepository, + }) + pulled := result(&artifact.OperationResult{ + OperationID: "p", Action: artifact.ActionPull, Outcome: artifact.OutcomeRead, Repository: "shared", + Requested: "components/vpc:latest", Ref: "components/vpc:1.2.0", Location: "/work/components/vpc", + ContentDigest: digestOf("c"), RepresentationDigest: digestOf("d"), Size: 49152, + Aliases: []string{"components/vpc:latest"}, + }) + deleted := result(&artifact.OperationResult{ + OperationID: "d", Action: artifact.ActionDelete, Outcome: artifact.OutcomeDeleted, Repository: "shared", + Requested: "components/vpc:0.9.0", Ref: "components/vpc:0.9.0", LockScope: artifact.LockScopeHost, + }) + unchanged := published("u", "components/vpc:1.2.0") + unchanged.Result.Outcome = artifact.OutcomeUnchanged + replaced := published("r", "components/vpc:1.2.0") + replaced.Result.Outcome = artifact.OutcomeReplaced + dryRun := published("y", "components/vpc:1.2.0") + dryRun.Result.Outcome = artifact.OutcomeDryRun + dryRun.Result.LockScope = "" + listed := &invoke.Outcome{Collection: &invoke.Collection{ + Artifacts: []invoke.Listed{{Ref: "components/vpc:1.2.0"}, {Ref: "components/vpc:1.1.0"}}, + Repositories: []artifact.RepositoryListing{ + {Repository: "shared", Count: 2, Source: "live"}, + {Repository: "mirror", Count: 0, Source: "cache"}, + }, + Incomplete: true, + }} + failedPublish := result(&artifact.OperationResult{OperationID: "f", Action: artifact.ActionPublish, Outcome: artifact.OutcomeFailed, Repository: "shared", Requested: "components/vpc:1.2.0"}) + + cases := map[string][]*report.Entry{ + "published": {entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil)}, + "unchanged": {entry("publish", "u", 1, unchanged, nil)}, + "replaced": {entry("publish", "r", 1, replaced, nil)}, + "dry-run": {entry("publish", "y", 1, dryRun, nil)}, + "downloaded": {entry("pull", "p", 1, pulled, nil)}, + "copied": {entry("copy", "c", 1, copied, nil)}, + "deleted": {entry("delete", "d", 1, deleted, nil)}, + "signed": {entry("sign", "s", 1, signed("s"), nil)}, + "verified": {entry("verify", "v", 1, verified("v", artifact.VerificationVerified), nil)}, + "unchecked": {entry("verify", "v", 1, verified("v", artifact.VerificationUnchecked), nil)}, + "failed": {entry("publish", "f", 3, failedPublish, fmt.Errorf("%w: conflict on components/vpc:1.2.0", errUtils.ErrArtifactConflict))}, + "canceled": {entry("publish", "f", 1, failedPublish, fmt.Errorf("publish: %w", context.Canceled))}, + "timed-out": {entry("publish", "f", 1, failedPublish, fmt.Errorf("publish: %w", context.DeadlineExceeded))}, + "listed": {{Step: "list", Action: artifact.ActionList, Attempt: 1, Outcome: listed}}, + "verify-fail": {entry("verify", "v", 1, verified("v", artifact.VerificationFailed), fmt.Errorf("%w: wrong issuer", errUtils.ErrArtifactVerificationFailed))}, + "mixed": { + entry("publish", "a", 1, published("a", "components/vpc:1.2.0"), nil, 0), + entry("sign", "s", 1, signed("s"), nil, 2), + entry("verify", "v", 1, verified("v", artifact.VerificationVerified), nil, 4), + entry("copy", "c", 1, copied, nil, 6), + entry("publish", "f", 1, failedPublish, errors.New("registry unavailable"), 8), + }, + } + for name, entries := range cases { + t.Run(name, func(t *testing.T) { + golden(t, name, flushOne(t, enabledConfig(), entries...)) + }) + } +} + +// TestRenderStatusWording asserts the outcome wording and kind without depending on the goldens. +func TestRenderStatusWording(t *testing.T) { + cases := []struct { + name string + entries []*report.Entry + want []string + }{ + {"published", []*report.Entry{entry("s", "a", 1, published("a", "x/y:1"), nil)}, []string{"✅ Published", "1 succeeded"}}, + {"unchanged counts once", []*report.Entry{entry("s", "a", 1, result(&artifact.OperationResult{Action: artifact.ActionPublish, Outcome: artifact.OutcomeUnchanged}), nil)}, []string{"➖ Unchanged", "1 unchanged"}}, + {"canceled sibling", []*report.Entry{entry("s", "a", 1, result(&artifact.OperationResult{Action: artifact.ActionPull}), context.Canceled)}, []string{"🚫 Canceled", "1 canceled"}}, + {"failed", []*report.Entry{entry("s", "a", 1, result(&artifact.OperationResult{Action: artifact.ActionCopy}), errors.New("nope"))}, []string{"❌ Failed", "1 failed"}}, + {"unchecked is not verified", []*report.Entry{entry("s", "a", 1, verified("a", artifact.VerificationUnchecked), nil)}, []string{"⚠️ Unchecked", "nothing is claimed"}}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + markdown := flushOne(t, enabledConfig(), tc.entries...) + for _, want := range tc.want { + assert.Contains(t, markdown, want) + } + }) + } + // Unchecked and signed must never read as verified. + markdown := flushOne(t, enabledConfig(), entry("s", "a", 1, verified("a", artifact.VerificationUnchecked), nil)) + assert.NotContains(t, markdown, "publisher is authenticated") + markdown = flushOne(t, enabledConfig(), entry("s", "a", 1, signed("a"), nil)) + assert.Contains(t, markdown, "Signing alone does not authenticate the signer") + assert.NotContains(t, markdown, "publisher is authenticated") +} diff --git a/pkg/artifact/report/safety_test.go b/pkg/artifact/report/safety_test.go new file mode 100644 index 00000000000..d9ed0def13e --- /dev/null +++ b/pkg/artifact/report/safety_test.go @@ -0,0 +1,314 @@ +package report_test + +import ( + "context" + "errors" + "fmt" + "regexp" + "strings" + "testing" + "unicode/utf8" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" + atmosio "github.com/cloudposse/atmos/pkg/io" +) + +// hostile is a name that tries to break out of every Markdown context. +const hostile = "evil|name`tick``double*bold*_it_[l](http://x)\nnext line # head\r\n- item" + +func TestMarkdownEscaping(t *testing.T) { + outcome := published("a", "x/y:1") + outcome.Result.Repository = hostile + outcome.Result.Location = "/tmp/" + hostile + outcome.Result.Requested = hostile + outcome.Result.Diagnostics = []artifact.Diagnostic{{Severity: artifact.SeverityWarning, Code: "code|`", Message: hostile}} + outcome.Result.Record.Metadata.Description = hostile + outcome.Result.Record.Metadata.Labels = map[string]string{hostile: hostile} + outcome.Result.Record.Inventory = []artifact.Entry{{Path: hostile, Type: artifact.EntryFile, Size: 1}} + markdown := flushOne(t, enabledConfig(), entry(hostile, "a", 1, outcome, errors.New(hostile))) + + // Raw HTML survives only inside code spans and fenced blocks, where Markdown renders it as text. + visible := regexp.MustCompile("(?s)```.*?```").ReplaceAllString(markdown, "") + assert.NotContains(t, visible, "") + rows := 0 + for _, line := range strings.Split(markdown, "\n") { + if strings.HasPrefix(line, "| 1 |") { + rows++ + // Every unescaped pipe is a column separator: the overview row has exactly nine columns. + unescaped := strings.Count(strings.ReplaceAll(line, `\|`, ""), "|") + assert.Equal(t, 10, unescaped, "a table row must not be split by user text: %s", line) + } + } + require.Equal(t, 1, rows) + assert.NotContains(t, markdown, "\r") + // A newline in user text never starts a new Markdown block outside the fenced error block. + outside := regexp.MustCompile("(?s)```text\n.*?\n```").ReplaceAllString(markdown, "") + assert.NotContains(t, outside, "\n- item") + assert.NotContains(t, outside, "\nnext line # head") + assert.Contains(t, markdown, "<script>", "the step name is escaped as text") +} + +func TestCodeSpanCannotBeClosedByTheValue(t *testing.T) { + outcome := published("a", "x/y:1") + outcome.Result.Location = "/tmp/a``b`c" + markdown := flushOne(t, enabledConfig(), entry("", "a", 1, outcome, nil)) + // The value contains runs of one and two backticks, so the span uses three. + assert.Contains(t, markdown, "```/tmp/a``b`c```") +} + +func TestFencedErrorCannotBeClosedByTheMessage(t *testing.T) { + markdown := flushOne(t, enabledConfig(), entry("", "a", 1, published("a", "x/y:1"), errors.New("bad\n```\n# injected heading"))) + assert.Contains(t, markdown, "````text\nbad\n```\n# injected heading\n````") +} + +func TestSecretsAreMasked(t *testing.T) { + const secret = "mask-me-report-value" + atmosio.RegisterSecret(secret) + outcome := published("a", "x/y:1") + outcome.Result.Diagnostics = []artifact.Diagnostic{{Severity: artifact.SeverityInfo, Message: "token " + secret}} + outcome.Result.Record.Metadata.Labels = map[string]string{"owner": secret} + markdown := flushOne(t, enabledConfig(), entry("deploy-"+secret, "a", 1, outcome, fmt.Errorf("auth failed with %s", secret))) + assert.NotContains(t, markdown, secret) + assert.Contains(t, markdown, "auth failed with") +} + +func TestSignedUrlsAndCredentialsAreRemoved(t *testing.T) { + outcome := published("a", "x/y:1") + outcome.Result.Location = "https://user:pass@bucket.s3.amazonaws.com/key?X-Amz-Signature=deadbeef&X-Amz-Credential=AKIA#frag" + outcome.Result.Diagnostics = []artifact.Diagnostic{{Message: "retry https://host/path?token=abc123 later"}} + markdown := flushOne(t, enabledConfig(), entry("", "a", 1, outcome, errors.New("GET https://signed.example/obj?X-Amz-Signature=cafe failed"))) + for _, leaked := range []string{"X-Amz-Signature", "deadbeef", "AKIA", "user:pass", "token=abc123", "cafe", "#frag"} { + assert.NotContains(t, markdown, leaked) + } + assert.Contains(t, markdown, "https://bucket.s3.amazonaws.com/key") + // A bare URL in running text is not left clickable. + assert.NotContains(t, markdown, "retry https://") +} + +func TestTruncationIsVisibleAndKeepsTheOverview(t *testing.T) { + var entries []*report.Entry + for index := 0; index < 60; index++ { + outcome := published(fmt.Sprintf("op-%d", index), fmt.Sprintf("x/pkg-%02d:1", index)) + entries = append(entries, entry("publish", fmt.Sprintf("op-%d", index), 1, outcome, nil, index)) + } + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(12_000)) + for _, item := range entries { + session.Record(item) + } + require.NoError(t, session.Flush()) + require.Len(t, fake.summaries, 1) + markdown := fake.summaries[0] + + assert.LessOrEqual(t, len(markdown), 12_000) + assert.Contains(t, markdown, "left out to keep this summary within the size limit", "truncation is visible") + assert.Contains(t, markdown, "60 operations: 60 succeeded.") + for index := 0; index < 60; index++ { + assert.Contains(t, markdown, fmt.Sprintf("`x/pkg-%02d:1`", index), "the overview lists every operation") + } + assert.True(t, utf8.ValidString(markdown)) +} + +func TestHardTruncationClosesOpenBlocks(t *testing.T) { + outcome := published("a", "x/y:1") + outcome.Result.Diagnostics = []artifact.Diagnostic{{Severity: artifact.SeverityInfo, Message: strings.Repeat("é", 400)}} + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(450)) + session.Record(entry("publish", "a", 1, outcome, errors.New(strings.Repeat("long failure ", 400)))) + require.NoError(t, session.Flush()) + markdown := fake.summaries[0] + assert.LessOrEqual(t, len(markdown), 450) + assert.True(t, utf8.ValidString(markdown)) + assert.Contains(t, markdown, "cut to fit the size limit") + assert.Zero(t, strings.Count(markdown, "```")%2, "code fences stay balanced") + assert.Equal(t, strings.Count(markdown, "
"), strings.Count(markdown, "
")) +} + +func TestCompactionDropsDetailsBeforeSections(t *testing.T) { + outcome := published("a", "x/y:1") + files := make([]artifact.Entry, 500) + for index := range files { + files[index] = artifact.Entry{Path: fmt.Sprintf("dir/file-%03d.tf", index), Type: artifact.EntryFile, Size: 10} + } + outcome.Result.Record.Inventory = files + full := flushOne(t, enabledConfig(), entry("publish", "a", 1, outcome, nil)) + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(len(full)-200)) + session.Record(entry("publish", "a", 1, outcome, nil)) + require.NoError(t, session.Flush()) + compact := fake.summaries[0] + assert.Contains(t, compact, "Details were left out to keep this summary within the size limit: inventory, metadata.") + assert.NotContains(t, compact, "dir/file-000.tf") + assert.Contains(t, compact, "### ✅ 1. Publish `x/y:1`", "the section itself stays") +} + +func TestListAndSearchCollectionsRender(t *testing.T) { + collection := &invoke.Outcome{Collection: &invoke.Collection{Artifacts: []invoke.Listed{{Ref: "a/b:1"}}}} + markdown := flushOne(t, enabledConfig(), &report.Entry{Action: artifact.ActionSearch, Attempt: 1, Outcome: collection}) + assert.Contains(t, markdown, "Searched 1 artifact.") +} + +func TestEntriesWithoutResultsStillRender(t *testing.T) { + markdown := flushOne(t, enabledConfig(), &report.Entry{Action: artifact.ActionPull, Attempt: 1, Err: errors.New("boom")}) + assert.Contains(t, markdown, "❌ Failed") + assert.Contains(t, markdown, "boom") +} + +func TestFailedListingStatesTheFailureNotACollectionResult(t *testing.T) { + partial := &invoke.Outcome{Collection: &invoke.Collection{ + Artifacts: []invoke.Listed{{Ref: "a/b:1"}}, + Incomplete: true, + }} + tests := []struct { + name string + err error + want string + notWant string + }{ + {"failed listing", errors.New("registry unavailable"), "The list operation failed.", "Failed 1 artifact"}, + {"canceled listing", fmt.Errorf("list: %w", context.Canceled), "The list operation was canceled.", "Canceled 1 artifact"}, + {"complete listing keeps the collection wording", nil, "Listed 1 artifact; the listing is incomplete", "The list operation"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + markdown := flushOne(t, enabledConfig(), &report.Entry{Action: artifact.ActionList, Attempt: 1, Outcome: partial, Err: tt.err}) + assert.Contains(t, markdown, tt.want) + assert.NotContains(t, markdown, tt.notWant) + }) + } +} + +func TestUnparsableUrlsAreReplacedNotPartiallyCleaned(t *testing.T) { + // The standard library quotes the raw URL, userinfo included, in its parse error. + markdown := flushOne(t, enabledConfig(), entry("", "a", 1, published("a", "x/y:1"), + errors.New(`parse "https://hunter:password-two@%zz/path?token=abc": invalid URL escape "%zz"`))) + for _, leaked := range []string{"hunter", "password-two", "token=abc"} { + assert.NotContains(t, markdown, leaked) + } + assert.Contains(t, markdown, "redacted-url") +} + +func TestLimitsSmallerThanTheTruncationNoteStayWithinTheLimit(t *testing.T) { + for _, limit := range []int{1, 7, 50, 99} { + t.Run(fmt.Sprintf("limit %d", limit), func(t *testing.T) { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(limit)) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + require.NoError(t, session.Flush()) + require.Len(t, fake.summaries, 1) + assert.LessOrEqual(t, len(fake.summaries[0]), limit) + assert.True(t, utf8.ValidString(fake.summaries[0])) + }) + } +} + +func TestCompactNoticeNamesTheOmittedArtifactReferences(t *testing.T) { + listing := func(count int) *invoke.Outcome { + artifacts := make([]invoke.Listed, count) + for index := range artifacts { + artifacts[index] = invoke.Listed{Ref: fmt.Sprintf("team/app-%03d:1.0.0", index)} + } + return &invoke.Outcome{Collection: &invoke.Collection{Artifacts: artifacts}} + } + render := func(withArtifacts int, trim int) string { + build := func(options ...report.Option) string { + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, options...) + session.Record(&report.Entry{Step: "list", Action: artifact.ActionList, Attempt: 1, Outcome: listing(withArtifacts)}) + require.NoError(t, session.Flush()) + return fake.summaries[0] + } + full := build() + return build(report.WithMaxBytes(len(full) - trim)) + } + + t.Run("a compacted collection names its references", func(t *testing.T) { + compact := render(40, 200) + assert.Contains(t, compact, "Details were left out to keep this summary within the size limit: artifact references.") + assert.NotContains(t, compact, "team/app-000:1.0.0") + }) + t.Run("a collection without references does not claim them", func(t *testing.T) { + compact := renderNoRefs(t) + assert.Contains(t, compact, "limit: inventory, metadata.") + assert.NotContains(t, compact, "artifact references") + }) +} + +func TestCompactNoticeNamesOnlyWhatCompactionRemoved(t *testing.T) { + manyDiagnostics := func() *invoke.Outcome { + outcome := published("a", "x/y:1") + outcome.Result.Record = nil + for index := 0; index < 8; index++ { + outcome.Result.Diagnostics = append(outcome.Result.Diagnostics, + artifact.Diagnostic{Severity: artifact.SeverityInfo, Message: fmt.Sprintf("note %d %s", index, strings.Repeat("x", 80))}) + } + return outcome + } + bare := func() *invoke.Outcome { + outcome := published("a", "x/y:1") + outcome.Result.Record = nil + return outcome + } + tests := []struct { + name string + outcome *invoke.Outcome + err error + trim int + contains string + excludes []string + }{ + { + name: "long diagnostics are the only removed detail", + outcome: manyDiagnostics(), + trim: 200, + contains: "limit: long diagnostic lists.", + }, + { + name: "a long summary that compaction cannot shrink claims no removed details", + outcome: bare(), + err: errors.New(strings.Repeat("long failure ", 200)), + trim: 100, + excludes: []string{"Details were left out"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + full := flushOne(t, enabledConfig(), entry("publish", "a", 1, tt.outcome, tt.err)) + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(len(full)-tt.trim)) + session.Record(entry("publish", "a", 1, tt.outcome, tt.err)) + require.NoError(t, session.Flush()) + require.Len(t, fake.summaries, 1) + markdown := fake.summaries[0] + if tt.contains != "" { + assert.Contains(t, markdown, tt.contains) + } + for _, excluded := range tt.excludes { + assert.NotContains(t, markdown, excluded) + } + }) + } +} + +// renderNoRefs compacts a report whose only collection lists no artifacts. +func renderNoRefs(t *testing.T) string { + t.Helper() + outcome := published("a", "x/y:1") + files := make([]artifact.Entry, 500) + for index := range files { + files[index] = artifact.Entry{Path: fmt.Sprintf("dir/file-%03d.tf", index), Type: artifact.EntryFile, Size: 10} + } + outcome.Result.Record.Inventory = files + full := flushOne(t, enabledConfig(), entry("publish", "a", 1, outcome, nil)) + fake := &fakeReporter{} + session := newSession(enabledConfig(), fake, report.WithMaxBytes(len(full)-200)) + session.Record(entry("publish", "a", 1, outcome, nil)) + require.NoError(t, session.Flush()) + return fake.summaries[0] +} diff --git a/pkg/artifact/report/session.go b/pkg/artifact/report/session.go new file mode 100644 index 00000000000..fd8c0c03cfe --- /dev/null +++ b/pkg/artifact/report/session.go @@ -0,0 +1,188 @@ +package report + +import ( + "errors" + "fmt" + "sync" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/ci" + log "github.com/cloudposse/atmos/pkg/logger" + "github.com/cloudposse/atmos/pkg/perf" + "github.com/cloudposse/atmos/pkg/schema" +) + +// pending is one buffered entry with its arrival number. +type pending struct { + entry *Entry + arrival int +} + +// Session is the collector that renders. It buffers the entries recorded during one execution +// (a CLI command, a workflow, a custom command, or a hook), keeps the final attempt of each +// logical operation, and on [Session.Flush] writes one deterministically ordered report through +// the CI reporter. It is safe for concurrent use. +// +// A session whose reporting surfaces are all disabled ignores every entry, so the gates cost +// nothing. It never calls a service or repository. +type Session struct { + config *schema.AtmosConfiguration + newReporter func(*schema.AtmosConfiguration) ci.Reporter + maxBytes int + + summaryEnabled bool + outputEnabled bool + + mu sync.Mutex + entries map[string]*pending + arrival int +} + +// Option configures a [Session]. +type Option func(*Session) + +// WithReporter replaces the factory that builds the CI reporter. The default is ci.NewReporter, +// which owns provider detection and the ci.* gating. Tests inject a fake reporter. +func WithReporter(factory func(*schema.AtmosConfiguration) ci.Reporter) Option { + defer perf.Track(nil, "report.WithReporter")() + + return func(s *Session) { + if factory != nil { + s.newReporter = factory + } + } +} + +// WithMaxBytes sets the largest summary the session writes. Zero or a negative value keeps +// [DefaultMaxBytes]. A limit too small to hold even the truncation notice produces the start of the +// notice cut to the limit, so the summary never exceeds a positive limit. +func WithMaxBytes(limit int) Option { + defer perf.Track(nil, "report.WithMaxBytes")() + + return func(s *Session) { + if limit > 0 { + s.maxBytes = limit + } + } +} + +// NewSession returns a session that reports according to the ci.* gates of config. A nil config +// disables every surface. +func NewSession(config *schema.AtmosConfiguration, options ...Option) *Session { + defer perf.Track(config, "report.NewSession")() + + session := &Session{ + config: config, + newReporter: ci.NewReporter, + maxBytes: DefaultMaxBytes, + summaryEnabled: ci.SummaryEnabled(config), + outputEnabled: ci.OutputEnabled(config), + entries: make(map[string]*pending), + } + for _, option := range options { + option(session) + } + return session +} + +// Enabled reports whether the session reports anything. A disabled session ignores every entry. +func (s *Session) Enabled() bool { + defer perf.Track(s.config, "report.Session.Enabled")() + + return s.summaryEnabled || s.outputEnabled +} + +// Record implements [Collector]. Attempts of one logical operation share an OperationID; the +// attempt with the highest number replaces the earlier ones, and a later arrival wins a tie. An +// entry without an operation ID is its own operation. +func (s *Session) Record(entry *Entry) { + defer perf.Track(s.config, "report.Session.Record")() + + if entry == nil || !s.Enabled() { + return + } + copied := *entry + s.mu.Lock() + defer s.mu.Unlock() + + s.arrival++ + key := entry.OperationID + if key == "" { + key = fmt.Sprintf("anonymous-%d", s.arrival) + } + existing, found := s.entries[key] + switch { + case !found: + s.entries[key] = &pending{entry: &copied, arrival: s.arrival} + case copied.Attempt >= existing.entry.Attempt: + // The first sighting fixes the arrival number, so a retry never moves the operation. + if copied.Position == nil { + copied.Position = existing.entry.Position + } + existing.entry = &copied + } +} + +// drain returns the buffered entries and empties the buffer, so a second flush never repeats them. +func (s *Session) drain() []*pending { + s.mu.Lock() + defer s.mu.Unlock() + + drained := make([]*pending, 0, len(s.entries)) + for _, item := range s.entries { + drained = append(drained, item) + } + s.entries = make(map[string]*pending) + return drained +} + +// Flush writes the report for everything recorded since the last flush: one summary through the CI +// reporter and, when output variables are enabled, one set of output variables. It returns the +// reporting error, if any; the caller logs it and never lets it change the artifact exit status. +// Flush is meant for a deferred call at the end of an execution, so it runs on failure paths too. +func (s *Session) Flush() error { + defer perf.Track(s.config, "report.Session.Flush")() + + drained := s.drain() + if len(drained) == 0 { + return nil + } + entries := orderEntries(drained) + reporter := s.newReporter(s.config) + + var errs []error + if s.summaryEnabled { + errs = append(errs, s.writeSummary(reporter, entries)) + } + if s.outputEnabled { + errs = append(errs, writeOutputs(reporter, entries)) + } + return errors.Join(errs...) +} + +// FlushAndLog flushes the session and logs a reporting failure at Warn level. Reporting is +// best-effort: the failure never reaches the caller, so it cannot change an exit status. +func (s *Session) FlushAndLog() { + defer perf.Track(s.config, "report.Session.FlushAndLog")() + + if err := s.Flush(); err != nil { + log.Warn("Artifact report was not written", "error", err) + } +} + +// writeSummary renders the report and appends it to the job summary. +func (s *Session) writeSummary(reporter ci.Reporter, entries []*Entry) error { + set, err := newTemplateSet(s.config) + if err != nil { + return err + } + report, operations := assemble(entries) + markdown, err := renderAll(set, report, operations, s.maxBytes) + if err != nil { + return err + } + if _, err := reporter.Summary(markdown); err != nil { + return fmt.Errorf("%w: %w", errUtils.ErrArtifactReportWrite, err) + } + return nil +} diff --git a/pkg/artifact/report/session_test.go b/pkg/artifact/report/session_test.go new file mode 100644 index 00000000000..a33e47eb540 --- /dev/null +++ b/pkg/artifact/report/session_test.go @@ -0,0 +1,197 @@ +package report_test + +import ( + "errors" + "fmt" + "regexp" + "sync" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/report" + "github.com/cloudposse/atmos/pkg/schema" +) + +func TestSessionKeepsTheFinalAttemptOfEachOperation(t *testing.T) { + failed := published("op-1", "components/vpc:1.2.0") + failed.Result.Outcome = artifact.OutcomeFailed + markdown := flushOne( + t, enabledConfig(), + entry("publish", "op-1", 1, failed, errors.New("transient")), + entry("publish", "op-1", 2, failed, errors.New("transient")), + entry("publish", "op-1", 3, published("op-1", "components/vpc:1.2.0"), nil), + ) + assert.Contains(t, markdown, "1 operation: 1 succeeded.") + assert.Contains(t, markdown, "✅ Published") + assert.NotContains(t, markdown, "transient") + assert.Contains(t, markdown, "**Attempts:** 3") +} + +func TestSessionKeepsTheFinalFailedAttempt(t *testing.T) { + markdown := flushOne( + t, enabledConfig(), + entry("publish", "op-1", 2, published("op-1", "components/vpc:1.2.0"), errors.New("second failure")), + // A late arrival of an earlier attempt must not replace the final one. + entry("publish", "op-1", 1, published("op-1", "components/vpc:1.2.0"), errors.New("first failure")), + ) + assert.Contains(t, markdown, "second failure") + assert.NotContains(t, markdown, "first failure") + assert.Contains(t, markdown, "1 operation: 1 failed.") +} + +func TestSessionOrdersByScheduledPositionNotCompletionOrder(t *testing.T) { + // The branches finish in the reverse of their scheduled order; the report follows the schedule. + markdown := flushOne( + t, enabledConfig(), + entry("third", "c", 1, published("c", "x/third:1"), nil, 2, 3, 0), + entry("second", "b", 1, published("b", "x/second:1"), nil, 2, 1, 1), + entry("first", "a", 1, published("a", "x/first:1"), nil, 2, 1, 0), + entry("before", "z", 1, published("z", "x/before:1"), nil, 0), + entry("unpositioned", "u", 1, published("u", "x/unpositioned:1"), nil), + ) + assert.Equal(t, []string{"x/before:1", "x/first:1", "x/second:1", "x/third:1", "x/unpositioned:1"}, sectionRefs(markdown)) +} + +// sectionHeading matches a per-operation section heading and captures its reference. +var sectionHeading = regexp.MustCompile("(?m)^### \\S+ \\d+\\. \\w+ `([^`]+)`$") + +// sectionRefs returns the references of the operation sections in document order. +func sectionRefs(markdown string) []string { + var refs []string + for _, match := range sectionHeading.FindAllStringSubmatch(markdown, -1) { + refs = append(refs, match[1]) + } + return refs +} + +func TestSessionOrdersUnpositionedEntriesByArrival(t *testing.T) { + markdown := flushOne( + t, enabledConfig(), + entry("one", "one", 1, published("one", "x/one:1"), nil), + entry("two", "two", 1, published("two", "x/two:1"), nil), + entry("three", "three", 1, published("three", "x/three:1"), nil), + ) + assert.Equal(t, []string{"x/one:1", "x/two:1", "x/three:1"}, sectionRefs(markdown)) +} + +func TestSessionIsDeterministicUnderConcurrentRecording(t *testing.T) { + render := func() string { + fake := &fakeReporter{} + session := report.NewSession(enabledConfig(), report.WithReporter(fake.factory(nil))) + var wg sync.WaitGroup + for index := 0; index < 16; index++ { + wg.Add(1) + go func() { + defer wg.Done() + id := fmt.Sprintf("op-%02d", index) + session.Record(entry("branch", id, 1, published(id, fmt.Sprintf("x/%02d:1", index)), nil, 1, index)) + }() + } + wg.Wait() + require.NoError(t, session.Flush()) + return fake.summaries[0] + } + want := render() + for run := 0; run < 5; run++ { + require.Equal(t, want, render()) + } +} + +func TestSessionFlushWritesOnceAndEmpties(t *testing.T) { + fake := &fakeReporter{} + session := report.NewSession(enabledConfig(), report.WithReporter(fake.factory(nil))) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + require.NoError(t, session.Flush()) + require.NoError(t, session.Flush()) + assert.Len(t, fake.summaries, 1, "a second flush must not repeat the report") +} + +func TestSessionWithNothingRecordedBuildsNoReporter(t *testing.T) { + builds := 0 + fake := &fakeReporter{} + session := report.NewSession(enabledConfig(), report.WithReporter(fake.factory(&builds))) + require.NoError(t, session.Flush()) + assert.Zero(t, builds) + assert.Empty(t, fake.summaries) + assert.Empty(t, fake.outputs) +} + +func TestSessionGates(t *testing.T) { + cases := []struct { + name string + config *schema.AtmosConfiguration + wantSummary bool + wantOutputs bool + wantReporters int + }{ + {"nil config", nil, false, false, 0}, + {"ci disabled", &schema.AtmosConfiguration{}, false, false, 0}, + {"summary disabled", &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Summary: schema.CISummaryConfig{Enabled: ptr(false)}}}, false, true, 1}, + {"output disabled", &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Output: schema.CIOutputConfig{Enabled: ptr(false)}}}, true, false, 1}, + {"both disabled", &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true, Summary: schema.CISummaryConfig{Enabled: ptr(false)}, Output: schema.CIOutputConfig{Enabled: ptr(false)}}}, false, false, 0}, + {"enabled", enabledConfig(), true, true, 1}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + builds := 0 + fake := &fakeReporter{} + session := report.NewSession(tc.config, report.WithReporter(fake.factory(&builds))) + assert.Equal(t, tc.wantSummary || tc.wantOutputs, session.Enabled()) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + require.NoError(t, session.Flush()) + assert.Equal(t, tc.wantSummary, len(fake.summaries) == 1) + assert.Equal(t, tc.wantOutputs, len(fake.outputs) > 0) + assert.Equal(t, tc.wantReporters, builds) + }) + } +} + +func TestSessionIgnoresNilEntries(t *testing.T) { + fake := &fakeReporter{} + session := report.NewSession(enabledConfig(), report.WithReporter(fake.factory(nil))) + session.Record(nil) + require.NoError(t, session.Flush()) + assert.Empty(t, fake.summaries) +} + +func TestSessionProviderFailureIsReportedNotRaised(t *testing.T) { + fake := &fakeReporter{summaryErr: errUtils.ErrCISummaryWriteFailed, outputErr: errUtils.ErrCIOutputWriteFailed} + session := report.NewSession(enabledConfig(), report.WithReporter(fake.factory(nil))) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + err := session.Flush() + require.Error(t, err) + assert.ErrorIs(t, err, errUtils.ErrArtifactReportWrite) + assert.ErrorIs(t, err, errUtils.ErrCISummaryWriteFailed) + assert.ErrorIs(t, err, errUtils.ErrCIOutputWriteFailed) + // The outputs are still attempted when the summary fails. + assert.NotEmpty(t, fake.outputs) + // The logging flush never panics or returns. + session.Record(entry("publish", "b", 1, published("b", "x/y:2"), nil)) + assert.NotPanics(t, session.FlushAndLog) +} + +func TestSessionTemplateFailureStillWritesOutputs(t *testing.T) { + config := enabledConfig() + config.CI.Templates = schema.CITemplatesConfig{BasePath: t.TempDir(), Artifacts: map[string]string{"summary": "missing.md"}} + fake := &fakeReporter{} + session := report.NewSession(config, report.WithReporter(fake.factory(nil))) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + err := session.Flush() + require.Error(t, err) + assert.ErrorIs(t, err, errUtils.ErrArtifactReportRender) + assert.ErrorIs(t, err, errUtils.ErrCITemplateNotFound) + assert.Empty(t, fake.summaries, "no summary is written, and no other template is chosen silently") + assert.NotEmpty(t, fake.outputs, "machine outputs do not depend on the summary template") +} + +func TestEntryForUsesTheResultOperationID(t *testing.T) { + entry := report.EntryFor(artifact.ActionPublish, published("op-9", "x/y:1"), nil) + assert.Equal(t, "op-9", entry.OperationID) + assert.Equal(t, 1, entry.Attempt) + assert.Equal(t, artifact.ActionPublish, entry.Action) + assert.Empty(t, report.EntryFor(artifact.ActionList, nil, nil).OperationID) +} diff --git a/pkg/artifact/report/signature.go b/pkg/artifact/report/signature.go new file mode 100644 index 00000000000..1e1292c0e8d --- /dev/null +++ b/pkg/artifact/report/signature.go @@ -0,0 +1,114 @@ +package report + +import ( + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" +) + +// Signature statements. Signing and verifying are different claims, and a checksum is not publisher +// authentication, so each statement says what the status does and does not prove. +const ( + statementSigned = "Signature evidence was stored for this subject. Signing alone does not authenticate the signer: " + + "verify the artifact against a trust policy to do that." + statementVerified = "A valid signature from a signer permitted by the trust policy covers this subject, " + + "so the publisher is authenticated." + statementUnchecked = "No trust configuration was supplied, so no signer was authenticated and nothing is claimed. " + + "A matching digest proves the content is intact, not who published it." + statementFailed = "Required verification did not succeed. The artifact must not be trusted." +) + +// signatureOf builds the signature section of a sign, verify, or policy-constrained inspect result. +// It returns nil for an operation that neither signed nor verified, so a report never implies a +// signature check that did not happen. +func signatureOf(action artifact.Action, result *invoke.Result) *Signature { + switch { + case result.Verification != nil: + return verificationSignature(result) + case action == artifact.ActionSign && (result.Subject != nil || len(result.Evidence) > 0): + return signedSignature(result) + default: + return nil + } +} + +// signedSignature reports the evidence a sign operation stored. The status is "signed", never +// "verified": the evidence is untrusted until a verification applies a trust policy. +func signedSignature(result *invoke.Result) *Signature { + signature := &Signature{Status: "signed", Statement: statementSigned, Evidence: evidenceOf(result.Evidence)} + applySubject(signature, result.Subject) + return signature +} + +// verificationSignature reports an authenticated verification result: status, subject, policy, +// and the verified signer claims. +func verificationSignature(result *invoke.Result) *Signature { + verification := result.Verification + signature := &Signature{Status: string(verification.Status), Claims: claimsOf(verification.Claims)} + switch verification.Status { + case artifact.VerificationVerified: + signature.Statement = statementVerified + case artifact.VerificationUnchecked: + signature.Statement = statementUnchecked + default: + signature.Statement = statementFailed + } + subject := verification.Subject + applySubject(signature, &subject) + if verification.PolicyFingerprint != "" { + signature.Policy = code(shortDigestText(verification.PolicyFingerprint)) + } + for _, evidenceDigest := range verification.EvidenceDigests { + signature.Evidence = append(signature.Evidence, Evidence{Digest: code(string(evidenceDigest))}) + } + return signature +} + +// applySubject copies the subject of a signature, which is the immutable thing it covers. +func applySubject(signature *Signature, subject *artifact.SignatureSubject) { + if subject == nil || subject.Digest == "" { + return + } + signature.SubjectKind = plain(string(subject.Kind)) + signature.SubjectDigest = code(string(subject.Digest)) + signature.SubjectMediaType = code(subject.MediaType) +} + +// claimsOf converts verified signer claims. +func claimsOf(claims []artifact.SignerClaim) []Claim { + converted := make([]Claim, 0, len(claims)) + for index := range claims { + converted = append(converted, Claim{ + Identity: code(claims[index].Identity), + Issuer: code(claims[index].Issuer), + KeyID: code(claims[index].KeyID), + }) + } + if len(converted) == 0 { + return nil + } + return converted +} + +// evidenceOf converts stored evidence descriptors. +func evidenceOf(evidence []artifact.SignatureEvidence) []Evidence { + converted := make([]Evidence, 0, len(evidence)) + for index := range evidence { + converted = append(converted, Evidence{ + Format: plain(string(evidence[index].Format)), + Digest: code(string(evidence[index].Descriptor.Digest)), + }) + } + if len(converted) == 0 { + return nil + } + return converted +} + +// shortDigestText shortens a policy fingerprint, which is a digest-shaped string. +func shortDigestText(value string) string { + const length = 19 + if len(value) <= length { + return value + } + return value[:length] + ellipsis +} diff --git a/pkg/artifact/report/templates.go b/pkg/artifact/report/templates.go new file mode 100644 index 00000000000..b150d06a580 --- /dev/null +++ b/pkg/artifact/report/templates.go @@ -0,0 +1,57 @@ +package report + +import ( + "embed" + "io/fs" + "strings" + + "github.com/cloudposse/atmos/pkg/perf" +) + +const ( + // The componentType constant is the ci.templates key of artifact summaries. + componentType = "artifacts" + + // The frameCommand constant names the frame template: ci.templates.artifacts.summary. + frameCommand = "summary" + + // The templatesPrefix constant is the directory the template loader reads embedded defaults from. + templatesPrefix = "templates/" + + // The templateSuffix constant is the extension of a template file. + templateSuffix = ".md" + + // The frameFile and operationFile constants are the embedded default files. + frameFile = "templates/summary.md" + operationFile = "templates/operation.md" +) + +//go:embed templates/summary.md templates/operation.md +var defaultFiles embed.FS + +// defaultTemplates serves the embedded defaults under the names the template loader asks for: +// templates/summary.md is the frame, and templates/.md is the shared per-operation +// section for every known action. A custom template can replace the frame, or the section of one +// action, without touching the others. +type defaultTemplates struct{} + +// Open implements fs.FS. +func (defaultTemplates) Open(name string) (fs.File, error) { + defer perf.Track(nil, "report.defaultTemplates.Open")() + + command, found := strings.CutPrefix(name, templatesPrefix) + command, hasSuffix := strings.CutSuffix(command, templateSuffix) + if !found || !hasSuffix { + return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist} + } + switch { + case command == frameCommand: + return defaultFiles.Open(frameFile) + case isKnownAction(command): + return defaultFiles.Open(operationFile) + default: + return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist} + } +} + +var _ fs.FS = defaultTemplates{} diff --git a/pkg/artifact/report/templates/operation.md b/pkg/artifact/report/templates/operation.md new file mode 100644 index 00000000000..258dc7d322d --- /dev/null +++ b/pkg/artifact/report/templates/operation.md @@ -0,0 +1,122 @@ +### {{.Icon}} {{.Number}}. {{.Title}} + +{{.Summary}} + +- **Status:** {{.Status}} +{{- if .Step}} +- **Step:** {{.Step}} +{{- end}} +{{- if .Repository}} +- **Repository:** {{.Repository}} +{{- end}} +{{- if .Ref}} +- **Reference:** {{.Ref}}{{if .Requested}} (requested {{.Requested}}){{end}} +{{- end}} +{{- if .Destination}} +- **Destination:** {{.Destination}} +{{- end}} +{{- if .Aliases}} +- **Also resolves from:** {{range $index, $alias := .Aliases}}{{if $index}}, {{end}}{{$alias}}{{end}} +{{- end}} +{{- if .ExactSize}} +- **Size:** {{.ExactSize}} +{{- end}} +{{- if .Duration}} +- **Duration:** {{.Duration}} +{{- end}} +{{- if gt .Attempts 1}} +- **Attempts:** {{.Attempts}} (the report shows the final attempt) +{{- end}} +{{- if .Lock}} +- **Lock:** {{.Lock.Scope}} scope. {{.Lock.Guarantee}} +{{- end}} +{{- if .Signature}} +- **Signature:** {{.Signature.Status}}. {{.Signature.Statement}} +{{- if .Signature.SubjectDigest}} + - Subject: {{.Signature.SubjectKind}} {{.Signature.SubjectDigest}} +{{- end}} +{{- if .Signature.Policy}} + - Policy fingerprint: {{.Signature.Policy}} +{{- end}} +{{- range .Signature.Claims}} + - Verified signer:{{if .Identity}} identity {{.Identity}}{{end}}{{if .Issuer}} issuer {{.Issuer}}{{end}}{{if .KeyID}} key {{.KeyID}}{{end}} +{{- end}} +{{- range .Signature.Evidence}} + - Evidence:{{if .Format}} {{.Format}}{{end}} {{.Digest}} +{{- end}} +{{- end}} +{{- if .Error}} + +**Error** + +{{.Error}} +{{- end}} +{{- if .Digests}} + +
+Digests ({{len .Digests}}) + +| Type | Digest | Identifies | +| --- | --- | --- | +{{range .Digests -}} +| {{.Label}} | {{.Value}} | {{.Meaning}} | +{{end}} +{{.Integrity}} + +
+{{- end}} +{{- if .Diagnostics}} + +
+Diagnostics ({{len .Diagnostics}}{{if .DiagnosticsMore}}, {{.DiagnosticsMore}} more not shown{{end}}) + +{{range .Diagnostics -}} +- **{{.Severity}}**{{if .Code}} {{.Code}}{{end}}: {{.Message}} +{{end}} +
+{{- end}} +{{- if .Inventory}} + +
+Inventory ({{.Inventory.Count}} {{if eq .Inventory.Count 1}}entry{{else}}entries{{end}}{{if .Inventory.Bytes}}, {{.Inventory.Bytes}}{{end}}) + +{{range .Inventory.Files -}} +- {{.Path}}{{if .Size}} ({{.Size}}){{end}} +{{end -}} +{{if .Inventory.More}}- … and {{.Inventory.More}} more entries not shown +{{end}} +
+{{- end}} +{{- if or .Description .Labels}} + +
+Metadata + +{{if .Description -}} +{{.Description}} + +{{end -}} +{{range .Labels -}} +- {{.Key}}: {{.Value}} +{{end}} +
+{{- end}} +{{- if .Collection}} + +
+Repositories ({{len .Collection.Repositories}}) + +{{range .Collection.Repositories -}} +- {{.Repository}}: {{.Count}} from {{.Source}} +{{end}} +{{- if .Collection.Artifacts}} +Artifacts: + +{{range .Collection.Artifacts -}} +- {{.}} +{{end -}} +{{if .Collection.More}}- … and {{.Collection.More}} more not shown +{{end -}} +{{end}} +
+{{- end}} diff --git a/pkg/artifact/report/templates/summary.md b/pkg/artifact/report/templates/summary.md new file mode 100644 index 00000000000..683314125dd --- /dev/null +++ b/pkg/artifact/report/templates/summary.md @@ -0,0 +1,18 @@ +{{"\n"}}## {{.Heading}} + +{{.Overview}} + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +{{range .Rows -}} +| {{.Number}} | {{.Operation}} | {{.Icon}} {{.Status}} | {{.Artifact}} | {{.Repository}} | {{.Destination}} | {{.Digest}} | {{.Size}} | {{.Duration}} | +{{end -}} + +{{range .Sections}} +{{.}} +{{end -}} +{{if .Notice}} +> [!WARNING] +> {{.Notice}} +{{end}} diff --git a/pkg/artifact/report/templates_test.go b/pkg/artifact/report/templates_test.go new file mode 100644 index 00000000000..1d3858c77a0 --- /dev/null +++ b/pkg/artifact/report/templates_test.go @@ -0,0 +1,98 @@ +package report_test + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/schema" +) + +// writeTemplate writes a template file under dir and returns its path relative to dir. +func writeTemplate(t *testing.T, dir, name, content string) { + t.Helper() + path := filepath.Join(dir, name) + require.NoError(t, os.MkdirAll(filepath.Dir(path), 0o755)) + require.NoError(t, os.WriteFile(path, []byte(content), 0o644)) +} + +func templateConfig(base string, artifacts map[string]string) *schema.AtmosConfiguration { + config := enabledConfig() + config.CI.Templates = schema.CITemplatesConfig{BasePath: base, Artifacts: artifacts} + return config +} + +func TestCustomTemplatePrecedence(t *testing.T) { + base := t.TempDir() + writeTemplate(t, base, filepath.Join("artifacts", "summary.md"), "CONVENTION {{.Total}}\n{{range .Sections}}{{.}}\n{{end}}") + writeTemplate(t, base, "explicit-summary.md", "EXPLICIT {{.Total}}\n") + writeTemplate(t, base, filepath.Join("artifacts", "publish.md"), "PUBLISH-SECTION {{.Ref}} {{.Status}}") + one := entry("publish", "a", 1, published("a", "x/y:1"), nil) + + t.Run("explicit override wins over convention", func(t *testing.T) { + markdown := flushOne(t, templateConfig(base, map[string]string{"summary": "explicit-summary.md"}), one) + assert.Equal(t, "EXPLICIT 1\n", markdown) + }) + t.Run("convention wins over the embedded default", func(t *testing.T) { + markdown := flushOne(t, templateConfig(base, nil), one) + assert.True(t, strings.HasPrefix(markdown, "CONVENTION 1"), markdown) + assert.Contains(t, markdown, "PUBLISH-SECTION `x/y:1` Published") + assert.NotContains(t, markdown, "## Artifacts") + }) + t.Run("embedded default without overrides", func(t *testing.T) { + markdown := flushOne(t, templateConfig("", nil), one) + assert.Contains(t, markdown, "## Artifacts") + }) + t.Run("a section override replaces only that action", func(t *testing.T) { + only := t.TempDir() + writeTemplate(t, only, "pull.md", "PULL-ONLY {{.Ref}}") + markdown := flushOne( + t, templateConfig(only, map[string]string{"pull": "pull.md"}), + entry("publish", "a", 1, published("a", "x/y:1"), nil), + entry("pull", "b", 1, result(&artifact.OperationResult{Action: artifact.ActionPull, Outcome: artifact.OutcomeRead, Ref: "x/z:1"}), nil), + ) + assert.Contains(t, markdown, "## Artifacts", "the default frame still renders") + assert.Contains(t, markdown, "### ✅ 1. Publish `x/y:1`", "publish keeps the default section") + assert.Contains(t, markdown, "PULL-ONLY `x/z:1`") + assert.NotContains(t, markdown, "### ✅ 2.", "the pull section was replaced") + }) +} + +func TestMissingExplicitOverrideIsAnError(t *testing.T) { + for _, key := range []string{"summary", "publish"} { + t.Run(key, func(t *testing.T) { + config := templateConfig(t.TempDir(), map[string]string{key: "does-not-exist.md"}) + fake := &fakeReporter{} + session := newSession(config, fake) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + err := session.Flush() + require.Error(t, err) + assert.ErrorIs(t, err, errUtils.ErrArtifactReportRender) + assert.ErrorIs(t, err, errUtils.ErrCITemplateNotFound) + assert.Empty(t, fake.summaries) + }) + } +} + +func TestInvalidTemplateIsAReportingError(t *testing.T) { + base := t.TempDir() + writeTemplate(t, base, "broken.md", "{{ .Nope }") + writeTemplate(t, base, "unknown.md", "{{ .NoSuchField }}") + // A section template is rendered per operation, so its failure is reported the same way as the frame's. + for _, key := range []string{"summary", "publish"} { + for _, name := range []string{"broken.md", "unknown.md"} { + fake := &fakeReporter{} + session := newSession(templateConfig(base, map[string]string{key: name}), fake) + session.Record(entry("publish", "a", 1, published("a", "x/y:1"), nil)) + err := session.Flush() + require.ErrorIs(t, err, errUtils.ErrArtifactReportRender, key+" "+name) + assert.Empty(t, fake.summaries, key+" "+name) + } + } +} diff --git a/pkg/artifact/report/testdata/canceled.md b/pkg/artifact/report/testdata/canceled.md new file mode 100644 index 00000000000..5dd5e3bfa12 --- /dev/null +++ b/pkg/artifact/report/testdata/canceled.md @@ -0,0 +1,24 @@ + +## Artifacts + +1 operation: 1 canceled. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | 🚫 Canceled | `components/vpc:1.2.0` | `shared` | | | | | + + +### 🚫 1. Publish `components/vpc:1.2.0` + +The publish operation for `components/vpc:1.2.0` was canceled. + +- **Status:** Canceled +- **Step:** publish +- **Repository:** `shared` + +**Error** + +```text +publish: context canceled +``` diff --git a/pkg/artifact/report/testdata/copied.md b/pkg/artifact/report/testdata/copied.md new file mode 100644 index 00000000000..826e6e6f406 --- /dev/null +++ b/pkg/artifact/report/testdata/copied.md @@ -0,0 +1,34 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Copy | ✅ Copied | `components/vpc:1.2.0` | `mirror` | `s3://backups/components/vpc/1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 1.0 MiB | 2.5 s | + + +### ✅ 1. Copy `components/vpc:1.2.0` + +Copied `components/vpc:1.2.0` in repository `mirror`. + +- **Status:** Copied +- **Step:** copy +- **Repository:** `mirror` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `s3://backups/components/vpc/1.2.0` +- **Size:** 1.0 MiB (1,048,576 bytes) +- **Duration:** 2.5 s +- **Lock:** repository scope. Writers on every host were serialized through the repository's own coordination. + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
diff --git a/pkg/artifact/report/testdata/deleted.md b/pkg/artifact/report/testdata/deleted.md new file mode 100644 index 00000000000..aa91d17380b --- /dev/null +++ b/pkg/artifact/report/testdata/deleted.md @@ -0,0 +1,20 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Delete | ✅ Deleted | `components/vpc:0.9.0` | `shared` | | | | | + + +### ✅ 1. Delete `components/vpc:0.9.0` + +Deleted `components/vpc:0.9.0` in repository `shared`. + +- **Status:** Deleted +- **Step:** delete +- **Repository:** `shared` +- **Reference:** `components/vpc:0.9.0` +- **Lock:** host scope. Writers on this host were serialized. Writers on other hosts are not excluded. diff --git a/pkg/artifact/report/testdata/downloaded.md b/pkg/artifact/report/testdata/downloaded.md new file mode 100644 index 00000000000..2c3d0b2ba52 --- /dev/null +++ b/pkg/artifact/report/testdata/downloaded.md @@ -0,0 +1,34 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Pull | ✅ Downloaded | `components/vpc:1.2.0` | `shared` | `/work/components/vpc` | `sha256:cccccccccccc…` (content) | 48 KiB | | + + +### ✅ 1. Pull `components/vpc:1.2.0` + +Downloaded `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Downloaded +- **Step:** pull +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` (requested `components/vpc:latest`) +- **Destination:** `/work/components/vpc` +- **Also resolves from:** `components/vpc:latest` +- **Size:** 48 KiB (49,152 bytes) + +
+Digests (2) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
diff --git a/pkg/artifact/report/testdata/dry-run.md b/pkg/artifact/report/testdata/dry-run.md new file mode 100644 index 00000000000..13e34afb23c --- /dev/null +++ b/pkg/artifact/report/testdata/dry-run.md @@ -0,0 +1,54 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | 🔍 Dry run | `components/vpc:1.2.0` | `shared` | `oci://ghcr.io/acme/components/vpc:1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 48 KiB | 1.2 s | + + +### 🔍 1. Publish `components/vpc:1.2.0` + +Dry run `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Dry run +- **Step:** publish +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `oci://ghcr.io/acme/components/vpc:1.2.0` +- **Size:** 48 KiB (49,152 bytes) +- **Duration:** 1.2 s + +
+Digests (4) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +
+Inventory (2 entries, 3.0 KiB) + +- `main.tf` (1.0 KiB) +- `variables.tf` (2.0 KiB) + +
+ +
+Metadata + +VPC component + +- `team`: `net` +- `tier`: `1` + +
diff --git a/pkg/artifact/report/testdata/failed.md b/pkg/artifact/report/testdata/failed.md new file mode 100644 index 00000000000..07253dd0bb6 --- /dev/null +++ b/pkg/artifact/report/testdata/failed.md @@ -0,0 +1,25 @@ + +## Artifacts + +1 operation: 1 failed. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ❌ Failed | `components/vpc:1.2.0` | `shared` | | | | | + + +### ❌ 1. Publish `components/vpc:1.2.0` + +The publish operation for `components/vpc:1.2.0` failed. + +- **Status:** Failed +- **Step:** publish +- **Repository:** `shared` +- **Attempts:** 3 (the report shows the final attempt) + +**Error** + +```text +artifact conflict: conflict on components/vpc:1.2.0 +``` diff --git a/pkg/artifact/report/testdata/listed.md b/pkg/artifact/report/testdata/listed.md new file mode 100644 index 00000000000..d4f80087b21 --- /dev/null +++ b/pkg/artifact/report/testdata/listed.md @@ -0,0 +1,30 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | List | ⚠️ Listed (incomplete) | 2 artifacts | | | | | | + + +### ⚠️ 1. List + +Listed 2 artifacts; the listing is incomplete because a repository could not be listed. + +- **Status:** Listed (incomplete) +- **Step:** list + +
+Repositories (2) + +- `shared`: 2 from live +- `mirror`: 0 from cache + +Artifacts: + +- `components/vpc:1.2.0` +- `components/vpc:1.1.0` + +
diff --git a/pkg/artifact/report/testdata/mixed.md b/pkg/artifact/report/testdata/mixed.md new file mode 100644 index 00000000000..bff07af9a5f --- /dev/null +++ b/pkg/artifact/report/testdata/mixed.md @@ -0,0 +1,147 @@ + +## Artifacts + +5 operations: 4 succeeded, 1 failed. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ✅ Published | `components/vpc:1.2.0` | `shared` | `oci://ghcr.io/acme/components/vpc:1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 48 KiB | 1.2 s | +| 2 | Sign | ✅ Signed | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | 300 ms | +| 3 | Verify | ✅ Verified | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | | +| 4 | Copy | ✅ Copied | `components/vpc:1.2.0` | `mirror` | `s3://backups/components/vpc/1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 1.0 MiB | 2.5 s | +| 5 | Publish | ❌ Failed | `components/vpc:1.2.0` | `shared` | | | | | + + +### ✅ 1. Publish `components/vpc:1.2.0` + +Published `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Published +- **Step:** publish +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `oci://ghcr.io/acme/components/vpc:1.2.0` +- **Size:** 48 KiB (49,152 bytes) +- **Duration:** 1.2 s +- **Lock:** host scope. Writers on this host were serialized. Writers on other hosts are not excluded. + +
+Digests (4) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +
+Inventory (2 entries, 3.0 KiB) + +- `main.tf` (1.0 KiB) +- `variables.tf` (2.0 KiB) + +
+ +
+Metadata + +VPC component + +- `team`: `net` +- `tier`: `1` + +
+ +### ✅ 2. Sign `components/vpc:1.2.0` + +Signed `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Signed +- **Step:** sign +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Duration:** 300 ms +- **Lock:** repository scope. Writers on every host were serialized through the repository's own coordination. +- **Signature:** signed. Signature evidence was stored for this subject. Signing alone does not authenticate the signer: verify the artifact against a trust policy to do that. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Evidence: sigstore-bundle `sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +### ✅ 3. Verify `components/vpc:1.2.0` + +Verified `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Verified +- **Step:** verify +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Signature:** verified. A valid signature from a signer permitted by the trust policy covers this subject, so the publisher is authenticated. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Policy fingerprint: `sha256:ffffffffffff…` + - Verified signer: identity `https://github.com/acme/infra/.github/workflows/release.yaml@refs/heads/main` issuer `https://token.actions.githubusercontent.com` + - Verified signer: key `SHA256:abcdef` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +The signature was verified against the configured trust policy, so the signer is authenticated. The digests identify the verified content. + +
+ +### ✅ 4. Copy `components/vpc:1.2.0` + +Copied `components/vpc:1.2.0` in repository `mirror`. + +- **Status:** Copied +- **Step:** copy +- **Repository:** `mirror` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `s3://backups/components/vpc/1.2.0` +- **Size:** 1.0 MiB (1,048,576 bytes) +- **Duration:** 2.5 s +- **Lock:** repository scope. Writers on every host were serialized through the repository's own coordination. + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +### ❌ 5. Publish `components/vpc:1.2.0` + +The publish operation for `components/vpc:1.2.0` failed. + +- **Status:** Failed +- **Step:** publish +- **Repository:** `shared` + +**Error** + +```text +registry unavailable +``` diff --git a/pkg/artifact/report/testdata/published.md b/pkg/artifact/report/testdata/published.md new file mode 100644 index 00000000000..4c629ee9559 --- /dev/null +++ b/pkg/artifact/report/testdata/published.md @@ -0,0 +1,55 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ✅ Published | `components/vpc:1.2.0` | `shared` | `oci://ghcr.io/acme/components/vpc:1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 48 KiB | 1.2 s | + + +### ✅ 1. Publish `components/vpc:1.2.0` + +Published `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Published +- **Step:** publish +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `oci://ghcr.io/acme/components/vpc:1.2.0` +- **Size:** 48 KiB (49,152 bytes) +- **Duration:** 1.2 s +- **Lock:** host scope. Writers on this host were serialized. Writers on other hosts are not excluded. + +
+Digests (4) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +
+Inventory (2 entries, 3.0 KiB) + +- `main.tf` (1.0 KiB) +- `variables.tf` (2.0 KiB) + +
+ +
+Metadata + +VPC component + +- `team`: `net` +- `tier`: `1` + +
diff --git a/pkg/artifact/report/testdata/replaced.md b/pkg/artifact/report/testdata/replaced.md new file mode 100644 index 00000000000..7bd3920d8a4 --- /dev/null +++ b/pkg/artifact/report/testdata/replaced.md @@ -0,0 +1,55 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ✅ Replaced | `components/vpc:1.2.0` | `shared` | `oci://ghcr.io/acme/components/vpc:1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 48 KiB | 1.2 s | + + +### ✅ 1. Publish `components/vpc:1.2.0` + +Replaced `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Replaced +- **Step:** publish +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `oci://ghcr.io/acme/components/vpc:1.2.0` +- **Size:** 48 KiB (49,152 bytes) +- **Duration:** 1.2 s +- **Lock:** host scope. Writers on this host were serialized. Writers on other hosts are not excluded. + +
+Digests (4) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +
+Inventory (2 entries, 3.0 KiB) + +- `main.tf` (1.0 KiB) +- `variables.tf` (2.0 KiB) + +
+ +
+Metadata + +VPC component + +- `team`: `net` +- `tier`: `1` + +
diff --git a/pkg/artifact/report/testdata/signed.md b/pkg/artifact/report/testdata/signed.md new file mode 100644 index 00000000000..7900ffe7df8 --- /dev/null +++ b/pkg/artifact/report/testdata/signed.md @@ -0,0 +1,35 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Sign | ✅ Signed | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | 300 ms | + + +### ✅ 1. Sign `components/vpc:1.2.0` + +Signed `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Signed +- **Step:** sign +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Duration:** 300 ms +- **Lock:** repository scope. Writers on every host were serialized through the repository's own coordination. +- **Signature:** signed. Signature evidence was stored for this subject. Signing alone does not authenticate the signer: verify the artifact against a trust policy to do that. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Evidence: sigstore-bundle `sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
diff --git a/pkg/artifact/report/testdata/timed-out.md b/pkg/artifact/report/testdata/timed-out.md new file mode 100644 index 00000000000..efc036d21b6 --- /dev/null +++ b/pkg/artifact/report/testdata/timed-out.md @@ -0,0 +1,24 @@ + +## Artifacts + +1 operation: 1 failed. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ❌ Timed out | `components/vpc:1.2.0` | `shared` | | | | | + + +### ❌ 1. Publish `components/vpc:1.2.0` + +The publish operation for `components/vpc:1.2.0` timed out. + +- **Status:** Timed out +- **Step:** publish +- **Repository:** `shared` + +**Error** + +```text +publish: context deadline exceeded +``` diff --git a/pkg/artifact/report/testdata/unchanged.md b/pkg/artifact/report/testdata/unchanged.md new file mode 100644 index 00000000000..178b9b057e3 --- /dev/null +++ b/pkg/artifact/report/testdata/unchanged.md @@ -0,0 +1,55 @@ + +## Artifacts + +1 operation: 1 unchanged. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Publish | ➖ Unchanged | `components/vpc:1.2.0` | `shared` | `oci://ghcr.io/acme/components/vpc:1.2.0` | `sha256:aaaaaaaaaaaa…` (resolved) | 48 KiB | 1.2 s | + + +### ➖ 1. Publish `components/vpc:1.2.0` + +Unchanged `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Unchanged +- **Step:** publish +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Destination:** `oci://ghcr.io/acme/components/vpc:1.2.0` +- **Size:** 48 KiB (49,152 bytes) +- **Duration:** 1.2 s +- **Lock:** host scope. Writers on this host were serialized. Writers on other hosts are not excluded. + +
+Digests (4) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Resolved | `sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` | OCI manifest or index digest; the record digest for local and S3 repositories | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | +| Content | `sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc` | portable content identity of the inventory and documents | +| Representation | `sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd` | checksum of the transferred payload; it proves integrity, not the publisher | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
+ +
+Inventory (2 entries, 3.0 KiB) + +- `main.tf` (1.0 KiB) +- `variables.tf` (2.0 KiB) + +
+ +
+Metadata + +VPC component + +- `team`: `net` +- `tier`: `1` + +
diff --git a/pkg/artifact/report/testdata/unchecked.md b/pkg/artifact/report/testdata/unchecked.md new file mode 100644 index 00000000000..bb45d93a09c --- /dev/null +++ b/pkg/artifact/report/testdata/unchecked.md @@ -0,0 +1,33 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Verify | ⚠️ Unchecked | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | | + + +### ⚠️ 1. Verify `components/vpc:1.2.0` + +Unchecked `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Unchecked +- **Step:** verify +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Signature:** unchecked. No trust configuration was supplied, so no signer was authenticated and nothing is claimed. A matching digest proves the content is intact, not who published it. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Policy fingerprint: `sha256:ffffffffffff…` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
diff --git a/pkg/artifact/report/testdata/verified.md b/pkg/artifact/report/testdata/verified.md new file mode 100644 index 00000000000..a86cc78dbf4 --- /dev/null +++ b/pkg/artifact/report/testdata/verified.md @@ -0,0 +1,35 @@ + +## Artifacts + +1 operation: 1 succeeded. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Verify | ✅ Verified | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | | + + +### ✅ 1. Verify `components/vpc:1.2.0` + +Verified `components/vpc:1.2.0` in repository `shared`. + +- **Status:** Verified +- **Step:** verify +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Signature:** verified. A valid signature from a signer permitted by the trust policy covers this subject, so the publisher is authenticated. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Policy fingerprint: `sha256:ffffffffffff…` + - Verified signer: identity `https://github.com/acme/infra/.github/workflows/release.yaml@refs/heads/main` issuer `https://token.actions.githubusercontent.com` + - Verified signer: key `SHA256:abcdef` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +The signature was verified against the configured trust policy, so the signer is authenticated. The digests identify the verified content. + +
diff --git a/pkg/artifact/report/testdata/verify-fail.md b/pkg/artifact/report/testdata/verify-fail.md new file mode 100644 index 00000000000..322794084f1 --- /dev/null +++ b/pkg/artifact/report/testdata/verify-fail.md @@ -0,0 +1,39 @@ + +## Artifacts + +1 operation: 1 failed. + + +| # | Operation | Status | Artifact | Repository | Destination | Digest | Size | Duration | +| ---: | --- | --- | --- | --- | --- | --- | ---: | ---: | +| 1 | Verify | ❌ Failed | `components/vpc:1.2.0` | `shared` | | `sha256:bbbbbbbbbbbb…` (record) | | | + + +### ❌ 1. Verify `components/vpc:1.2.0` + +The verify operation for `components/vpc:1.2.0` failed. + +- **Status:** Failed +- **Step:** verify +- **Repository:** `shared` +- **Reference:** `components/vpc:1.2.0` +- **Signature:** failed. Required verification did not succeed. The artifact must not be trusted. + - Subject: record `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` + - Policy fingerprint: `sha256:ffffffffffff…` + +**Error** + +```text +artifact signature verification failed: wrong issuer +``` + +
+Digests (1) + +| Type | Digest | Identifies | +| --- | --- | --- | +| Record | `sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb` | canonical bytes of the package Record | + +Digests prove that the content is intact. They do not authenticate the publisher, and this operation did not report a verified signature. + +
diff --git a/pkg/artifact/scaffold/scaffold.go b/pkg/artifact/scaffold/scaffold.go index a56d7c026ba..6bf76eec3cf 100644 --- a/pkg/artifact/scaffold/scaffold.go +++ b/pkg/artifact/scaffold/scaffold.go @@ -16,6 +16,7 @@ import ( "fmt" "os" "path/filepath" + "strings" errUtils "github.com/cloudposse/atmos/errors" "github.com/cloudposse/atmos/pkg/artifact/produce" @@ -45,6 +46,9 @@ func (Validator) ValidateScaffold(ctx context.Context, dir string) (produce.Prod return produce.ProducerMetadata{}, err } manifestPath := filepath.Join(dir, config.ScaffoldConfigFileName) + if err := checkManifestWithinRoot(dir, manifestPath); err != nil { + return produce.ProducerMetadata{}, err + } content, err := os.ReadFile(manifestPath) if err != nil { if errors.Is(err, os.ErrNotExist) { @@ -52,7 +56,7 @@ func (Validator) ValidateScaffold(ctx context.Context, dir string) (produce.Prod } return produce.ProducerMetadata{}, fmt.Errorf("%w: read %s: %w", errUtils.ErrArtifactScaffoldInvalid, manifestPath, err) } - manifest, err := config.LoadScaffoldConfigFromContent(string(content), config.WithSourceDir(dir)) + manifest, err := config.LoadScaffoldConfigFromContent(string(content), config.WithSourceDir(dir), config.WithIncludeRoot(dir)) if err != nil { return produce.ProducerMetadata{}, fmt.Errorf("%w: %s: %w", errUtils.ErrArtifactScaffoldInvalid, manifestPath, err) } @@ -62,3 +66,34 @@ func (Validator) ValidateScaffold(ctx context.Context, dir string) (produce.Prod Description: manifest.Metadata.Description, }, nil } + +// checkManifestWithinRoot prevents publication from reading an outside manifest through a symlink. +func checkManifestWithinRoot(dir, manifestPath string) error { + root, err := filepath.EvalSymlinks(dir) + if err != nil { + return fmt.Errorf("%w: resolve scaffold root: %w", errUtils.ErrArtifactScaffoldInvalid, err) + } + root, err = filepath.Abs(root) + if err != nil { + return fmt.Errorf("%w: resolve scaffold root: %w", errUtils.ErrArtifactScaffoldInvalid, err) + } + resolved, err := filepath.EvalSymlinks(manifestPath) + if errors.Is(err, os.ErrNotExist) { + return nil + } + if err != nil { + return fmt.Errorf("%w: resolve %s: %w", errUtils.ErrArtifactScaffoldInvalid, manifestPath, err) + } + resolved, err = filepath.Abs(resolved) + if err != nil { + return fmt.Errorf("%w: resolve %s: %w", errUtils.ErrArtifactScaffoldInvalid, manifestPath, err) + } + rel, err := filepath.Rel(root, resolved) + if err != nil { + return fmt.Errorf("%w: resolve %s: %w", errUtils.ErrArtifactScaffoldInvalid, manifestPath, err) + } + if rel == ".." || strings.HasPrefix(rel, ".."+string(filepath.Separator)) || filepath.IsAbs(rel) { + return fmt.Errorf("%w: %s lies outside the scaffold publication root", errUtils.ErrArtifactScaffoldInvalid, manifestPath) + } + return nil +} diff --git a/pkg/artifact/scaffold/scaffold_test.go b/pkg/artifact/scaffold/scaffold_test.go index dc96542ad98..08f0fb691c8 100644 --- a/pkg/artifact/scaffold/scaffold_test.go +++ b/pkg/artifact/scaffold/scaffold_test.go @@ -132,3 +132,92 @@ func TestRegister_InstallsTheProcessWideValidator(t *testing.T) { assert.Equal(t, "2.0.0", prepared.Record.Version) assert.Equal(t, produce.KindScaffold, prepared.Record.Kind) } + +func TestValidator_ConfinesLocalIncludes(t *testing.T) { + parent := t.TempDir() + dir := filepath.Join(parent, "root") + require.NoError(t, os.Mkdir(dir, 0o755)) + require.NoError(t, os.WriteFile(filepath.Join(parent, "outside.yaml"), []byte("key: value\n"), 0o600)) + fixtures.WriteFile(t, dir, "inside.yaml", "key: value\n", 0o600) + linkAvailable := fixtures.Symlink(t, dir, "link.yaml", filepath.Join(parent, "outside.yaml")) + for _, tc := range []struct { + path string + valid bool + }{{"./inside.yaml", true}, {"../outside.yaml", false}, {"./link.yaml", false}, {"file::" + filepath.Join(parent, "outside.yaml"), false}, {"git::file://" + filepath.Join(parent, "outside.yaml"), false}} { + t.Run(tc.path, func(t *testing.T) { + if tc.path == "./link.yaml" && !linkAvailable { + t.Skip("symlinks are unavailable") + } + manifest := "apiVersion: atmos/v1\nkind: AtmosScaffoldConfig\nmetadata:\n name: test\nspec:\n fields:\n - name: lookup\n type: computed\n value: !include " + tc.path + "\n" + fixtures.WriteFile(t, dir, "scaffold.yaml", manifest, 0o644) + _, err := scaffold.Validator{}.ValidateScaffold(context.Background(), dir) + if tc.valid { + require.NoError(t, err) + } else { + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) + } + }) + } +} + +func TestValidator_RejectsManifestSymlinkOutsideRoot(t *testing.T) { + parent := t.TempDir() + dir := filepath.Join(parent, "root") + require.NoError(t, os.Mkdir(dir, 0o755)) + outside := filepath.Join(parent, "outside.yaml") + require.NoError(t, os.WriteFile(outside, []byte(validManifest), 0o600)) + if !fixtures.Symlink(t, dir, "scaffold.yaml", outside) { + t.Skip("symlinks are unavailable") + } + _, err := scaffold.Validator{}.ValidateScaffold(context.Background(), dir) + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) +} + +// A scaffold root that does not exist, a manifest that cannot be read as a file, and a manifest +// symlink that cannot be resolved are each reported as an invalid scaffold with the cause kept. +func TestValidator_ReportsUnreadableRootsAndManifests(t *testing.T) { + tests := []struct { + name string + setup func(t *testing.T) string + cause error + names string + }{ + { + name: "root does not exist", + setup: func(t *testing.T) string { return filepath.Join(t.TempDir(), "missing") }, + cause: os.ErrNotExist, + names: "scaffold root", + }, + { + name: "manifest is a directory", + setup: func(t *testing.T) string { + dir := t.TempDir() + require.NoError(t, os.Mkdir(filepath.Join(dir, "scaffold.yaml"), 0o755)) + return dir + }, + names: "scaffold.yaml", + }, + { + name: "manifest symlink loops", + setup: func(t *testing.T) string { + dir := t.TempDir() + if !fixtures.Symlink(t, dir, "scaffold.yaml", "scaffold.yaml") { + t.Skip("symlinks are unavailable") + } + return dir + }, + names: "scaffold.yaml", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := scaffold.Validator{}.ValidateScaffold(context.Background(), tt.setup(t)) + + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) + if tt.cause != nil { + require.ErrorIs(t, err, tt.cause) + } + assert.Contains(t, err.Error(), tt.names) + }) + } +} diff --git a/pkg/artifact/service/boundary_test.go b/pkg/artifact/service/boundary_test.go index 61942f6a8bd..b4e5439b0ea 100644 --- a/pkg/artifact/service/boundary_test.go +++ b/pkg/artifact/service/boundary_test.go @@ -14,6 +14,8 @@ import ( // TestArtifactPackagesImportNoCLIRunnerHookPluginOrCI keeps the artifact service and the packages // it composes (preparation, staging, materialization) free of CLI, runner, hook, plugin, and CI // dependencies, as the package boundary contract requires. Test-support packages are checked too. +// The report package is the one exception for CI: it renders results through the CI reporter, and +// its own boundary test keeps every other package from importing CI. func TestArtifactPackagesImportNoCLIRunnerHookPluginOrCI(t *testing.T) { forbidden := []string{ "github.com/cloudposse/atmos/cmd", @@ -23,6 +25,7 @@ func TestArtifactPackagesImportNoCLIRunnerHookPluginOrCI(t *testing.T) { "github.com/cloudposse/atmos/pkg/hooks", "github.com/cloudposse/atmos/internal/exec", } + const ciPrefix = "github.com/cloudposse/atmos/pkg/ci" files, err := filepath.Glob(filepath.Join("..", "*", "*.go")) require.NoError(t, err) checked := 0 @@ -37,6 +40,9 @@ func TestArtifactPackagesImportNoCLIRunnerHookPluginOrCI(t *testing.T) { path, err := strconv.Unquote(spec.Path.Value) require.NoError(t, err) for _, prefix := range forbidden { + if prefix == ciPrefix && filepath.Base(filepath.Dir(file)) == "report" { + continue + } require.Falsef(t, path == prefix || strings.HasPrefix(path, prefix+"/"), "%s imports forbidden package %s", file, path) } } diff --git a/pkg/artifact/service/verify.go b/pkg/artifact/service/verify.go index 8a059b54fd5..cf028e201d8 100644 --- a/pkg/artifact/service/verify.go +++ b/pkg/artifact/service/verify.go @@ -69,6 +69,8 @@ func verifySubject(ctx context.Context, alias string, repo artifact.Repository, result, verifyErr := repo.Verify(ctx, subject, call) if failure := checkVerifyResult(subject, result, verifyErr); failure != nil { combined.Status = artifact.VerificationFailed + // A signer that satisfied an earlier trust set is not a verified signer of a failed result. + combined.Claims = nil if result != nil { combined.Diagnostics = append(combined.Diagnostics, result.Diagnostics...) } diff --git a/pkg/artifact/service/verify_test.go b/pkg/artifact/service/verify_test.go index 58f0d7c0be6..b191fe600db 100644 --- a/pkg/artifact/service/verify_test.go +++ b/pkg/artifact/service/verify_test.go @@ -138,8 +138,10 @@ func TestVerify_GlobalAndRepositoryTrustSetsBothMustBeSatisfied(t *testing.T) { } e.setInfo("dst", func(info *service.RepositoryInfo) { info.Policy = policy(releaseSigner, second) }) - _, err := e.svc.Verify(context.Background(), artifact.VerifyRequest{Repository: "dst", Ref: exampleRef}) + failed, err := e.svc.Verify(context.Background(), artifact.VerifyRequest{Repository: "dst", Ref: exampleRef}) require.ErrorIs(t, err, errUtils.ErrArtifactVerificationFailed, "satisfying one of two required trust sets is not enough; they are never unioned") + assert.Equal(t, artifact.VerificationFailed, failed.Verification.Status) + assert.Empty(t, failed.Verification.Claims, "the signer of the satisfied set is not reported as verified under a failed result") subject := artifact.SignatureSubject{Kind: artifact.SubjectRecord, Digest: published.Operation.RecordDigest, MediaType: artifact.MediaTypeConfig} _, err = e.repos["dst"].Sign(context.Background(), subject, second, artifact.SignOptions{}) diff --git a/pkg/asciicast/session.go b/pkg/asciicast/session.go index 4421d5d6b72..e7c74335da1 100644 --- a/pkg/asciicast/session.go +++ b/pkg/asciicast/session.go @@ -99,6 +99,10 @@ type SessionOptions struct { KeyInterval time.Duration Actions []SessionAction Recorder *Recorder + // BeforeActions can wait for externally observed shell readiness before action deadlines start. + // Its predicate reports whether captured output contains text without consuming it. + // It must return on context cancellation; a failure stops and reaps the shell. + BeforeActions func(context.Context, func(string) bool) error // ScopedWaits consumes matched output between waits for declarative recordings. ScopedWaits bool // Observe runs after an action and its output have reached the recorder. It runs @@ -147,6 +151,17 @@ func RunSession(ctx context.Context, opts *SessionOptions) error { state.echo.disabled = !echoTrackingSupported() state.mu.Unlock() + if opts.BeforeActions != nil { + containsOutput := func(text string) bool { + state.mu.Lock() + defer state.mu.Unlock() + return strings.Contains(state.output.String(), text) + } + if err := opts.BeforeActions(ctx, containsOutput); err != nil { + proc.kill() + return errors.Join(err, reapKilledSessionProcess(proc)) + } + } waitForSessionQuiet(ctx, state, sessionReadyQuietPeriod, sessionReadyMaxWait) if err := sessionShellExitedError(state, proc, opts.Shell); err != nil { return err diff --git a/pkg/asciicast/session_cancel_test.go b/pkg/asciicast/session_cancel_test.go index d9ca3f0b975..55b2edfc822 100644 --- a/pkg/asciicast/session_cancel_test.go +++ b/pkg/asciicast/session_cancel_test.go @@ -150,3 +150,20 @@ func TestRunSessionObserveFailureStopsTheSession(t *testing.T) { require.ErrorIs(t, err, errObserve) require.Equal(t, []int{0, 1}, observed, "actions after the failed checkpoint must not run") } + +func TestRunSessionBeforeActionsFailureStopsSession(t *testing.T) { + require.NoError(t, iolib.Initialize()) + shell, err := os.Executable() + require.NoError(t, err) + t.Setenv(asciicastSessionHelperEnv, "1") + failure := errors.New("readiness rejected") + observed := false + err = RunSession(t.Context(), &SessionOptions{ + Shell: shell, + BeforeActions: func(context.Context, func(string) bool) error { return failure }, + Actions: []SessionAction{{Type: "pause", Duration: "1ms"}}, + Observe: func(int, *SessionAction) error { observed = true; return nil }, + }) + require.ErrorIs(t, err, failure) + require.False(t, observed) +} diff --git a/pkg/auth/providers/github/oidc_retry_test.go b/pkg/auth/providers/github/oidc_retry_test.go index 5b0bb4cf7fc..319b4d8c3a2 100644 --- a/pkg/auth/providers/github/oidc_retry_test.go +++ b/pkg/auth/providers/github/oidc_retry_test.go @@ -116,9 +116,15 @@ func startTokenServer(t *testing.T, http2 bool, handlers ...http.HandlerFunc) *t ts.conns.Add(1) } } + release := make(chan struct{}) + ts.Config.BaseContext = func(net.Listener) context.Context { + return context.WithValue(context.Background(), hangReleaseKey{}, release) + } ts.EnableHTTP2 = http2 ts.StartTLS() t.Cleanup(ts.Close) + // Cleanups run last-in first-out: release hanging handlers before Close waits for them. + t.Cleanup(func() { close(release) }) return ts } @@ -141,9 +147,16 @@ func respondBody(body string) http.HandlerFunc { } // respondHang blocks until the client gives up on the request. +// The hangReleaseKey type carries the token server's release channel into each request context. +type hangReleaseKey struct{} + +// respondHang never answers: it holds the request until the test ends, so the client's own +// timeout always ends the attempt. Waiting only on the request context is not enough, because a +// context that ends first returns an empty 200 response that the client reads as EOF. func respondHang() http.HandlerFunc { return func(_ http.ResponseWriter, r *http.Request) { - <-r.Context().Done() + release, _ := r.Context().Value(hangReleaseKey{}).(chan struct{}) + <-release } } diff --git a/pkg/ci/templates/loader.go b/pkg/ci/templates/loader.go index 93e49fb110c..4672ab41727 100644 --- a/pkg/ci/templates/loader.go +++ b/pkg/ci/templates/loader.go @@ -18,6 +18,9 @@ import ( // containerComponentType is the component type of container image summaries. const containerComponentType = "container" +// artifactsComponentType is the component type of artifact operation summaries. +const artifactsComponentType = "artifacts" + // templateFuncs provides custom template functions for CI summary templates. var templateFuncs = template.FuncMap{ "replace": strings.ReplaceAll, @@ -77,10 +80,10 @@ func (l *Loader) Load(componentType, command string, defaultTemplates fs.FS) (st // loadFromConfigOverride attempts to load template from config overrides. // // A configured override that cannot be read falls through to the next layer for the native -// plugin component types, which have always tolerated it. The container component is strict: a -// configured ci.templates.container. file that is missing is an error, so a typo in the -// path cannot silently revert to the embedded default. The embedded default is used for the -// container only when the key is unset. +// plugin component types, which have always tolerated it. The container and artifacts components +// are strict: a configured ci.templates.container. or ci.templates.artifacts. +// file that is missing is an error, so a typo in the path cannot silently revert to the embedded +// default. The embedded default is used for them only when the key is unset. func (l *Loader) loadFromConfigOverride(componentType, command string) (string, bool, error) { if l.atmosConfig == nil { return "", false, nil @@ -99,7 +102,7 @@ func (l *Loader) loadFromConfigOverride(componentType, command string) (string, path := l.resolvePath(filename) content, err := os.ReadFile(path) if err != nil { - if componentType == containerComponentType { + if isStrictComponentType(componentType) { return "", false, l.overrideNotFoundError(componentType, command, filename, path, err) } return "", false, nil @@ -107,6 +110,12 @@ func (l *Loader) loadFromConfigOverride(componentType, command string) (string, return string(content), true, nil } +// isStrictComponentType reports whether a configured template override that cannot be read is an +// error for the component type, instead of falling through to the next layer. +func isStrictComponentType(componentType string) bool { + return componentType == containerComponentType || componentType == artifactsComponentType +} + // overrideNotFoundError describes a configured template override that cannot be read. func (l *Loader) overrideNotFoundError(componentType, command, filename, path string, cause error) error { return errUtils.Build(errUtils.ErrCITemplateNotFound). @@ -222,6 +231,8 @@ func (l *Loader) getComponentOverrides(componentType string) map[string]string { return cfg.Helmfile case containerComponentType: return cfg.Container + case artifactsComponentType: + return cfg.Artifacts default: return nil } diff --git a/pkg/ci/templates/loader_strict_test.go b/pkg/ci/templates/loader_strict_test.go new file mode 100644 index 00000000000..d7620282b68 --- /dev/null +++ b/pkg/ci/templates/loader_strict_test.go @@ -0,0 +1,69 @@ +package templates + +import ( + "os" + "path/filepath" + "testing" + "testing/fstest" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/schema" +) + +// TestLoaderStrictComponentTypes asserts that a configured override that does not exist is an error +// for the container and artifacts components, and still falls through for the plugin components. +func TestLoaderStrictComponentTypes(t *testing.T) { + defaults := fstest.MapFS{"templates/summary.md": {Data: []byte("default")}} + base := t.TempDir() + + cases := []struct { + name string + componentType string + templates schema.CITemplatesConfig + wantErr bool + }{ + {"artifacts missing override", "artifacts", schema.CITemplatesConfig{BasePath: base, Artifacts: map[string]string{"summary": "gone.md"}}, true}, + {"container missing override", "container", schema.CITemplatesConfig{BasePath: base, Container: map[string]string{"summary": "gone.md"}}, true}, + {"terraform missing override falls through", "terraform", schema.CITemplatesConfig{BasePath: base, Terraform: map[string]string{"summary": "gone.md"}}, false}, + {"artifacts key unset uses the default", "artifacts", schema.CITemplatesConfig{BasePath: base}, false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + loader := NewLoader(&schema.AtmosConfiguration{CI: schema.CIConfig{Templates: tc.templates}}) + content, err := loader.Load(tc.componentType, "summary", defaults) + if tc.wantErr { + require.ErrorIs(t, err, errUtils.ErrCITemplateNotFound) + return + } + require.NoError(t, err) + assert.Equal(t, "default", content) + }) + } +} + +// TestLoaderArtifactsPrecedence asserts the explicit, convention, default order for artifacts. +func TestLoaderArtifactsPrecedence(t *testing.T) { + defaults := fstest.MapFS{"templates/summary.md": {Data: []byte("default")}} + base := t.TempDir() + require.NoError(t, os.MkdirAll(filepath.Join(base, "artifacts"), 0o755)) + require.NoError(t, os.WriteFile(filepath.Join(base, "artifacts", "summary.md"), []byte("convention"), 0o644)) + require.NoError(t, os.WriteFile(filepath.Join(base, "explicit.md"), []byte("explicit"), 0o644)) + + config := func(artifacts map[string]string) *schema.AtmosConfiguration { + return &schema.AtmosConfiguration{CI: schema.CIConfig{Templates: schema.CITemplatesConfig{BasePath: base, Artifacts: artifacts}}} + } + explicit, err := NewLoader(config(map[string]string{"summary": "explicit.md"})).Load("artifacts", "summary", defaults) + require.NoError(t, err) + assert.Equal(t, "explicit", explicit) + + convention, err := NewLoader(config(nil)).Load("artifacts", "summary", defaults) + require.NoError(t, err) + assert.Equal(t, "convention", convention) + + fallback, err := NewLoader(&schema.AtmosConfiguration{}).Load("artifacts", "summary", defaults) + require.NoError(t, err) + assert.Equal(t, "default", fallback) +} diff --git a/pkg/datafetcher/schema/atmos/config/1.0.json b/pkg/datafetcher/schema/atmos/config/1.0.json index d13ac315ee9..4d8f899218e 100644 --- a/pkg/datafetcher/schema/atmos/config/1.0.json +++ b/pkg/datafetcher/schema/atmos/config/1.0.json @@ -3647,6 +3647,30 @@ } ], "description": "Container maps a container operation name (`image`) to a template file name under base_path." + }, + "artifacts": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object" + }, + { + "type": "null" + }, + { + "$ref": "#/$defs/yamlFunction" + } + ], + "description": "Artifacts maps an artifact operation name (`summary` for the whole report frame, or an action\nsuch as `publish`, `pull`, `copy`, `delete`, `sign`, `verify`, `inspect`, `show`, `list`, or\n`search` for one operation's section) to a template file name under base_path. A configured\nfile that does not exist is an error; the built-in template is used only when the key is unset." } }, "type": "object", diff --git a/pkg/git/hooks/steps.go b/pkg/git/hooks/steps.go index 28cc5dd134f..c89039f9d12 100644 --- a/pkg/git/hooks/steps.go +++ b/pkg/git/hooks/steps.go @@ -70,6 +70,8 @@ func runSteps(name string, entry schema.GitHookEntry, args []string, opts []RunO } vars := step.NewVariables() vars.SetAtmosConfig(options.config) + // Artifact steps record into one CI report that is written after the hook ends, even on failure. + defer vars.UseArtifactReport(options.config)() if err := vars.ApplyTemplateDelimiters(options.config); err != nil { return wrapHookError(name, err) } diff --git a/pkg/hooks/step_artifact_report_test.go b/pkg/hooks/step_artifact_report_test.go new file mode 100644 index 00000000000..74f1258f335 --- /dev/null +++ b/pkg/hooks/step_artifact_report_test.go @@ -0,0 +1,106 @@ +package hooks + +import ( + "errors" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" +) + +// reportFiles enables CI reporting for the fixture and points the generic CI provider at files. +func reportFiles(t *testing.T, f *wiretest.Fixture) (summary, outputs string) { + t.Helper() + dir := t.TempDir() + summary, outputs = filepath.Join(dir, "summary.md"), filepath.Join(dir, "output.txt") + // A real CI runner advertises its own provider, which would receive the output instead of the files. + t.Setenv("GITHUB_ACTIONS", "") + t.Setenv("ATMOS_CI", "true") + t.Setenv("ATMOS_CI_SUMMARY", summary) + t.Setenv("ATMOS_CI_OUTPUT", outputs) + f.Config.CI.Enabled = true + return summary, outputs +} + +func readFile(t *testing.T, path string) string { + t.Helper() + content, err := os.ReadFile(path) + if os.IsNotExist(err) { + return "" + } + require.NoError(t, err) + return string(content) +} + +func TestArtifactStepHookWritesOneReportAndTheHookRendersNothing(t *testing.T) { + f := wiretest.New(t) + summary, outputs := reportFiles(t, f) + require.NoError(t, os.WriteFile(summary, []byte("## Unrelated earlier content\n"), 0o644)) + h := artifactHooks(f, nil) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + content := readFile(t, summary) + assert.Equal(t, 1, strings.Count(content, "## Artifacts"), "one report per hook run") + assert.Equal(t, 1, strings.Count(content, "### ✅ 1. Publish"), "one section per operation, no second copy") + assert.True(t, strings.HasPrefix(content, "## Unrelated earlier content\n"), "existing summary content remains") + assert.Contains(t, readFile(t, outputs), "artifact_ref=team/app:1.0.0") + + // The hook output itself carries no Markdown body, so the hook bridge cannot render a duplicate. + hook := artifactHooks(f, nil).items["backup"] + ctx := stepExecContext(&hook) + ctx.AtmosConfig = f.Config + out, err := stepEngine{}.Run(ctx) + require.NoError(t, err) + assert.Nil(t, out.Artifact, "the hook output has no artifact body to render") + require.NotNil(t, out.Summary) + assert.Empty(t, out.Summary.Body) +} + +func TestArtifactStepHookFailureStillWritesTheReport(t *testing.T) { + f := wiretest.New(t) + summary, _ := reportFiles(t, f) + f.Recorder.FailPublications(1, errors.New("repository unavailable")) + h := artifactHooks(f, func(hook *Hook) { hook.OnFailure = OnFailureWarn }) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + content := readFile(t, summary) + assert.Contains(t, content, "1 operation: 1 failed.") + assert.Contains(t, content, "repository unavailable") +} + +func TestArtifactStepHookRetryReportsTheFinalAttemptOnce(t *testing.T) { + f := wiretest.New(t) + summary, _ := reportFiles(t, f) + f.Recorder.FailPublications(2, errors.New("temporary registry failure")) + h := artifactHooks(f, func(hook *Hook) { + hook.Retry = retryOf(3) + hook.OnFailure = OnFailureFail + }) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + content := readFile(t, summary) + assert.Contains(t, content, "1 operation: 1 succeeded.") + assert.Contains(t, content, "**Attempts:** 3") + assert.NotContains(t, content, "temporary registry failure") +} + +func TestArtifactStepHookReportingHonorsTheCIGates(t *testing.T) { + f := wiretest.New(t) + summary, outputs := reportFiles(t, f) + f.Config.CI.Enabled = false + h := artifactHooks(f, nil) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + assert.Empty(t, readFile(t, summary), "ci.enabled=false writes no summary") + assert.Empty(t, readFile(t, outputs), "ci.enabled=false writes no output variables") + require.Len(t, f.Recorder.Requests(), 1, "the publication itself still ran") +} diff --git a/pkg/hooks/step_artifact_test.go b/pkg/hooks/step_artifact_test.go new file mode 100644 index 00000000000..a4bdce2e410 --- /dev/null +++ b/pkg/hooks/step_artifact_test.go @@ -0,0 +1,165 @@ +package hooks + +import ( + "errors" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifactwire/wiretest" + "github.com/cloudposse/atmos/pkg/schema" +) + +// artifactHooks builds a component's hooks with one artifact step hook, as the stack manifest +// would declare it: +// +// hooks: +// backup: +// events: [after-terraform-apply] +// kind: step +// type: artifact +// with: {action: publish, source: ..., repository: dir, ...} +func artifactHooks(f *wiretest.Fixture, mutate func(*Hook)) *Hooks { + hook := Hook{ + Kind: stepKindName, + Type: "artifact", + Events: []string{string(AfterTerraformApply)}, + With: f.StepFields(), + } + if mutate != nil { + mutate(&hook) + } + info := &schema.ConfigAndStacksInfo{ComponentFromArg: "vpc", Stack: "dev", ComponentType: "terraform"} + return &Hooks{config: f.Config, info: info, items: map[string]Hook{"backup": hook}} +} + +func retryOf(attempts int) *schema.RetryConfig { + delay := time.Millisecond + return &schema.RetryConfig{MaxAttempts: &attempts, BackoffStrategy: schema.BackoffConstant, InitialDelay: &delay} +} + +func TestArtifactStepHookMatchesTheSharedImplementation(t *testing.T) { + f := wiretest.New(t) + h := artifactHooks(f, nil) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + results := f.Recorder.Results() + require.Len(t, results, 1) + baseline := f.Baseline(t) + assert.Equal(t, f.Normalize(&baseline.OperationResult), f.Normalize(&results[0]), "the hook reports what the CLI implementation reports") + assert.Equal(t, artifact.OutcomeCreated, results[0].Outcome) + assert.Contains(t, results[0].Location, f.Root, "the repository root is the configured one") + + requests := f.Recorder.Requests() + require.Len(t, requests, 1) + assert.Equal(t, f.Source, requests[0].Source, "an absolute source stays as written") + assert.Equal(t, map[string]string{"team": "platform"}, requests[0].Metadata.Labels) + assert.Zero(t, requests[0].Execution.MaxAttempts, "no retry: the service keeps its transport retries") +} + +func TestArtifactStepHookResolvesRelativeSourceAgainstTheComponentDirectory(t *testing.T) { + f := wiretest.New(t) + component := filepath.Join(t.TempDir(), "components", "terraform", "vpc") + h := artifactHooks(f, func(hook *Hook) { + with := f.StepFields() + with["source"] = "dist" + with["working_directory"] = component + hook.With = with + }) + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + requests := f.Recorder.Requests() + require.Len(t, requests, 1) + assert.Equal(t, filepath.Join(component, "dist"), requests[0].Source) +} + +func TestArtifactStepHookRetryKeepsTheOperationIdentity(t *testing.T) { + f := wiretest.New(t) + f.Recorder.FailPublications(2, errors.New("temporary registry failure")) + h := artifactHooks(f, func(hook *Hook) { + hook.Retry = retryOf(3) + hook.OnFailure = OnFailureFail + }) + + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + + requests := f.Recorder.Requests() + require.Len(t, requests, 3) + for _, request := range requests { + assert.Equal(t, requests[0].Execution, request.Execution, "every attempt is the same logical operation") + assert.Equal(t, 1, request.Execution.MaxAttempts, "the hook's retries and the transport retries do not multiply") + } + results := f.Recorder.Results() + require.Len(t, results, 3) + assert.Equal(t, artifact.OutcomeCreated, results[2].Outcome, "the final attempt reports the outcome") + assert.Equal(t, wiretest.OperationID, results[0].OperationID) +} + +func TestArtifactStepHookFailureModes(t *testing.T) { + broken := errors.New("repository unavailable") + tests := []struct { + name string + onFailure string + wantErr bool + }{ + {"fail propagates the error", OnFailureFail, true}, + {"warn logs and continues", OnFailureWarn, false}, + {"ignore swallows the error", OnFailureIgnore, false}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + f := wiretest.New(t) + f.Recorder.FailPublications(1, broken) + h := artifactHooks(f, func(hook *Hook) { hook.OnFailure = tc.onFailure }) + err := h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil) + if tc.wantErr { + require.ErrorIs(t, err, broken) + } else { + require.NoError(t, err) + } + require.Len(t, f.Recorder.Requests(), 1, "the failed operation was attempted once") + assert.Empty(t, f.Recorder.Results()[0].Outcome) + }) + } +} + +func TestArtifactStepHookHonorsEventsAndConditions(t *testing.T) { + t.Run("a different event does not run the hook", func(t *testing.T) { + f := wiretest.New(t) + h := artifactHooks(f, nil) + require.NoError(t, h.RunAll(BeforeTerraformApply, f.Config, h.info, nil, nil)) + assert.Empty(t, f.Recorder.Requests()) + }) + t.Run("the default condition skips the hook after a failed operation", func(t *testing.T) { + f := wiretest.New(t) + h := artifactHooks(f, nil) + h.SetOutcome(Outcome{Status: RunFailure, Err: errors.New("apply failed"), ExitCode: 1}) + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + assert.Empty(t, f.Recorder.Requests()) + }) + t.Run("when: always runs the hook after a failed operation", func(t *testing.T) { + f := wiretest.New(t) + h := artifactHooks(f, func(hook *Hook) { hook.When = schema.MustCondition(schema.ConditionPredicateAlways) }) + h.SetOutcome(Outcome{Status: RunFailure, Err: errors.New("apply failed"), ExitCode: 1}) + require.NoError(t, h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil)) + assert.Len(t, f.Recorder.Requests(), 1) + }) +} + +func TestArtifactStepHookRejectsInvalidFieldCombinations(t *testing.T) { + f := wiretest.New(t) + h := artifactHooks(f, func(hook *Hook) { + with := f.StepFields() + with["destination"] = "./out" // pull's field, not publish's. + hook.With = with + hook.OnFailure = OnFailureFail + }) + err := h.RunAll(AfterTerraformApply, f.Config, h.info, nil, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "destination") + assert.Empty(t, f.Recorder.Requests(), "an invalid step never reaches the service") +} diff --git a/pkg/hooks/step_engine.go b/pkg/hooks/step_engine.go index f0709e60631..a2514418ffa 100644 --- a/pkg/hooks/step_engine.go +++ b/pkg/hooks/step_engine.go @@ -12,6 +12,7 @@ import ( yaml "gopkg.in/yaml.v3" errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/artifact/report" log "github.com/cloudposse/atmos/pkg/logger" "github.com/cloudposse/atmos/pkg/perf" "github.com/cloudposse/atmos/pkg/retry" @@ -78,6 +79,9 @@ func (stepEngine) Run(ctx *ExecContext) (*Output, error) { return nil, err } vars := stepVariables(ctx) + // A hook reuses the runner's artifact report: the step handler records the operation, and the + // report is written once after the hook, so the hook output itself carries no second copy. + defer vars.UseArtifactReport(ctx.AtmosConfig)() ws, err := stepFromHookWithVariables(ctx, vars) if err != nil { return nil, err @@ -244,12 +248,18 @@ func (stepsEngine) Run(ctx *ExecContext) (*Output, error) { return nil, err } + // One report session spans every attempt of the hook, so the report is written once, after the + // last attempt, and never by the hook output itself. + artifactReport := report.NewSession(ctx.AtmosConfig) + defer artifactReport.FlushAndLog() + var lastResult *runnerstep.StepResult run := func() error { lastResult = nil // A retry is a fresh invocation of the step list. Neither template nor // process environment values from a failed attempt may leak into it. vars := stepVariables(ctx) + vars.SetArtifactCollector(artifactReport) executor := runnerstep.NewStepExecutorWithVars(vars) runCtx := context.Background() if ctx.Stdout != nil || ctx.Stderr != nil { diff --git a/pkg/manifest/include.go b/pkg/manifest/include.go index 7a9798516c4..103eff54b3d 100644 --- a/pkg/manifest/include.go +++ b/pkg/manifest/include.go @@ -16,6 +16,7 @@ type LoadOptions struct { includeAtmosConfig *schema.AtmosConfiguration includeFile string consumedPaths *[]string + includeRoot string } // LoadOption configures an optional Load behavior. @@ -50,6 +51,12 @@ func WithIncludeResolution(atmosConfig *schema.AtmosConfiguration, file string, } } +// WithIncludeRoot confines local includes to root when resolving a manifest. +func WithIncludeRoot(root string) LoadOption { + defer perf.Track(nil, "manifest.WithIncludeRoot")() + return func(o *LoadOptions) { o.includeRoot = root } +} + // resolveIncludeTags resolves every tag scaffold.yaml supports (see // utils.ScaffoldTagPolicy) found anywhere in data's document tree, // returning the re-serialized, fully resolved YAML bytes. Walks via the @@ -61,7 +68,7 @@ func WithIncludeResolution(atmosConfig *schema.AtmosConfiguration, file string, // manifest load has no business invoking) is a hard error naming the tag, // never silently left unresolved or deferred to a phase scaffold.yaml has // none of. -func resolveIncludeTags(atmosConfig *schema.AtmosConfiguration, data []byte, file string, consumedPaths *[]string) ([]byte, error) { +func resolveIncludeTags(atmosConfig *schema.AtmosConfiguration, data []byte, file string, consumedPaths *[]string, includeRoot string) ([]byte, error) { defer perf.Track(atmosConfig, "manifest.resolveIncludeTags")() var doc yaml.Node @@ -75,6 +82,16 @@ func resolveIncludeTags(atmosConfig *schema.AtmosConfiguration, data []byte, fil policy := utils.ScaffoldTagPolicy(func(path string) { recordConsumedPath(consumedPaths, path) }) + if includeRoot != "" { + var err error + policy, err = confineScaffoldIncludes(policy, includeRoot, utils.LocalIncludeFile) + if err != nil { + return nil, errUtils.Build(errUtils.ErrManifestIncludeRoot). + WithCause(err). + WithExplanationf("Cannot confine includes to `%s`", includeRoot). + Err() + } + } if err := utils.WalkYAMLTags(atmosConfig, &doc, file, policy); err != nil { return nil, err } diff --git a/pkg/manifest/include_confine.go b/pkg/manifest/include_confine.go new file mode 100644 index 00000000000..246c66bb66f --- /dev/null +++ b/pkg/manifest/include_confine.go @@ -0,0 +1,82 @@ +package manifest + +import ( + "fmt" + "path/filepath" + "strings" + + "gopkg.in/yaml.v3" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/function/parser" + "github.com/cloudposse/atmos/pkg/schema" + "github.com/cloudposse/atmos/pkg/utils" +) + +// localIncludeResolver maps an !include path to the local file it names, or "" for a remote +// include. It is injected so the confinement owns the boundary policy while the include +// resolution rules stay with the loader that defines them. +type localIncludeResolver func(includeFile, manifestFile string, atmosConfig *schema.AtmosConfiguration) string + +// confineScaffoldIncludes wraps the local include handlers of policy with a publication-root +// boundary: an include that resolves outside root, or that a forced go-getter source could +// use to read a local file, is rejected. +func confineScaffoldIncludes(policy utils.TagWalkPolicy, root string, resolve localIncludeResolver) (utils.TagWalkPolicy, error) { + realRoot, err := filepath.EvalSymlinks(root) + if err != nil { + return policy, err + } + realRoot, err = filepath.Abs(realRoot) + if err != nil { + return policy, err + } + for _, tag := range []string{utils.AtmosYamlFuncInclude, utils.AtmosYamlFuncIncludeRaw} { + next := policy.Handlers[tag] + policy.Handlers[tag] = func(ctx utils.TagContext, node *yaml.Node, val string) (bool, error) { + if err := checkScaffoldInclude(realRoot, &ctx, val, resolve); err != nil { + return false, err + } + return next(ctx, node, val) + } + } + return policy, nil +} + +func checkScaffoldInclude(root string, ctx *utils.TagContext, val string, resolve localIncludeResolver) error { + parsed, err := parser.ParseInclude(val) + if err != nil { + return err + } + // Forced go-getter sources may disguise local files as remote includes. + // A local getter must not bypass the publication-root check below. + if localGetterInclude(parsed.Path) { + return fmt.Errorf("%w: local getter include %q is not allowed during scaffold publication", errUtils.ErrArtifactScaffoldInvalid, parsed.Path) + } + local := resolve(parsed.Path, ctx.File, ctx.AtmosConfig) + if local == "" { + return nil + } + resolved, err := filepath.EvalSymlinks(local) + if err != nil { + return err + } + if outsideRoot(root, resolved) { + return fmt.Errorf("%w: include %q lies outside the scaffold publication root", errUtils.ErrArtifactScaffoldInvalid, parsed.Path) + } + return nil +} + +// outsideRoot reports whether path lies outside root. +func outsideRoot(root, path string) bool { + rel, err := filepath.Rel(root, path) + return err != nil || rel == ".." || strings.HasPrefix(rel, ".."+string(filepath.Separator)) || filepath.IsAbs(rel) +} + +func localGetterInclude(path string) bool { + lower := strings.ToLower(path) + if strings.Contains(lower, "file://") || strings.HasPrefix(lower, "file::") { + return true + } + _, source, forced := strings.Cut(path, "::") + return forced && (filepath.IsAbs(source) || strings.HasPrefix(source, ".")) +} diff --git a/pkg/manifest/include_root_test.go b/pkg/manifest/include_root_test.go new file mode 100644 index 00000000000..733665909b0 --- /dev/null +++ b/pkg/manifest/include_root_test.go @@ -0,0 +1,149 @@ +package manifest + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + errUtils "github.com/cloudposse/atmos/errors" + "github.com/cloudposse/atmos/pkg/schema" +) + +const includeRootManifest = `apiVersion: atmos/v1 +kind: AtmosTestConfig +metadata: + name: x +spec: + source: embedded + values: !include ./greeting.yaml +` + +func loadWithIncludeRoot(t *testing.T, dir, root string) error { + t.Helper() + registerTestKind(t) + atmosConfig := &schema.AtmosConfiguration{BasePath: dir, BasePathAbsolute: dir} + _, err := Load[testSpec](testKind, []byte(includeRootManifest), + WithIncludeResolution(atmosConfig, filepath.Join(dir, "manifest.yaml"), nil), + WithIncludeRoot(root)) + return err +} + +// A publication root that cannot be resolved is a manifest error naming the root, with the +// filesystem cause preserved. +func TestLoad_WithIncludeRoot_MissingRootIsManifestError(t *testing.T) { + dir := t.TempDir() + writeIncludeFixture(t, dir, "greeting.yaml", "hello: world\n") + missing := filepath.Join(dir, "does-not-exist") + + err := loadWithIncludeRoot(t, dir, missing) + + require.ErrorIs(t, err, errUtils.ErrManifestIncludeRoot) + assert.Contains(t, err.Error(), missing) +} + +// A resolvable root admits includes inside it. +func TestLoad_WithIncludeRoot_AllowsIncludeInsideRoot(t *testing.T) { + dir := t.TempDir() + writeIncludeFixture(t, dir, "greeting.yaml", "hello: world\n") + + require.NoError(t, loadWithIncludeRoot(t, dir, dir)) +} + +func writeOutsideInclude(t *testing.T) string { + t.Helper() + parent := t.TempDir() + dir := filepath.Join(parent, "scaffold") + require.NoError(t, os.Mkdir(dir, 0o755)) + writeIncludeFixture(t, parent, "greeting.yaml", "hello: world\n") + return dir +} + +func loadIncludeRootWith(t *testing.T, dir, includePath string) error { + t.Helper() + registerTestKind(t) + data := []byte(strings.Replace(includeRootManifest, "./greeting.yaml", includePath, 1)) + atmosConfig := &schema.AtmosConfiguration{BasePath: dir, BasePathAbsolute: dir} + _, err := Load[testSpec](testKind, data, + WithIncludeResolution(atmosConfig, filepath.Join(dir, "manifest.yaml"), nil), + WithIncludeRoot(dir)) + return err +} + +// An include that climbs out of the publication root is rejected as an invalid scaffold. +func TestLoad_WithIncludeRoot_RejectsIncludeOutsideRoot(t *testing.T) { + err := loadIncludeRootWith(t, writeOutsideInclude(t), "../greeting.yaml") + + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) + assert.Contains(t, err.Error(), "outside the scaffold publication root") +} + +// A symlink inside the root that points outside it is judged by its target. +func TestLoad_WithIncludeRoot_RejectsSymlinkEscapingRoot(t *testing.T) { + dir := writeOutsideInclude(t) + if err := os.Symlink(filepath.Join(filepath.Dir(dir), "greeting.yaml"), filepath.Join(dir, "greeting.yaml")); err != nil { + t.Skipf("symlinks are unavailable: %v", err) + } + + err := loadWithIncludeRoot(t, dir, dir) + + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) +} + +// A forced local go-getter source cannot bypass the boundary. +func TestLoad_WithIncludeRoot_RejectsLocalGetterInclude(t *testing.T) { + err := loadIncludeRootWith(t, t.TempDir(), "file::./greeting.yaml") + + require.ErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid) + assert.Contains(t, err.Error(), "local getter include") +} + +func TestOutsideRoot(t *testing.T) { + root := filepath.Join(t.TempDir(), "root") + tests := []struct { + name string + path string + want bool + }{ + {"root itself", root, false}, + {"child", filepath.Join(root, "a", "b.yaml"), false}, + {"sibling", filepath.Join(filepath.Dir(root), "other"), true}, + {"parent", filepath.Dir(root), true}, + {"prefix lookalike", root + "-x", true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, outsideRoot(root, tt.path)) + }) + } +} + +// An include whose argument cannot be parsed, or whose local file cannot be resolved, fails the +// load instead of slipping past the boundary check unexamined. +func TestLoad_WithIncludeRoot_RejectsUnresolvableIncludes(t *testing.T) { + tests := []struct { + name string + includePath string + contains string + }{ + {name: "missing local file", includePath: "./absent.yaml", contains: "absent.yaml"}, + {name: "unterminated quote", includePath: `"./greeting.yaml`}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + dir := t.TempDir() + writeIncludeFixture(t, dir, "greeting.yaml", "hello: world\n") + + err := loadIncludeRootWith(t, dir, tt.includePath) + + require.Error(t, err) + assert.NotErrorIs(t, err, errUtils.ErrArtifactScaffoldInvalid, "not a boundary violation") + if tt.contains != "" { + assert.Contains(t, err.Error(), tt.contains) + } + }) + } +} diff --git a/pkg/manifest/load.go b/pkg/manifest/load.go index fd14e5dfe54..8e793001f91 100644 --- a/pkg/manifest/load.go +++ b/pkg/manifest/load.go @@ -50,7 +50,7 @@ func Load[S any](kind string, data []byte, opts ...LoadOption) (*Manifest[S], er opt(&options) } if options.includeAtmosConfig != nil { - resolved, err := resolveIncludeTags(options.includeAtmosConfig, data, options.includeFile, options.consumedPaths) + resolved, err := resolveIncludeTags(options.includeAtmosConfig, data, options.includeFile, options.consumedPaths, options.includeRoot) if err != nil { return nil, err } diff --git a/pkg/process/process_group_test.go b/pkg/process/process_group_test.go index 7fbbc219613..38513c24775 100644 --- a/pkg/process/process_group_test.go +++ b/pkg/process/process_group_test.go @@ -43,8 +43,10 @@ const ( // the child is killed, and then sleeps. modeHolder = "holder" // Mode detach spawns a grandchild that inherits stdout and keeps running, - // then exits 0 immediately. + // then waits for release and exits 0. modeDetach = "detach" + // Mode delayedDetach simulates startup slower than the drain budget. + modeDelayedDetach = "delayed-detach" helperSleep = 30 * time.Second pidWait = 10 * time.Second @@ -82,8 +84,14 @@ func runProcessHelper(mode string) { case modeInput: writePIDFile(dir, "child") _, _ = io.Copy(io.Discard, os.Stdin) - case modeDetach: + case modeDetach, modeDelayedDetach: + if mode == modeDelayedDetach { + time.Sleep(childShutdownGrace + 4*time.Second) + } spawnGrandchild(modeSleep, true) + writePIDFile(dir, "parent") + // Wait for the test to release us after both processes have started. + _, _ = io.Copy(io.Discard, os.Stdin) case "script-output": for range 100 { _, _ = io.WriteString(os.Stdout, "STDOUT\n") @@ -489,20 +497,82 @@ func TestStdinIsTerminal(t *testing.T) { assert.False(t, stdinIsTerminal(f), "a regular file is not a terminal") } +// awaitOutputDrain applies the same five-second bound to both real and deliberately unbounded drains. +func awaitOutputDrain(done <-chan runOutcome) (Result, bool) { + timer := time.NewTimer(childShutdownGrace + 3*time.Second) + defer timer.Stop() + select { + case outcome := <-done: + return outcome.result, true + case <-timer.C: + return Result{}, false + } +} + func TestRun_BackgroundedOutputHolderDoesNotHangOrFail(t *testing.T) { + skipOnWindows(t) + for _, mode := range []string{modeDetach, modeDelayedDetach} { + t.Run(mode, func(t *testing.T) { + dir := t.TempDir() + killAtCleanup(t, dir, "child") + var out bytes.Buffer + reader, writer, err := os.Pipe() + require.NoError(t, err) + t.Cleanup(func() { _ = reader.Close(); _ = writer.Close() }) + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + spec := helperSpec(t, mode, dir, &out) + spec.Streams.Stdin = reader + started := time.Now() + done := runAsync(ctx, &spec) + waitForPID(t, dir, "parent") + child := waitForPID(t, dir, "child") + if mode == modeDelayedDetach { + require.Greater(t, time.Since(started), childShutdownGrace+3*time.Second, "startup exceeds the drain budget") + } + + // Measure the bounded pipe drain after both helpers start, not process startup under load. + start := time.Now() + require.NoError(t, writer.Close()) + res, completed := awaitOutputDrain(done) + require.True(t, completed, "output drain must finish within the five-second bound") + assert.True(t, res.Success(), "exit 0 must stay a success even if a grandchild holds stdout: %v", res.Err) + assert.Less(t, time.Since(start), childShutdownGrace+3*time.Second) + assert.False(t, processGone(child), "the deliberately detached grandchild stays alive") + }) + } +} + +func TestOutputDrainDeadlineRejectsUnboundedPipe(t *testing.T) { skipOnWindows(t) dir := t.TempDir() killAtCleanup(t, dir, "child") - + reader, writer, err := os.Pipe() + require.NoError(t, err) + t.Cleanup(func() { _ = reader.Close(); _ = writer.Close() }) + spec := helperSpec(t, modeDetach, dir, nil) + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + cmd := exec.CommandContext(ctx, spec.Command) + cmd.Dir, cmd.Env, cmd.Stdin = spec.Dir, spec.Env, reader var out bytes.Buffer - start := time.Now() - res := awaitRun(t, runAsync(context.Background(), ptr(helperSpec(t, modeDetach, dir, &out)))) - - assert.True(t, res.Success(), "exit 0 must stay a success even if a grandchild holds stdout: %v", res.Err) - assert.Less(t, time.Since(start), childShutdownGrace+3*time.Second) - // The deliberately detached grandchild is left alone on a normal exit. + cmd.Stdout = &out // A non-file writer makes os/exec copy from a pipe held open by the grandchild. + require.NoError(t, cmd.Start()) + done := make(chan runOutcome, 1) + go func() { done <- runOutcome{result: Result{Err: cmd.Wait()}} }() + waitForPID(t, dir, "parent") child := waitForPID(t, dir, "child") - assert.False(t, processGone(child)) + require.NoError(t, writer.Close()) + _, completed := awaitOutputDrain(done) + assert.False(t, completed, "an unbounded drain must fail the same five-second check") + process, err := os.FindProcess(child) + require.NoError(t, err) + require.NoError(t, process.Kill()) + select { + case <-done: + case <-time.After(goneWait): + t.Fatal("unbounded drain did not end after the pipe holder was killed") + } } func TestTolerateWaitDelay(t *testing.T) { diff --git a/pkg/process/process_group_unix_test.go b/pkg/process/process_group_unix_test.go index 0015e6788f9..142db6152e4 100644 --- a/pkg/process/process_group_unix_test.go +++ b/pkg/process/process_group_unix_test.go @@ -3,6 +3,7 @@ package process import ( + "context" "errors" "os" "os/exec" @@ -68,3 +69,27 @@ func TestProcessGoneRecognizesUnreapedChild(t *testing.T) { require.Eventually(t, func() bool { return processGone(pid) }, goneWait, 25*time.Millisecond, "a killed, unreaped child must not be mistaken for a running process") } + +func TestRunShellSession_CancellationKillsDescendants(t *testing.T) { + dir := t.TempDir() + killAtCleanup(t, dir, "parent", "child") + exe, err := os.Executable() + require.NoError(t, err) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + done := make(chan error, 1) + go func() { + done <- RunShellSession(ctx, &ShellSessionSpec{Command: shellQuoteArg(exe), Env: append(os.Environ(), helperModeEnv+"="+modeStubbornParent, helperPIDDirEnv+"="+dir)}) + }() + parent := waitForPID(t, dir, "parent") + child := waitForPID(t, dir, "child") + cancel() + select { + case err := <-done: + require.Error(t, err) + case <-time.After(childExitCleanupWait + 5*time.Second): + t.Fatal("session did not stop after cancellation") + } + requireGone(t, parent, "session child") + require.True(t, processGone(child), "stubborn descendant must stop before the session returns") +} diff --git a/pkg/process/shell_session.go b/pkg/process/shell_session.go index 6d7dce11d77..e9bfd0a86db 100644 --- a/pkg/process/shell_session.go +++ b/pkg/process/shell_session.go @@ -105,14 +105,16 @@ func RunShellSession(ctx context.Context, spec *ShellSessionSpec) error { } env = append(append([]string{}, env...), fmt.Sprintf("ATMOS_SHLVL=%d", shellLevel)) - cmd := NewShellCommand(ctx, spec.Command) + executionCtx, cancel := context.WithCancel(ctx) + defer cancel() + cmd := NewShellCommand(executionCtx, spec.Command) cmd.Dir = spec.Dir cmd.Env = env if spec.TTY && pty.IsSupported() { return sessionExitError(runSessionPTY(ctx, cmd, spec)) } - return sessionExitError(runSessionAttached(cmd, spec)) + return sessionExitError(runSessionAttached(ctx, cmd, spec, cancel)) } // sessionShell returns the system shell and its command flag used to @@ -140,7 +142,7 @@ func runSessionPTY(ctx context.Context, cmd *exec.Cmd, spec *ShellSessionSpec) e // runSessionAttached runs the command with the real standard streams // inherited directly (no PTY). Used on platforms without PTY support. // Masking cannot be applied to inherited file descriptors. -func runSessionAttached(cmd *exec.Cmd, spec *ShellSessionSpec) error { +func runSessionAttached(ctx context.Context, cmd *exec.Cmd, spec *ShellSessionSpec, cancel context.CancelFunc) error { if spec.EnableMasking { if spec.TTY { // A PTY was requested but is unavailable on this platform - the @@ -160,10 +162,14 @@ func runSessionAttached(cmd *exec.Cmd, spec *ShellSessionSpec) error { cmd.Stdin = os.Stdin } + group := newChildGroup(cmd) if err := cmd.Start(); err != nil { return fmt.Errorf(errUtils.ErrWrapFormat, errUtils.ErrProcessStartFailed, err) } - return cmd.Wait() + group.started(cancel) + err := group.tolerateWaitDelay(ctx, cmd.Wait()) + group.finished() + return err } // sessionExitError normalizes session errors: non-zero exits become diff --git a/pkg/process/shell_session_test.go b/pkg/process/shell_session_test.go index ea5fe278698..15789248bd6 100644 --- a/pkg/process/shell_session_test.go +++ b/pkg/process/shell_session_test.go @@ -234,10 +234,12 @@ func TestRunSessionAttachedWarnsWhenMaskingEnabled(t *testing.T) { exe, err := os.Executable() require.NoError(t, err) - cmd := exec.Command(exe, "-test.run=TestShellSessionHelper", "--", "sleep", "1ms") + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + cmd := exec.CommandContext(ctx, exe, "-test.run=TestShellSessionHelper", "--", "sleep", "1ms") cmd.Env = os.Environ() - err = runSessionAttached(cmd, &ShellSessionSpec{EnableMasking: true}) + err = runSessionAttached(ctx, cmd, &ShellSessionSpec{EnableMasking: true}, cancel) require.NoError(t, err) } @@ -263,12 +265,14 @@ func TestRunSessionAttachedWarnsWhenTTYRequested(t *testing.T) { exe, err := os.Executable() require.NoError(t, err) - cmd := exec.Command(exe, "-test.run=TestShellSessionHelper", "--", "sleep", "1ms") + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + cmd := exec.CommandContext(ctx, exe, "-test.run=TestShellSessionHelper", "--", "sleep", "1ms") cmd.Env = os.Environ() // TTY requested but running through the attached fallback: the loss of // masking is unexpected, so the visible warning branch fires. - err = runSessionAttached(cmd, &ShellSessionSpec{TTY: true, EnableMasking: true}) + err = runSessionAttached(ctx, cmd, &ShellSessionSpec{TTY: true, EnableMasking: true}, cancel) require.NoError(t, err) } diff --git a/pkg/project/config/persistence.go b/pkg/project/config/persistence.go index cbe7cffb164..c6889eb49db 100644 --- a/pkg/project/config/persistence.go +++ b/pkg/project/config/persistence.go @@ -21,6 +21,7 @@ import ( type scaffoldLoadOptions struct { sourceDir string includedPaths *[]string + includeRoot string } // ScaffoldLoadOption configures an optional LoadScaffoldConfigFromContent @@ -58,6 +59,12 @@ func WithIncludedPaths(included *[]string) ScaffoldLoadOption { } } +// WithIncludeRoot confines local includes to the given publication root. +func WithIncludeRoot(root string) ScaffoldLoadOption { + defer perf.Track(nil, "config.WithIncludeRoot")() + return func(o *scaffoldLoadOptions) { o.includeRoot = root } +} + // LoadScaffoldConfigFromContent loads and validates an AtmosScaffoldConfig manifest from YAML content. func LoadScaffoldConfigFromContent(content string, opts ...ScaffoldLoadOption) (*ScaffoldConfig, error) { defer perf.Track(nil, "config.LoadScaffoldConfigFromContent")() @@ -77,6 +84,10 @@ func LoadScaffoldConfigFromContent(content string, opts ...ScaffoldLoadOption) ( loadOpts = append(loadOpts, manifest.WithIncludeResolution(atmosConfig, file, options.includedPaths)) } + if options.includeRoot != "" { + loadOpts = append(loadOpts, manifest.WithIncludeRoot(options.includeRoot)) + } + scaffoldConfig, err := manifest.Load[ScaffoldSpec](ScaffoldKind, []byte(content), loadOpts...) if err != nil { return nil, err diff --git a/pkg/provisioner/source/artifact_roundtrip_test.go b/pkg/provisioner/source/artifact_roundtrip_test.go new file mode 100644 index 00000000000..68a86b027f2 --- /dev/null +++ b/pkg/provisioner/source/artifact_roundtrip_test.go @@ -0,0 +1,157 @@ +package source + +import ( + "context" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/fixtures" + "github.com/cloudposse/atmos/pkg/artifact/roundtriptest" + "github.com/cloudposse/atmos/pkg/oci/ocitest" + "github.com/cloudposse/atmos/pkg/schema" +) + +// Compile-time guard for the vendor source fields this test configures. +var _ = schema.VendorComponentSource{Uri: ""} + +const ( + componentName = "components/terraform/vpc" + componentVersion = "1.2.0" + lockFileName = ".terraform.lock.hcl" +) + +// writeTerraformComponent writes a Terraform component with an executable helper, the dependency +// lock file, and every kind of transient Terraform data a working directory accumulates. +func writeTerraformComponent(t *testing.T, dir string) { + t.Helper() + fixtures.WriteFile(t, dir, "main.tf", "resource \"null_resource\" \"vpc\" {}\n", 0o644) + fixtures.WriteFile(t, dir, lockFileName, "# provider lock\n", 0o644) + fixtures.WriteFile(t, dir, "README.md", "# vpc component\n", 0o644) + fixtures.WriteFile(t, dir, "scripts/helper.sh", fixtures.HelperScript, 0o755) + fixtures.WriteFile(t, dir, fixtures.ReservedDir+"/README.md", fixtures.PackageReadme, 0o644) + fixtures.WriteFile(t, dir, fixtures.ReservedDir+"/CHANGELOG.md", fixtures.PackageChangelog, 0o644) + + fixtures.WriteFile(t, dir, ".terraform/providers/provider.bin", "binary\n", 0o755) + fixtures.WriteFile(t, dir, "terraform.tfstate", "{}\n", 0o644) + fixtures.WriteFile(t, dir, "terraform.tfstate.backup", "{}\n", 0o644) + fixtures.WriteFile(t, dir, "deploy.tfplan", "plan\n", 0o644) +} + +// assertProvisionedComponent checks what a provisioned component tree must look like. +func assertProvisionedComponent(t *testing.T, target string) { + t.Helper() + for _, kept := range []string{"main.tf", lockFileName, "README.md", filepath.Join("scripts", "helper.sh")} { + assert.FileExists(t, filepath.Join(target, kept), "%s is part of the component", kept) + } + // NoFileExists passes for a directory, so the provider cache is checked as a directory. + assert.NoDirExists(t, filepath.Join(target, ".terraform"), "the Terraform provider cache is transient data") + for _, transient := range []string{"terraform.tfstate", "terraform.tfstate.backup", "deploy.tfplan"} { + assert.NoFileExists(t, filepath.Join(target, transient), "%s is Terraform transient data", transient) + } + assert.NoDirExists(t, filepath.Join(target, ".atmos"), "distribution metadata must not leak into the provisioned component") + + if fixtures.POSIXModes() { + info, err := os.Stat(filepath.Join(target, "scripts", "helper.sh")) + require.NoError(t, err) + assert.NotZero(t, info.Mode().Perm()&0o100, "the helper script is still executable") + } + content, err := os.ReadFile(filepath.Join(target, lockFileName)) + require.NoError(t, err) + assert.Equal(t, "# provider lock\n", string(content)) +} + +// TestVendorSourceOCI_PublishedComponentRoundTrip publishes a component with `component/terraform`, +// then provisions it through the existing source provisioning path. +func TestVendorSourceOCI_PublishedComponentRoundTrip(t *testing.T) { + reg := roundtriptest.New(t) + src := t.TempDir() + writeTerraformComponent(t, src) + + dryRun, err := reg.Service.Publish(context.Background(), artifact.PublishRequest{ + Repository: roundtriptest.Alias, Source: src, Name: componentName, Version: componentVersion, + Kind: "component/terraform", DryRun: true, + }) + require.NoError(t, err) + var excluded []string + for _, diagnostic := range dryRun.Diagnostics { + if diagnostic.Code == "excluded" { + excluded = append(excluded, diagnostic.Message) + } + } + assert.ElementsMatch(t, []string{ + "excluded .terraform (rule .terraform/**)", + "excluded deploy.tfplan (rule *.tfplan)", + "excluded terraform.tfstate (rule *.tfstate)", + "excluded terraform.tfstate.backup (rule *.tfstate.*)", + }, excluded, "the dry run reports every default exclusion with its rule") + require.Empty(t, reg.Requests(), "a dry run never contacts the registry") + + published := reg.Publish(t, &artifact.PublishRequest{Source: src, Name: componentName, Version: componentVersion, Kind: "component/terraform"}) + require.Equal(t, artifact.OutcomeCreated, published.Outcome) + + target := filepath.Join(t.TempDir(), "components", "terraform", "vpc") + require.NoError(t, VendorSource(context.Background(), nil, &schema.VendorComponentSource{Uri: reg.URI(componentName, componentVersion)}, target)) + + assertProvisionedComponent(t, target) +} + +// TestVendorSourceOCI_GenericFilesKeepRequestedTransientFiles proves the component exclusions are not +// inherited by generic file publishing: a backup of a working directory retains what was requested. +func TestVendorSourceOCI_GenericFilesKeepRequestedTransientFiles(t *testing.T) { + reg := roundtriptest.New(t) + src := t.TempDir() + writeTerraformComponent(t, src) + + reg.Publish(t, &artifact.PublishRequest{Source: src, Name: "backups/vpc", Version: "1.0.0"}) + target := filepath.Join(t.TempDir(), "restored") + require.NoError(t, VendorSource(context.Background(), nil, &schema.VendorComponentSource{Uri: reg.URI("backups/vpc", "1.0.0")}, target)) + + for _, kept := range []string{".terraform/providers/provider.bin", "terraform.tfstate", "terraform.tfstate.backup", "deploy.tfplan", lockFileName} { + assert.FileExists(t, filepath.Join(target, filepath.FromSlash(kept)), "%s was requested and must survive a generic backup", kept) + } + assert.NoDirExists(t, filepath.Join(target, ".atmos"), "distribution metadata never reaches a provisioned tree") +} + +// TestVendorSourceOCI_PublishedComponentDocumentsNeedNoPayload shows that the package README and +// CHANGELOG are read from their own blobs without pulling the payload. +func TestVendorSourceOCI_PublishedComponentDocumentsNeedNoPayload(t *testing.T) { + reg := roundtriptest.New(t) + src := t.TempDir() + writeTerraformComponent(t, src) + reg.Publish(t, &artifact.PublishRequest{Source: src, Name: componentName, Version: componentVersion, Kind: "component/terraform"}) + ref := artifact.Ref{Name: componentName, Version: componentVersion} + inspected, err := reg.Service.Inspect(context.Background(), artifact.InspectRequest{Repository: roundtriptest.Alias, Ref: ref}) + require.NoError(t, err) + require.Len(t, inspected.Inspection.Record.Documents, 2) + require.Len(t, inspected.Inspection.Representation.Payload, 1) + payload := inspected.Inspection.Representation.Payload[0].Digest.String() + reg.ResetRequests() + + readme, err := reg.Service.ShowDocument(context.Background(), artifact.ShowDocumentRequest{Repository: roundtriptest.Alias, Ref: ref, Role: artifact.DocumentReadme}) + require.NoError(t, err) + assert.Equal(t, fixtures.PackageReadme, string(readme.Content)) + changelog, err := reg.Service.ShowDocument(context.Background(), artifact.ShowDocumentRequest{Repository: roundtriptest.Alias, Ref: ref, Role: artifact.DocumentChangelog}) + require.NoError(t, err) + assert.Equal(t, fixtures.PackageChangelog, string(changelog.Content)) + + requests := reg.Requests() + require.NotEmpty(t, requests, "the documents were read from the registry") + for _, request := range requests { + assert.NotContains(t, request, payload, "documentation reads must not fetch the payload blob") + } +} + +// TestVendorSourceOCI_LegacyComponentLayerStillExtracts keeps the pre-existing single tar+gzip +// component format working next to the new Atmos package format. +func TestVendorSourceOCI_LegacyComponentLayerStillExtracts(t *testing.T) { + imageRef := ocitest.NewRegistry(t, "test/legacy-component:v1", map[string]string{"main.tf": "# legacy\n"}) + target := filepath.Join(t.TempDir(), "legacy") + require.NoError(t, VendorSource(context.Background(), nil, &schema.VendorComponentSource{Uri: "oci://" + imageRef}, target)) + assert.FileExists(t, filepath.Join(target, "main.tf")) + assert.NoDirExists(t, filepath.Join(target, ".atmos")) +} diff --git a/pkg/runner/step/artifact.go b/pkg/runner/step/artifact.go index c383bc49179..cbcd7b15f36 100644 --- a/pkg/runner/step/artifact.go +++ b/pkg/runner/step/artifact.go @@ -72,6 +72,7 @@ func (h *ArtifactHandler) Execute(ctx context.Context, step *schema.WorkflowStep if err != nil { return nil, err } + stepKey = vars.artifactScopeOrRoot().key() + "\x00" + stepKey params, retained, err := h.sessionParams(session, stepKey, step, vars) if err != nil { return nil, err @@ -123,8 +124,9 @@ func (h *ArtifactHandler) sessionParams(session *artifactSession, key string, st // attempt into the report collector, and builds the step result. func (h *ArtifactHandler) runOperation(ctx context.Context, step *schema.WorkflowStep, vars *Variables, svc artifact.Service, params *invoke.Params) (*StepResult, error) { session := vars.artifactSession() - key := session.operationKey(step.Name, params) - operation, collector := session.begin(key) + scope := vars.artifactScopeOrRoot() + key := session.operationKey(scope, step.Name, params) + operation, collector := session.begin(key, scope) params.Execution = artifact.Execution{OperationID: operation.id, PreparedAt: operation.preparedAt} if step.Retry != nil { // The wrapper owns the retry budget, so the service makes a single transport attempt. @@ -137,7 +139,7 @@ func (h *ArtifactHandler) runOperation(ctx context.Context, step *schema.Workflo runErr = errors.Join(ctx.Err(), runErr) } session.finish(key, runErr == nil) - collector.Record(&report.Entry{Step: step.Name, OperationID: operation.id, Attempt: operation.attempts, Outcome: outcome, Err: runErr}) + collector.Record(&report.Entry{Step: step.Name, OperationID: operation.id, Action: params.Action, Attempt: operation.attempts, Position: operation.position, Outcome: outcome, Err: runErr}) result := artifactStepResult(params, outcome) if runErr != nil { diff --git a/pkg/runner/step/artifact_report.go b/pkg/runner/step/artifact_report.go new file mode 100644 index 00000000000..8563f97f8a0 --- /dev/null +++ b/pkg/runner/step/artifact_report.go @@ -0,0 +1,57 @@ +package step + +import ( + "github.com/cloudposse/atmos/pkg/artifact/report" + "github.com/cloudposse/atmos/pkg/perf" + "github.com/cloudposse/atmos/pkg/schema" +) + +// UseArtifactReport makes the artifact steps run with these variables report to CI, and returns the +// function that writes the report. The execution boundary that owns the variables (a workflow, a +// custom command, a standalone script, or a hook) calls it once and defers the returned function: +// +// defer vars.UseArtifactReport(config)() +// +// The step handler records every attempt of every artifact operation into the report session; the +// returned function writes one summary and one set of CI outputs, after retries, in scheduled order, +// even when the run failed. A reporting failure is logged and never changes the run's result. +// +// When every ci.* reporting surface is disabled, nothing is installed and the returned function +// does nothing, so the gates cost nothing. When a report session is already installed, the +// boundary that installed it owns the report, so a nested boundary reuses it instead of rendering +// a second copy. +func (v *Variables) UseArtifactReport(config *schema.AtmosConfiguration, options ...report.Option) (flush func()) { + defer perf.Track(config, "step.Variables.UseArtifactReport")() + + session := v.artifactSession() + session.mu.Lock() + _, owned := session.collector.(*report.Session) + session.mu.Unlock() + if owned { + return func() {} + } + + reporting := report.NewSession(config, options...) + if !reporting.Enabled() { + return func() {} + } + v.SetArtifactCollector(reporting) + return reporting.FlushAndLog +} + +// FlushArtifactReport writes the report session installed on these variables, whichever execution +// boundary installed it, and does nothing when no report session is installed. A caller that is +// about to replace the Atmos process calls it first: a successful replacement never returns, so +// the deferred flush of the owning boundary cannot run. The flush drains the buffered entries, so a +// later flush on a normal return, or after a failed replacement, writes nothing twice. +func (v *Variables) FlushArtifactReport() { + defer perf.Track(nil, "step.Variables.FlushArtifactReport")() + + session := v.artifactSession() + session.mu.Lock() + collector := session.collector + session.mu.Unlock() + if reporting, ok := collector.(*report.Session); ok { + reporting.FlushAndLog() + } +} diff --git a/pkg/runner/step/artifact_report_test.go b/pkg/runner/step/artifact_report_test.go new file mode 100644 index 00000000000..18161da4cb0 --- /dev/null +++ b/pkg/runner/step/artifact_report_test.go @@ -0,0 +1,507 @@ +package step + +//go:generate go run go.uber.org/mock/mockgen -typed -destination mock_ci_reporter_test.go -package step github.com/cloudposse/atmos/pkg/ci Reporter + +import ( + "context" + "errors" + "fmt" + "path/filepath" + "regexp" + "sync" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/cloudposse/atmos/pkg/artifact" + "github.com/cloudposse/atmos/pkg/artifact/invoke" + "github.com/cloudposse/atmos/pkg/artifact/report" + "github.com/cloudposse/atmos/pkg/ci" + "github.com/cloudposse/atmos/pkg/schema" + "github.com/cloudposse/atmos/pkg/script" + star "github.com/cloudposse/atmos/pkg/script/starlark" +) + +// summaryRecorder captures what the report session writes through a generated ci.Reporter mock. The +// mock's Summary and Output callbacks record the assertions' state, and any other reporter call fails +// loudly as an unexpected call. +type summaryRecorder struct { + reporter *MockReporter + + mu sync.Mutex + summaries []string + outputs map[string]string + builds int +} + +func newSummaryRecorder(t *testing.T) *summaryRecorder { + t.Helper() + r := &summaryRecorder{reporter: NewMockReporter(gomock.NewController(t))} + r.reporter.EXPECT().Summary(gomock.Any()).DoAndReturn(func(markdown string) (ci.Receipt, error) { + r.mu.Lock() + defer r.mu.Unlock() + r.summaries = append(r.summaries, markdown) + return ci.Receipt{}, nil + }).AnyTimes() + r.reporter.EXPECT().Output(gomock.Any(), gomock.Any()).DoAndReturn(func(key, value string) (ci.Receipt, error) { + r.mu.Lock() + defer r.mu.Unlock() + if r.outputs == nil { + r.outputs = map[string]string{} + } + r.outputs[key] = value + return ci.Receipt{}, nil + }).AnyTimes() + return r +} + +func (r *summaryRecorder) option() report.Option { + return report.WithReporter(func(*schema.AtmosConfiguration) ci.Reporter { + r.builds++ + return r.reporter + }) +} + +func ciEnabled() *schema.AtmosConfiguration { + return &schema.AtmosConfiguration{CI: schema.CIConfig{Enabled: true}} +} + +// publishStep returns a publish step whose input differs by version, so each is its own operation. +func publishStep(name, version string) *schema.WorkflowStep { + step := artifactStepWith(artifact.ActionPublish, invoke.FieldSource, invoke.FieldRepository, invoke.FieldVersion) + step.Name, step.Version = name, version + return step +} + +// expectPublishes makes the service answer every publish with a created result for its version. +func expectPublishes(env *artifactEnv) { + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + op := completeOperation(artifact.ActionPublish, artifact.OutcomeCreated) + op.OperationID, op.Ref = r.Execution.OperationID, "team/app:"+r.Version + return op, nil + }).AnyTimes() +} + +var reportedRefs = regexp.MustCompile("(?m)^### \\S+ \\d+\\. Publish `([^`]+)`$") + +func refsOf(markdown string) []string { + var refs []string + for _, match := range reportedRefs.FindAllStringSubmatch(markdown, -1) { + refs = append(refs, match[1]) + } + return refs +} + +func TestArtifactReport_SequentialStepsProduceOneOrderedReport(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + for _, version := range []string{"1.0.0", "2.0.0", "3.0.0"} { + _, err := env.run(publishStep("publish-"+version, version)) + require.NoError(t, err) + } + assert.Empty(t, recorder.summaries, "nothing is written while steps run") + flush() + + require.Len(t, recorder.summaries, 1, "exactly one report for the whole execution") + assert.Equal(t, []string{"team/app:1.0.0", "team/app:2.0.0", "team/app:3.0.0"}, refsOf(recorder.summaries[0])) + assert.Equal(t, "team/app:3.0.0", recorder.outputs["artifact_ref"]) + assert.Equal(t, "team/app:1.0.0", recorder.outputs["artifact_publish_1_0_0_ref"]) +} + +func TestArtifactReport_RetriesReportTheFinalAttemptOnce(t *testing.T) { + env := newArtifactEnv(t) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + calls := 0 + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + calls++ + if calls < 3 { + return &artifact.OperationResult{OperationID: r.Execution.OperationID, Action: artifact.ActionPublish}, errors.New("temporary registry failure") + } + op := completeOperation(artifact.ActionPublish, artifact.OutcomeCreated) + op.OperationID = r.Execution.OperationID + return op, nil + }).Times(3) + + step := publishStep("publish", "1.0.0") + step.Retry = &schema.RetryConfig{} + for attempt := 1; attempt <= 3; attempt++ { + _, _ = env.run(step) + } + flush() + + require.Len(t, recorder.summaries, 1) + assert.Contains(t, recorder.summaries[0], "1 operation: 1 succeeded.") + assert.Contains(t, recorder.summaries[0], "**Attempts:** 3") + assert.NotContains(t, recorder.summaries[0], "temporary registry failure", "only the final attempt is reported") +} + +func TestArtifactReport_ParallelBranchesFollowTheSchedule(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + _, err := env.run(publishStep("before", "0.0.0")) + require.NoError(t, err) + + // Four branches are scheduled together and finish in the reverse of their scheduled order. + var wg sync.WaitGroup + release := make([]chan struct{}, 4) + finished := make([]chan struct{}, 4) + for index := range release { + release[index], finished[index] = make(chan struct{}), make(chan struct{}) + } + group := env.vars.ScheduleGroup() + for index := range release { + wg.Add(1) + branch := group.ForkAt(index) + go func() { + defer wg.Done() + defer close(finished[index]) + <-release[index] + step := publishStep(fmt.Sprintf("branch-%d", index), fmt.Sprintf("1.%d.0", index)) + step.WorkingDirectory = env.dir + _, runErr := (&ArtifactHandler{}).Execute(context.Background(), step, branch) + assert.NoError(t, runErr) + }() + } + for index := len(release) - 1; index >= 0; index-- { + close(release[index]) + <-finished[index] + } + wg.Wait() + + _, err = env.run(publishStep("after", "9.0.0")) + require.NoError(t, err) + flush() + + require.Len(t, recorder.summaries, 1) + assert.Equal(t, []string{ + "team/app:0.0.0", "team/app:1.0.0", "team/app:1.1.0", "team/app:1.2.0", "team/app:1.3.0", "team/app:9.0.0", + }, refsOf(recorder.summaries[0]), "the group sits between the operation before it and the one after it, in branch order") +} + +func TestArtifactReport_NestedBranchesNestUnderTheirGroup(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + group := env.vars.ScheduleGroup() + outer := group.ForkAt(1) + innerGroup := outer.ScheduleGroup() + inner := innerGroup.ForkAt(0) + innerAfter := innerGroup.ForkAt(1) + for _, run := range []struct { + vars *Variables + version string + }{{innerAfter, "2.1.0"}, {inner, "2.0.0"}, {group.ForkAt(0), "1.0.0"}, {group.ForkAt(2), "3.0.0"}} { + step := publishStep("n-"+run.version, run.version) + step.WorkingDirectory = env.dir + _, err := (&ArtifactHandler{}).Execute(context.Background(), step, run.vars) + require.NoError(t, err) + } + flush() + + assert.Equal(t, []string{"team/app:1.0.0", "team/app:2.0.0", "team/app:2.1.0", "team/app:3.0.0"}, refsOf(recorder.summaries[0])) +} + +func TestArtifactReport_FailureAndCancellationAreReportedByTheDeferredFlush(t *testing.T) { + env := newArtifactEnv(t) + recorder := newSummaryRecorder(t) + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).Return(nil, errors.New("registry unavailable")).Times(2) + + execute := func() { + defer env.vars.UseArtifactReport(ciEnabled(), recorder.option())() + _, err := env.run(publishStep("fails", "1.0.0")) + require.Error(t, err) + ctx, cancel := context.WithCancel(context.Background()) + cancel() + step := publishStep("canceled", "2.0.0") + step.WorkingDirectory = env.dir + _, err = (&ArtifactHandler{}).Execute(ctx, step, env.vars) + require.Error(t, err) + } + execute() + + require.Len(t, recorder.summaries, 1, "the report is written even though the run failed") + assert.Contains(t, recorder.summaries[0], "2 operations: 1 failed, 1 canceled.") + assert.Contains(t, recorder.summaries[0], "registry unavailable") +} + +func TestArtifactReport_DisabledReportingInstallsNothing(t *testing.T) { + cases := map[string]*schema.AtmosConfiguration{ + "nil config": nil, + "ci disabled": {}, + "both gates off": {CI: schema.CIConfig{ + Enabled: true, + Summary: schema.CISummaryConfig{Enabled: ptrTo(false)}, + Output: schema.CIOutputConfig{Enabled: ptrTo(false)}, + }}, + } + for name, config := range cases { + t.Run(name, func(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + env.vars.SetArtifactCollector(nil) + flush := env.vars.UseArtifactReport(config, recorder.option()) + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + flush() + assert.Zero(t, recorder.builds, "no reporter is built when every surface is disabled") + assert.Empty(t, recorder.summaries) + assert.IsType(t, report.Discard{}, env.vars.artifactSession().collector) + }) + } +} + +func ptrTo[T any](value T) *T { return &value } + +func TestArtifactReport_NestedBoundaryReusesTheOwnersSession(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + outer := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + inner := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + inner() + assert.Empty(t, recorder.summaries, "a nested boundary does not write a second copy") + outer() + require.Len(t, recorder.summaries, 1) + outer() + assert.Len(t, recorder.summaries, 1, "flushing twice never repeats the report") +} + +func TestArtifactReport_ConcurrentRecordingIsRaceFree(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + var wg sync.WaitGroup + group := env.vars.ScheduleGroup() + for index := 0; index < 8; index++ { + wg.Add(1) + branch := group.ForkAt(index) + go func() { + defer wg.Done() + step := publishStep(fmt.Sprintf("b%d", index), fmt.Sprintf("1.%d.0", index)) + step.WorkingDirectory = env.dir + _, err := (&ArtifactHandler{}).Execute(context.Background(), step, branch) + assert.NoError(t, err) + }() + } + wg.Wait() + flush() + require.Len(t, recorder.summaries, 1) + want := make([]string, 8) + for index := range want { + want[index] = fmt.Sprintf("team/app:1.%d.0", index) + } + assert.Equal(t, want, refsOf(recorder.summaries[0])) +} + +func TestArtifactReport_FlushArtifactReportWritesTheInstalledSession(t *testing.T) { + t.Run("writes once before a process replacement and the deferred flush adds nothing", func(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + + env.vars.FlushArtifactReport() + require.Len(t, recorder.summaries, 1, "the report is written before the process is replaced") + assert.Equal(t, []string{"team/app:1.0.0"}, refsOf(recorder.summaries[0])) + assert.Equal(t, "team/app:1.0.0", recorder.outputs["artifact_ref"]) + + flush() + assert.Len(t, recorder.summaries, 1, "the deferred flush never repeats the report") + }) + + t.Run("covers a session that a nested boundary reuses", func(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + _ = env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + nested := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + + nested() + assert.Empty(t, recorder.summaries, "the nested closure writes nothing") + env.vars.FlushArtifactReport() + assert.Len(t, recorder.summaries, 1, "the helper flushes the installed session whichever boundary owns it") + }) + + t.Run("does nothing when no report session is installed", func(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + + assert.NotPanics(t, env.vars.FlushArtifactReport) + assert.Zero(t, recorder.builds, "no reporter is built when no report session is installed") + assert.Empty(t, recorder.summaries) + }) +} + +func TestArtifactReport_ConsecutiveGroupsKeepTheirScheduledOrder(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + // Two groups start with no artifact operation between them; the second group's branches finish first. + first, second := env.vars.ScheduleGroup(), env.vars.ScheduleGroup() + for _, run := range []struct { + vars *Variables + version string + }{{second.ForkAt(0), "2.0.0"}, {second.ForkAt(1), "2.1.0"}, {first.ForkAt(1), "1.1.0"}, {first.ForkAt(0), "1.0.0"}} { + step := publishStep("g-"+run.version, run.version) + step.WorkingDirectory = env.dir + _, err := (&ArtifactHandler{}).Execute(context.Background(), step, run.vars) + require.NoError(t, err) + } + flush() + + assert.Equal(t, []string{"team/app:1.0.0", "team/app:1.1.0", "team/app:2.0.0", "team/app:2.1.0"}, refsOf(recorder.summaries[0]), + "every branch of the first group precedes every branch of the second") +} + +func TestArtifactReport_IdenticalStepsInSeparateBranchesAreSeparateOperations(t *testing.T) { + env := newArtifactEnv(t) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + + // Both branches are inside the same operation at once: the service holds each call until the + // other has started, so neither operation has finished when the other begins. + var started sync.WaitGroup + started.Add(2) + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + started.Done() + started.Wait() + op := completeOperation(artifact.ActionPublish, artifact.OutcomeCreated) + op.OperationID, op.Ref = r.Execution.OperationID, "team/app:"+r.Version + return op, nil + }).Times(2) + + group := env.vars.ScheduleGroup() + step := publishStep("publish", "1.0.0") + step.WorkingDirectory = env.dir + var wg sync.WaitGroup + for index := range 2 { + wg.Add(1) + branch := group.ForkAt(index) + go func() { + defer wg.Done() + _, err := (&ArtifactHandler{}).Execute(context.Background(), step, branch) + assert.NoError(t, err) + }() + } + wg.Wait() + flush() + + require.Len(t, recorder.summaries, 1) + assert.Contains(t, recorder.summaries[0], "2 operations: 2 succeeded.", "each branch's result is reported") + assert.NotContains(t, recorder.summaries[0], "**Attempts:** 2", "no branch inherits the other's attempt counter") +} + +func TestArtifactReport_RetriesInOneBranchStayOneOperation(t *testing.T) { + env := newArtifactEnv(t) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + calls := 0 + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + calls++ + if calls == 1 { + return &artifact.OperationResult{OperationID: r.Execution.OperationID, Action: artifact.ActionPublish}, errors.New("temporary registry failure") + } + op := completeOperation(artifact.ActionPublish, artifact.OutcomeCreated) + op.OperationID = r.Execution.OperationID + return op, nil + }).Times(2) + + group := env.vars.ScheduleGroup() + step := publishStep("publish", "1.0.0") + step.WorkingDirectory = env.dir + step.Retry = &schema.RetryConfig{} + // Each attempt of a retrying branch forks again at the same index. + _, err := (&ArtifactHandler{}).Execute(context.Background(), step, group.ForkAt(0)) + require.Error(t, err) + _, err = (&ArtifactHandler{}).Execute(context.Background(), step, group.ForkAt(0)) + require.NoError(t, err) + flush() + + assert.Contains(t, recorder.summaries[0], "1 operation: 1 succeeded.") + assert.Contains(t, recorder.summaries[0], "**Attempts:** 2") +} + +func TestArtifactReport_ExecStepWritesTheReportBeforeReplacingTheProcess(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + _, err := env.run(publishStep("publish", "1.0.0")) + require.NoError(t, err) + + // A working directory that does not exist makes the replacement fail after the flush on every + // platform, so the handler returns instead of replacing the test process. + step := &schema.WorkflowStep{Name: "replace", Type: schema.TaskTypeExec, Command: "echo replaced", WorkingDirectory: filepath.Join(env.dir, "missing")} + _, err = (&ExecHandler{}).Execute(context.Background(), step, env.vars) + require.Error(t, err) + + require.Len(t, recorder.summaries, 1, "the report is written before the process replacement is attempted") + assert.Equal(t, []string{"team/app:1.0.0"}, refsOf(recorder.summaries[0])) + flush() + assert.Len(t, recorder.summaries, 1, "the deferred flush adds nothing after the early write") +} + +func TestArtifactReport_StarlarkParallelFollowsSchedule(t *testing.T) { + env := newArtifactEnv(t) + expectPublishes(env) + recorder := newSummaryRecorder(t) + flush := env.vars.UseArtifactReport(ciEnabled(), recorder.option()) + _, err := star.New().Execute(t.Context(), script.Spec{Source: ` +def publish(version): + steps.artifact(action="publish", source="dist", repository="dir", artifact_name="team/app", version=version) +steps.parallel(tasks=[steps.task(name=v, function=publish, args=[v]) for v in ["1.0.0", "2.0.0", "3.0.0"]]) +`, WorkingDirectory: env.dir, Steps: NewAutomationLibrary(env.vars, nil)}) + require.NoError(t, err) + flush() + require.Len(t, recorder.summaries, 1) + assert.Equal(t, []string{"team/app:1.0.0", "team/app:2.0.0", "team/app:3.0.0"}, refsOf(recorder.summaries[0])) +} + +func TestArtifactReport_ScheduledIdenticalFailuresKeepSeparateIdentities(t *testing.T) { + env := newArtifactEnv(t) + var ids []string + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + ids = append(ids, r.Execution.OperationID) + return &artifact.OperationResult{OperationID: r.Execution.OperationID, Action: artifact.ActionPublish}, errors.New("failed") + }).Times(4) + step := publishStep("", "1.0.0") + step.Retry = &schema.RetryConfig{} + for range 2 { + restore := env.vars.BeginArtifactStep() + for range 2 { + _, err := env.run(step) + require.Error(t, err) + } + restore() + } + require.Len(t, ids, 4) + assert.Equal(t, ids[0], ids[1]) + assert.Equal(t, ids[2], ids[3]) + assert.NotEqual(t, ids[0], ids[2]) +} diff --git a/pkg/runner/step/artifact_session.go b/pkg/runner/step/artifact_session.go index 60051a4fd81..0ad60de9f99 100644 --- a/pkg/runner/step/artifact_session.go +++ b/pkg/runner/step/artifact_session.go @@ -7,6 +7,8 @@ import ( "encoding/hex" "encoding/json" "fmt" + "strconv" + "strings" "sync" "time" @@ -31,19 +33,57 @@ type artifactSession struct { collector report.Collector operations map[string]*artifactOperation inputs map[string]invoke.Params + root *artifactScope fingerprintKey [32]byte } +// artifactScope numbers the logical operations of one sequential flow, and positions the parallel +// groups that flow starts, so a report orders operations by where they were scheduled rather than +// by when they finished. The root scope belongs to the session; each branch of a parallel group +// gets a scope of its own, nested under the position of the group. +// +// A position is a list of integers compared lexicographically. Every operation and every parallel +// group of a scope takes the next slot k of the scope: the operation is positioned at path+[k], and +// the branch at the given index of the group is scoped at path+[k, index]. Because a group takes a +// slot of its own, consecutive groups with no operation between them never share a prefix, and a +// group sorts between the operation before it and the operation after it. +type artifactScope struct { + mu sync.Mutex + path []int + next int +} + +// reserve takes the next slot of the scope and returns the position of that slot. +func (s *artifactScope) reserve() []int { + s.mu.Lock() + defer s.mu.Unlock() + + position := append(append(make([]int, 0, len(s.path)+1), s.path...), s.next) + s.next++ + return position +} + +// key identifies the scope in an operation key, so identical steps in different branches stay +// separate operations while every retry in one branch, which shares the scope's path, stays one. +func (s *artifactScope) key() string { + parts := make([]string, len(s.path)) + for index, slot := range s.path { + parts[index] = strconv.Itoa(slot) + } + return strings.Join(parts, ".") +} + // artifactOperation is the identity of one logical operation: the ID and the UTC preparation time // are captured once, before the first attempt, and reused by every retry. type artifactOperation struct { id string preparedAt time.Time attempts int + position []int } func newArtifactSession() *artifactSession { - session := &artifactSession{collector: report.Discard{}, operations: make(map[string]*artifactOperation), inputs: make(map[string]invoke.Params)} + session := &artifactSession{collector: report.Discard{}, operations: make(map[string]*artifactOperation), inputs: make(map[string]invoke.Params), root: &artifactScope{}} // Go 1.26+ guarantees Read fills the key or terminates the process on entropy failure. if _, err := rand.Read(session.fingerprintKey[:]); err != nil { panic("generate artifact session fingerprint key: " + err.Error()) @@ -83,6 +123,55 @@ func (v *Variables) SetArtifactCollector(collector report.Collector) { session.collector = collector } +// artifactScopeOrRoot returns the scope that numbers this Variables' operations: the scope of the +// parallel branch it was forked into, or the session's root scope. +func (v *Variables) artifactScopeOrRoot() *artifactScope { + if v.artifactScope != nil { + return v.artifactScope + } + return v.artifactSession().root +} + +// BeginArtifactStep reserves a distinct scope for one scheduled step and returns a +// restore function. Call it around the entire retry loop, not each attempt. +func (v *Variables) BeginArtifactStep() func() { + defer perf.Track(nil, "step.Variables.BeginArtifactStep")() + + previous := v.artifactScope + v.artifactScope = &artifactScope{path: v.artifactScopeOrRoot().reserve()} + return func() { v.artifactScope = previous } +} + +// ScheduledGroup is one parallel group whose position in the scope of its parent has been reserved. +// The branches forked from it are positioned under the group, in branch order, whatever order they +// finish in. +type ScheduledGroup struct { + parent *Variables + prefix []int +} + +// ScheduleGroup reserves the position of a parallel group that starts now, and returns the group the +// scheduler forks its branches from. Call it once per group, before the first branch starts: two +// groups with no artifact operation between them each get their own position, so their branches +// never interleave. +func (v *Variables) ScheduleGroup() *ScheduledGroup { + defer perf.Track(nil, "step.Variables.ScheduleGroup")() + + return &ScheduledGroup{parent: v, prefix: v.artifactScopeOrRoot().reserve()} +} + +// ForkAt returns a copy of the parent variables for the branch at the given scheduled index of the +// group. The copy shares the session, so the branches still record into one collector, and a retry +// of the branch forks again at the same index and keeps the branch's operation identities. +func (g *ScheduledGroup) ForkAt(index int) *Variables { + defer perf.Track(nil, "step.ScheduledGroup.ForkAt")() + + branch := g.parent.Clone() + path := append(append(make([]int, 0, len(g.prefix)+1), g.prefix...), index) + branch.artifactScope = &artifactScope{path: path} + return branch +} + // artifactSession returns the session, creating it for a Variables built without NewVariables. func (v *Variables) artifactSession() *artifactSession { if v.artifacts == nil { @@ -92,15 +181,16 @@ func (v *Variables) artifactSession() *artifactSession { } // begin returns the identity for the logical operation with the given key and counts the attempt. -// The first call captures the ID and preparation time; later calls, which are wrapper retries of -// the same step with the same resolved input, return them unchanged. -func (s *artifactSession) begin(key string) (operation artifactOperation, collector report.Collector) { +// The first call captures the ID, the preparation time, and the scheduled position in the scope; +// later calls, which are wrapper retries of the same step with the same resolved input, return +// them unchanged. +func (s *artifactSession) begin(key string, scope *artifactScope) (operation artifactOperation, collector report.Collector) { s.mu.Lock() defer s.mu.Unlock() existing, ok := s.operations[key] if !ok { - existing = &artifactOperation{id: artifactNewID(), preparedAt: artifactNow()} + existing = &artifactOperation{id: artifactNewID(), preparedAt: artifactNow(), position: scope.reserve()} s.operations[key] = existing } existing.attempts++ @@ -156,9 +246,9 @@ func (s *artifactSession) fingerprint(domain string, encoded []byte) string { return hex.EncodeToString(mac.Sum(nil)) } -// operationKey identifies a logical operation by the step and its fully resolved input. +// operationKey identifies a logical operation by its scheduling scope, step, and resolved input. // Explicit user metadata participates in the identity; the execution fields do not. -func (s *artifactSession) operationKey(stepName string, params *invoke.Params) string { +func (s *artifactSession) operationKey(scope *artifactScope, stepName string, params *invoke.Params) string { identity := *params identity.Execution.OperationID = "" identity.Execution.PreparedAt = time.Time{} @@ -166,7 +256,7 @@ func (s *artifactSession) operationKey(stepName string, params *invoke.Params) s encoded, err := json.Marshal(&identity) if err != nil { // Params holds only strings, booleans, and string maps, so encoding cannot fail. - return s.fingerprint("operation-fallback", []byte(stepName)) + return s.fingerprint("operation-fallback", []byte(scope.key()+"\x00"+stepName)) } - return s.fingerprint("operation", append([]byte(stepName+"\x00"), encoded...)) + return s.fingerprint("operation", append([]byte(scope.key()+"\x00"+stepName+"\x00"), encoded...)) } diff --git a/pkg/runner/step/artifact_test.go b/pkg/runner/step/artifact_test.go index 34ead5189fe..0a6d06d82d3 100644 --- a/pkg/runner/step/artifact_test.go +++ b/pkg/runner/step/artifact_test.go @@ -19,7 +19,6 @@ import ( "github.com/cloudposse/atmos/pkg/artifact/artifacttest" "github.com/cloudposse/atmos/pkg/artifact/invoke" "github.com/cloudposse/atmos/pkg/artifact/report" - "github.com/cloudposse/atmos/pkg/artifact/service" "github.com/cloudposse/atmos/pkg/schema" ) @@ -582,18 +581,11 @@ func TestArtifactHandler_RetryRetainsResolvedInputs(t *testing.T) { assert.Equal(t, requests[0].Execution.OperationID, requests[1].Execution.OperationID) } -type nilDetailedService struct { - artifact.Service - err error -} - -func (s nilDetailedService) PublishDetailed(context.Context, artifact.PublishRequest) (*service.PublishOutcome, error) { - return nil, s.err -} - func TestRecorderNormalizesNilDetailedOutcome(t *testing.T) { failure := errors.New("failed") - recorder := artifacttest.NewRecorder(nilDetailedService{err: failure}) + svc := invoke.NewMockDetailedService(gomock.NewController(t)) + svc.EXPECT().PublishDetailed(gomock.Any(), gomock.Any()).Return(nil, failure) + recorder := artifacttest.NewRecorder(svc) outcome, err := recorder.PublishDetailed(context.Background(), artifact.PublishRequest{}) require.ErrorIs(t, err, failure) require.NotNil(t, outcome) @@ -601,6 +593,48 @@ func TestRecorderNormalizesNilDetailedOutcome(t *testing.T) { assert.Equal(t, outcome.Operation, recorder.Results()[0]) } +func TestAutomationForkTaskScopesArtifactIdentity(t *testing.T) { + vars := NewVariables() + library := NewAutomationLibrary(vars, nil) + first := library.ForkTask().(*AutomationLibrary) + second := library.ForkTask().(*AutomationLibrary) + one, _ := first.vars.artifactSession().begin("same", first.vars.artifactScopeOrRoot()) + two, _ := second.vars.artifactSession().begin("same", second.vars.artifactScopeOrRoot()) + assert.NotEqual(t, one.id, two.id) + retry := first.Fork().(*AutomationLibrary) + again, _ := retry.vars.artifactSession().begin("same", retry.vars.artifactScopeOrRoot()) + assert.Equal(t, one.id, again.id) + assert.Equal(t, 2, again.attempts) +} + +func TestArtifactHandler_RetainedInputsAreScopedToScheduledBranches(t *testing.T) { + env := newArtifactEnv(t) + var requests []artifact.PublishRequest + env.service.EXPECT().Publish(gomock.Any(), gomock.Any()).DoAndReturn(func(_ context.Context, r artifact.PublishRequest) (*artifact.OperationResult, error) { + requests = append(requests, r) + return nil, errors.New("transient") + }).Times(3) + group := env.vars.ScheduleGroup() + first, second := group.ForkAt(0), group.ForkAt(1) + first.SetEnv("VERSION", "1") + second.SetEnv("VERSION", "2") + step := artifactStepWith(artifact.ActionPublish, invoke.FieldSource, invoke.FieldRepository, invoke.FieldVersion) + step.WorkingDirectory = env.dir + step.Version = "{{ .env.VERSION }}" + handler := &ArtifactHandler{} + _, err := handler.Execute(context.Background(), step, first) + require.Error(t, err) + _, err = handler.Execute(context.Background(), step, second) + require.Error(t, err) + first.SetEnv("VERSION", "3") + _, err = handler.Execute(context.Background(), step, first) + require.Error(t, err) + require.Len(t, requests, 3) + assert.Equal(t, []string{"1", "2", "1"}, []string{requests[0].Version, requests[1].Version, requests[2].Version}) + assert.NotEqual(t, requests[0].Execution.OperationID, requests[1].Execution.OperationID) + assert.Equal(t, requests[0].Execution.OperationID, requests[2].Execution.OperationID) +} + func TestArtifactSessionFingerprintIsScopedAndPreservesIdentity(t *testing.T) { first := newArtifactSession() second := newArtifactSession() @@ -620,11 +654,12 @@ func TestArtifactSessionFingerprintIsScopedAndPreservesIdentity(t *testing.T) { assert.NotEqual(t, key, different, "authored inputs still participate in identity") params := &invoke.Params{Action: artifact.ActionPublish, Labels: map[string]string{"token": "sensitive-value"}} - operation := first.operationKey(step.Name, params) - assert.Equal(t, operation, first.operationKey(step.Name, params)) - assert.NotEqual(t, operation, second.operationKey(step.Name, params)) + operation := first.operationKey(first.root, step.Name, params) + assert.Equal(t, operation, first.operationKey(first.root, step.Name, params)) + assert.NotEqual(t, operation, first.operationKey(&artifactScope{path: []int{1}}, step.Name, params)) + assert.NotEqual(t, operation, second.operationKey(first.root, step.Name, params)) params.Labels["token"] = "different-value" - assert.NotEqual(t, operation, first.operationKey(step.Name, params)) + assert.NotEqual(t, operation, first.operationKey(first.root, step.Name, params)) } func TestArtifactSessionRejectsUnserializableStepIdentity(t *testing.T) { diff --git a/pkg/runner/step/automation_cast_actions.go b/pkg/runner/step/automation_cast_actions.go index 9a05ad9fd66..2a3bcb4c4d4 100644 --- a/pkg/runner/step/automation_cast_actions.go +++ b/pkg/runner/step/automation_cast_actions.go @@ -185,7 +185,7 @@ func (r *declaredCast) session(action *castplan.Action, child *schema.WorkflowSt Duration: item.Duration, Timeout: item.Timeout, Rate: item.Rate, Interval: item.Interval, Repeat: item.Repeat, Path: item.Path, }) } - return asciicast.RunSession(r.ctx, &asciicast.SessionOptions{ + return runCastSession(r.ctx, &asciicast.SessionOptions{ Shell: child.Shell, Dir: child.WorkingDirectory, Env: env, Width: child.Width, Height: child.Height, WriteRate: writeRate, KeyInterval: keyInterval, Actions: actions, ScopedWaits: true, Observe: func(i int, item *asciicast.SessionAction) error { diff --git a/pkg/runner/step/automation_cast_test.go b/pkg/runner/step/automation_cast_test.go index 8aa31ab3464..bf901757d3c 100644 --- a/pkg/runner/step/automation_cast_test.go +++ b/pkg/runner/step/automation_cast_test.go @@ -97,6 +97,7 @@ rec.generate()`), "policy refused") } func TestDeclarativeCastTerminal(t *testing.T) { + installSessionReadyGate(t) initShellTestIO(t) dir := t.TempDir() exe, err := os.Executable() @@ -119,6 +120,7 @@ rec.generate()`, exe) // re-enable recording until the hidden command has really finished, or its // output is published in the cast. func TestDeclarativeCastTerminalHiddenCommandDoesNotLeak(t *testing.T) { + installSessionReadyGate(t) initShellTestIO(t) dir := t.TempDir() exe, err := os.Executable() diff --git a/pkg/runner/step/automation_library.go b/pkg/runner/step/automation_library.go index 19b8dd71945..6942e13f30e 100644 --- a/pkg/runner/step/automation_library.go +++ b/pkg/runner/step/automation_library.go @@ -36,6 +36,7 @@ func NewAutomationLibrary(vars *Variables, workflow *schema.WorkflowDefinition) vars = NewVariables() } snapshot := vars.Clone() + snapshot.artifactSession() snapshot.automationDepth++ return &AutomationLibrary{vars: snapshot, workflow: workflow, processChanges: map[string]string{}} } @@ -60,6 +61,46 @@ func (l *AutomationLibrary) Fork() api.StepLibrary { return &AutomationLibrary{vars: l.vars.Clone(), workflow: l.workflow, processChanges: maps.Clone(l.processChanges)} } +// ForkTask isolates artifact operation identities while retaining the report collector and schedule. +func (l *AutomationLibrary) ForkTask() api.StepLibrary { + defer perf.Track(nil, "step.AutomationLibrary.ForkTask")() + fork := l.Fork().(*AutomationLibrary) + parent := l.vars.artifactSession() + parent.mu.Lock() + collector := parent.collector + parent.mu.Unlock() + fork.vars.artifacts = newArtifactSession() + fork.vars.artifacts.collector = collector + return fork +} + +var ( + _ api.GroupScheduler = (*AutomationLibrary)(nil) + _ api.ScheduledForker = (*automationGroup)(nil) +) + +// ScheduleGroup reserves the scheduled position of a parallel group and returns the library its +// branches fork from, so artifact reports order the branches by where they were scheduled. It +// implements api.GroupScheduler. +func (l *AutomationLibrary) ScheduleGroup() api.ScheduledForker { + defer perf.Track(nil, "step.AutomationLibrary.ScheduleGroup")() + return &automationGroup{AutomationLibrary: l, group: l.vars.ScheduleGroup()} +} + +// automationGroup is the library of one parallel group: it forks every branch at the group's +// reserved position. +type automationGroup struct { + *AutomationLibrary + group *ScheduledGroup +} + +// ForkAt isolates a parallel branch like Fork and records the branch's scheduled index. It +// implements api.ScheduledForker. +func (g *automationGroup) ForkAt(index int) api.StepLibrary { + defer perf.Track(nil, "step.automationGroup.ForkAt")() + return &AutomationLibrary{vars: g.group.ForkAt(index), workflow: g.workflow, processChanges: maps.Clone(g.processChanges)} +} + // Run validates configuration and dispatches through the shared step executor. func (l *AutomationLibrary) Run(ctx context.Context, call *api.StepCall) (*api.StepResult, error) { defer perf.Track(nil, "step.AutomationLibrary.Run")() @@ -93,6 +134,13 @@ func (l *AutomationLibrary) runStep(ctx context.Context, step *schema.WorkflowSt before := maps.Clone(l.vars.Env) result, err := l.execute(ctx, step) l.rememberEnvironment(before) + if err == nil { + // A handler may report success after its background work was canceled by its own deadline. + // Parent cancellation must not turn a successful handler into an error. + if timeoutErr := deadline.Expired(); errors.Is(timeoutErr, errUtils.ErrStepTimeout) { + err = timeoutErr + } + } if err != nil { // Some handlers return only the process exit code after cancellation (notably diff --git a/pkg/runner/step/automation_library_test.go b/pkg/runner/step/automation_library_test.go index 302217c04a1..bb8e114c1c0 100644 --- a/pkg/runner/step/automation_library_test.go +++ b/pkg/runner/step/automation_library_test.go @@ -107,6 +107,7 @@ func TestAutomationLibraryPreservesContextOnHandlerExit(t *testing.T) { waitForContext bool succeed bool wantContext error + wantTimeout bool }{ {name: "step deadline", ownTimeout: "10ms", waitForContext: true, wantContext: context.DeadlineExceeded}, {name: "parent cancellation", cancelParent: true, wantContext: context.Canceled}, @@ -114,6 +115,8 @@ func TestAutomationLibraryPreservesContextOnHandlerExit(t *testing.T) { {name: "ordinary exit"}, {name: "success", succeed: true}, {name: "successful handler after parent cancellation", cancelParent: true, succeed: true}, + {name: "successful handler after parent deadline", parentDeadline: true, ownTimeout: "2s", waitForContext: true, succeed: true}, + {name: "successful handler after own deadline", ownTimeout: "10ms", waitForContext: true, succeed: true, wantTimeout: true}, } { t.Run(tc.name, func(t *testing.T) { ctx, cancel := context.WithCancel(t.Context()) @@ -151,6 +154,10 @@ func TestAutomationLibraryPreservesContextOnHandlerExit(t *testing.T) { }) call := &api.StepCall{Type: handlerName, Configuration: map[string]any{"timeout": tc.ownTimeout}} result, err := NewAutomationLibrary(nil, nil).Run(ctx, call) + if tc.wantTimeout { + require.ErrorIs(t, err, errUtils.ErrStepTimeout) + return + } if tc.succeed { require.NoError(t, err) require.NotNil(t, result) diff --git a/pkg/runner/step/cast.go b/pkg/runner/step/cast.go index 155288eb987..cd2e2cd2485 100644 --- a/pkg/runner/step/cast.go +++ b/pkg/runner/step/cast.go @@ -287,7 +287,7 @@ func (r castChildStepRunner) runSessionBlock(block *schema.WorkflowStep) error { if err := applySessionPromptEnv(block, env); err != nil { return err } - return asciicast.RunSession(ctx, &asciicast.SessionOptions{ + return runCastSession(ctx, &asciicast.SessionOptions{ Recorder: rec, Shell: block.Shell, ShellInit: castSessionShellInit(block), @@ -376,6 +376,9 @@ func prepareCastChildStep(castStep, child *schema.WorkflowStep, index int) { } } +// runCastSession is a seam for test harnesses that synchronize shell readiness. +var runCastSession = asciicast.RunSession + func runCastSessionMode(ctx context.Context, rec *asciicast.Recorder, castStep *schema.WorkflowStep, vars *Variables, workflow *schema.WorkflowDefinition) error { writeRate, err := parseDurationDefault(castStep.WriteRate, 40*time.Millisecond) if err != nil { @@ -392,7 +395,7 @@ func runCastSessionMode(ctx context.Context, rec *asciicast.Recorder, castStep * if err := applySessionPromptEnv(castStep, env); err != nil { return err } - return asciicast.RunSession(ctx, &asciicast.SessionOptions{ + return runCastSession(ctx, &asciicast.SessionOptions{ Recorder: rec, Shell: castStep.Shell, ShellInit: castSessionShellInit(castStep), diff --git a/pkg/runner/step/cast_playback_test.go b/pkg/runner/step/cast_playback_test.go index d4e3eab9c73..6c7c38735e6 100644 --- a/pkg/runner/step/cast_playback_test.go +++ b/pkg/runner/step/cast_playback_test.go @@ -41,6 +41,7 @@ func TestCastPlaybackSessionEndToEnd(t *testing.T) { require.NoError(t, err) t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) path := filepath.Join(t.TempDir(), "session.cast") cast := &schema.WorkflowStep{Type: "cast", Mode: "session", Shell: shell, CastOutput: &schema.CastOutput{Cast: path}, Steps: []schema.WorkflowStep{ // The fake shell must be reading input before the command is typed. @@ -58,16 +59,21 @@ func TestCastPlaybackSessionEndToEnd(t *testing.T) { _, events, err := asciicast.ReadEvents(path) require.NoError(t, err) var text strings.Builder - var endpoint float64 + var endpoint, readyAt float64 + var readySeen bool for _, event := range events { + text.WriteString(event.Data) + if !readySeen && strings.Contains(text.String(), sessionShellBanner) { + readyAt, readySeen = event.Time, true + } if event.Data == "" { endpoint = event.Time } - text.WriteString(event.Data) } + require.True(t, readySeen, "the shell readiness banner was recorded") require.Contains(t, text.String(), "ready") - require.GreaterOrEqual(t, endpoint, 4.0) - require.Less(t, endpoint, 4.0+sessionReadyWaitTimeoutDuration.Seconds()) + require.GreaterOrEqual(t, endpoint-readyAt, 4.0) + require.Less(t, endpoint-readyAt, 4.0+sessionReadyWaitTimeoutDuration.Seconds()) } func TestCastPlaybackStepsEndToEnd(t *testing.T) { @@ -156,6 +162,7 @@ func TestCastPlaybackPreservesPromptAcrossGroupBoundaries(t *testing.T) { require.NoError(t, err) t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) steps := []schema.WorkflowStep{ {Type: "session", Shell: shell, Steps: []schema.WorkflowStep{ // The fake shell must be reading input before the command is typed. diff --git a/pkg/runner/step/cast_test.go b/pkg/runner/step/cast_test.go index 9fb525d9e29..e1013f4d3fc 100644 --- a/pkg/runner/step/cast_test.go +++ b/pkg/runner/step/cast_test.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "fmt" + "maps" "os" "path/filepath" "reflect" @@ -15,6 +16,7 @@ import ( "github.com/muesli/termenv" "github.com/spf13/viper" + "github.com/stretchr/testify/require" "github.com/cloudposse/atmos/pkg/ansi" "github.com/cloudposse/atmos/pkg/asciicast" @@ -23,6 +25,52 @@ import ( "github.com/cloudposse/atmos/pkg/ui" ) +// installSessionReadyGate waits for the fake shell to enter its input loop before +// session action deadlines begin. The gate is test setup, not a behavioral timeout. +func installSessionReadyGate(t *testing.T) { + t.Helper() + previous := runCastSession + root := t.TempDir() + runCastSession = func(ctx context.Context, opts *asciicast.SessionOptions) error { + file, err := os.CreateTemp(root, "session-ready-*") + if err != nil { + return err + } + path := file.Name() + if err := file.Close(); err != nil { + return err + } + if err := os.Remove(path); err != nil { + return err + } + opts.Env = maps.Clone(opts.Env) + if opts.Env == nil { + opts.Env = make(map[string]string) + } + opts.Env[sessionShellReadyFileEnv] = path + opts.BeforeActions = func(ctx context.Context, observed func(string) bool) error { + ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + defer cancel() + ticker := time.NewTicker(10 * time.Millisecond) + defer ticker.Stop() + for { + if _, err := os.Stat(path); err == nil && observed(sessionShellBanner) { + return nil + } else if err != nil && !os.IsNotExist(err) { + return err + } + select { + case <-ctx.Done(): + return ctx.Err() + case <-ticker.C: + } + } + } + return previous(ctx, opts) + } + t.Cleanup(func() { runCastSession = previous }) +} + // sessionReadyWaitTimeout bounds every session test's "write a command, wait // for its response" round trip below. It self-execs the test binary as a fake // shell over a real PTY (see sessionShellHelperEnv) -- Windows process @@ -1814,6 +1862,7 @@ func TestRunCastSessionModeInterleavesSimulateNarration(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "session-simulate.cast") _, err = (&CastHandler{}).Execute(context.Background(), &schema.WorkflowStep{ @@ -2197,12 +2246,13 @@ func TestRunCastSessionModeExecutesScriptedActions(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) // Must outlive the wait action's own sessionReadyWaitTimeout below: this // parent context's deadline firing first would return ctx.Err() instead // of ever giving the wait action its own, longer budget to succeed (see // sessionReadyWaitTimeoutDuration's doc comment). - ctx, cancel := context.WithTimeout(context.Background(), 2*sessionReadyWaitTimeoutDuration+2*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 2*sessionReadyWaitTimeoutDuration+32*time.Second) defer cancel() err = runCastSessionMode(ctx, nil, &schema.WorkflowStep{ @@ -2235,6 +2285,7 @@ func TestCastHandlerExecutesSessionModeEndToEnd(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "session.cast") _, err = (&CastHandler{}).Execute(context.Background(), &schema.WorkflowStep{ @@ -2272,6 +2323,7 @@ func TestCastHandlerSessionModeFallsThroughToRealExecution(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "session-exec.cast") _, err = (&CastHandler{}).Execute(context.Background(), &schema.WorkflowStep{ @@ -2328,6 +2380,7 @@ func TestCastHandlerNestedSessionStepFallsThroughToRealExecution(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "nested-session.cast") _, err = (&CastHandler{}).Execute(context.Background(), &schema.WorkflowStep{ @@ -2383,6 +2436,7 @@ func TestCastHandlerNestedSessionExecInheritsWorkflowOutput(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "nested-session-workflow.cast") _, err = (&CastHandler{}).ExecuteWithWorkflow(context.Background(), &schema.WorkflowStep{ @@ -2484,6 +2538,7 @@ func TestRunCastStepModeSkipsPromptForSimulateAfterSessionBlock(t *testing.T) { } t.Setenv(sessionShellHelperEnv, "1") t.Setenv(sessionShellBannerEnv, "1") + installSessionReadyGate(t) castPath := filepath.Join(t.TempDir(), "session-then-simulate.cast") _, err = (&CastHandler{}).Execute(context.Background(), &schema.WorkflowStep{ @@ -2565,3 +2620,28 @@ func castEventText(t *testing.T, content []byte) string { } return out.String() } + +func TestCastSessionWaitStartsAfterHelperReadiness(t *testing.T) { + initShellTestIO(t) + shell, err := os.Executable() + require.NoError(t, err) + t.Setenv(sessionShellHelperEnv, "1") + t.Setenv(sessionShellBannerEnv, "1") + t.Setenv(sessionShellStartupDelayEnv, "2s") + installSessionReadyGate(t) + castPath := filepath.Join(t.TempDir(), "ready.cast") + cast := &schema.WorkflowStep{Type: "cast", Mode: "session", Shell: shell, CastOutput: &schema.CastOutput{Cast: castPath}, Steps: []schema.WorkflowStep{ + {Type: "wait", Text: sessionShellBanner, Timeout: "1s"}, + {Type: "write", Text: "printf ready", Rate: "0"}, + {Type: "key", Key: "enter"}, + {Type: "wait", Regex: sessionReadyOutputRegex, Timeout: sessionReadyWaitTimeout}, + }} + _, err = (&CastHandler{}).Execute(t.Context(), cast, NewVariables()) + require.NoError(t, err) + + // Readiness does not extend or bypass the timeout of a later behavioral wait. + cast.CastOutput.Cast = filepath.Join(t.TempDir(), "missing.cast") + cast.Steps = []schema.WorkflowStep{{Type: "wait", Text: "never-produced", Timeout: "50ms"}} + _, err = (&CastHandler{}).Execute(t.Context(), cast, NewVariables()) + require.ErrorIs(t, err, asciicast.ErrWaitTimeout) +} diff --git a/pkg/runner/step/exec.go b/pkg/runner/step/exec.go index 59cb4312cdd..cf0b5f0dd14 100644 --- a/pkg/runner/step/exec.go +++ b/pkg/runner/step/exec.go @@ -57,6 +57,8 @@ func (h *ExecHandler) Execute(ctx context.Context, step *schema.WorkflowStep, va return nil, err } + // A successful replacement never returns, so write the artifact report of the earlier steps first. + vars.FlushArtifactReport() if err := process.ReplaceShellSession(&process.ExecSpec{ Command: command, Name: step.Name, diff --git a/pkg/runner/step/mock_ci_reporter_test.go b/pkg/runner/step/mock_ci_reporter_test.go new file mode 100644 index 00000000000..80074a787ad --- /dev/null +++ b/pkg/runner/step/mock_ci_reporter_test.go @@ -0,0 +1,667 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/cloudposse/atmos/pkg/ci (interfaces: Reporter) +// +// Generated by this command: +// +// mockgen -typed -destination mock_ci_reporter_test.go -package step github.com/cloudposse/atmos/pkg/ci Reporter +// + +// Package step is a generated GoMock package. +package step + +import ( + context "context" + io "io" + reflect "reflect" + + ci "github.com/cloudposse/atmos/pkg/ci" + gomock "go.uber.org/mock/gomock" +) + +// MockReporter is a mock of Reporter interface. +type MockReporter struct { + ctrl *gomock.Controller + recorder *MockReporterMockRecorder + isgomock struct{} +} + +// MockReporterMockRecorder is the mock recorder for MockReporter. +type MockReporterMockRecorder struct { + mock *MockReporter +} + +// NewMockReporter creates a new mock instance. +func NewMockReporter(ctrl *gomock.Controller) *MockReporter { + mock := &MockReporter{ctrl: ctrl} + mock.recorder = &MockReporterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockReporter) EXPECT() *MockReporterMockRecorder { + return m.recorder +} + +// Annotate mocks base method. +func (m *MockReporter) Annotate(annotation ci.Annotation) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Annotate", annotation) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Annotate indicates an expected call of Annotate. +func (mr *MockReporterMockRecorder) Annotate(annotation any) *MockReporterAnnotateCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Annotate", reflect.TypeOf((*MockReporter)(nil).Annotate), annotation) + return &MockReporterAnnotateCall{Call: call} +} + +// MockReporterAnnotateCall wrap *gomock.Call +type MockReporterAnnotateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterAnnotateCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterAnnotateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterAnnotateCall) Do(f func(ci.Annotation) (ci.Receipt, error)) *MockReporterAnnotateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterAnnotateCall) DoAndReturn(f func(ci.Annotation) (ci.Receipt, error)) *MockReporterAnnotateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Base mocks base method. +func (m *MockReporter) Base() (*ci.BaseResolution, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Base") + ret0, _ := ret[0].(*ci.BaseResolution) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Base indicates an expected call of Base. +func (mr *MockReporterMockRecorder) Base() *MockReporterBaseCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Base", reflect.TypeOf((*MockReporter)(nil).Base)) + return &MockReporterBaseCall{Call: call} +} + +// MockReporterBaseCall wrap *gomock.Call +type MockReporterBaseCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterBaseCall) Return(arg0 *ci.BaseResolution, arg1 error) *MockReporterBaseCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterBaseCall) Do(f func() (*ci.BaseResolution, error)) *MockReporterBaseCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterBaseCall) DoAndReturn(f func() (*ci.BaseResolution, error)) *MockReporterBaseCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Check mocks base method. +func (m *MockReporter) Check(ctx context.Context, req ci.CheckRequest) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Check", ctx, req) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Check indicates an expected call of Check. +func (mr *MockReporterMockRecorder) Check(ctx, req any) *MockReporterCheckCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Check", reflect.TypeOf((*MockReporter)(nil).Check), ctx, req) + return &MockReporterCheckCall{Call: call} +} + +// MockReporterCheckCall wrap *gomock.Call +type MockReporterCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterCheckCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterCheckCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterCheckCall) Do(f func(context.Context, ci.CheckRequest) (ci.Receipt, error)) *MockReporterCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterCheckCall) DoAndReturn(f func(context.Context, ci.CheckRequest) (ci.Receipt, error)) *MockReporterCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Comment mocks base method. +func (m *MockReporter) Comment(ctx context.Context, req ci.CommentRequest) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Comment", ctx, req) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Comment indicates an expected call of Comment. +func (mr *MockReporterMockRecorder) Comment(ctx, req any) *MockReporterCommentCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Comment", reflect.TypeOf((*MockReporter)(nil).Comment), ctx, req) + return &MockReporterCommentCall{Call: call} +} + +// MockReporterCommentCall wrap *gomock.Call +type MockReporterCommentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterCommentCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterCommentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterCommentCall) Do(f func(context.Context, ci.CommentRequest) (ci.Receipt, error)) *MockReporterCommentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterCommentCall) DoAndReturn(f func(context.Context, ci.CommentRequest) (ci.Receipt, error)) *MockReporterCommentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Context mocks base method. +func (m *MockReporter) Context() (*ci.Context, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Context") + ret0, _ := ret[0].(*ci.Context) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Context indicates an expected call of Context. +func (mr *MockReporterMockRecorder) Context() *MockReporterContextCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockReporter)(nil).Context)) + return &MockReporterContextCall{Call: call} +} + +// MockReporterContextCall wrap *gomock.Call +type MockReporterContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterContextCall) Return(arg0 *ci.Context, arg1 error) *MockReporterContextCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterContextCall) Do(f func() (*ci.Context, error)) *MockReporterContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterContextCall) DoAndReturn(f func() (*ci.Context, error)) *MockReporterContextCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Env mocks base method. +func (m *MockReporter) Env(key, value string) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Env", key, value) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Env indicates an expected call of Env. +func (mr *MockReporterMockRecorder) Env(key, value any) *MockReporterEnvCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Env", reflect.TypeOf((*MockReporter)(nil).Env), key, value) + return &MockReporterEnvCall{Call: call} +} + +// MockReporterEnvCall wrap *gomock.Call +type MockReporterEnvCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterEnvCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterEnvCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterEnvCall) Do(f func(string, string) (ci.Receipt, error)) *MockReporterEnvCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterEnvCall) DoAndReturn(f func(string, string) (ci.Receipt, error)) *MockReporterEnvCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Group mocks base method. +func (m *MockReporter) Group(title string) (func(), ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Group", title) + ret0, _ := ret[0].(func()) + ret1, _ := ret[1].(ci.Receipt) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// Group indicates an expected call of Group. +func (mr *MockReporterMockRecorder) Group(title any) *MockReporterGroupCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Group", reflect.TypeOf((*MockReporter)(nil).Group), title) + return &MockReporterGroupCall{Call: call} +} + +// MockReporterGroupCall wrap *gomock.Call +type MockReporterGroupCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterGroupCall) Return(end func(), receipt ci.Receipt, err error) *MockReporterGroupCall { + c.Call = c.Call.Return(end, receipt, err) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterGroupCall) Do(f func(string) (func(), ci.Receipt, error)) *MockReporterGroupCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterGroupCall) DoAndReturn(f func(string) (func(), ci.Receipt, error)) *MockReporterGroupCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Mask mocks base method. +func (m *MockReporter) Mask(value string) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Mask", value) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Mask indicates an expected call of Mask. +func (mr *MockReporterMockRecorder) Mask(value any) *MockReporterMaskCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mask", reflect.TypeOf((*MockReporter)(nil).Mask), value) + return &MockReporterMaskCall{Call: call} +} + +// MockReporterMaskCall wrap *gomock.Call +type MockReporterMaskCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterMaskCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterMaskCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterMaskCall) Do(f func(string) (ci.Receipt, error)) *MockReporterMaskCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterMaskCall) DoAndReturn(f func(string) (ci.Receipt, error)) *MockReporterMaskCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Output mocks base method. +func (m *MockReporter) Output(key, value string) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Output", key, value) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Output indicates an expected call of Output. +func (mr *MockReporterMockRecorder) Output(key, value any) *MockReporterOutputCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Output", reflect.TypeOf((*MockReporter)(nil).Output), key, value) + return &MockReporterOutputCall{Call: call} +} + +// MockReporterOutputCall wrap *gomock.Call +type MockReporterOutputCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterOutputCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterOutputCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterOutputCall) Do(f func(string, string) (ci.Receipt, error)) *MockReporterOutputCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterOutputCall) DoAndReturn(f func(string, string) (ci.Receipt, error)) *MockReporterOutputCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Path mocks base method. +func (m *MockReporter) Path(dir string) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Path", dir) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Path indicates an expected call of Path. +func (mr *MockReporterMockRecorder) Path(dir any) *MockReporterPathCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Path", reflect.TypeOf((*MockReporter)(nil).Path), dir) + return &MockReporterPathCall{Call: call} +} + +// MockReporterPathCall wrap *gomock.Call +type MockReporterPathCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterPathCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterPathCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterPathCall) Do(f func(string) (ci.Receipt, error)) *MockReporterPathCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterPathCall) DoAndReturn(f func(string) (ci.Receipt, error)) *MockReporterPathCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RenderComment mocks base method. +func (m *MockReporter) RenderComment(name string, data any) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RenderComment", name, data) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RenderComment indicates an expected call of RenderComment. +func (mr *MockReporterMockRecorder) RenderComment(name, data any) *MockReporterRenderCommentCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenderComment", reflect.TypeOf((*MockReporter)(nil).RenderComment), name, data) + return &MockReporterRenderCommentCall{Call: call} +} + +// MockReporterRenderCommentCall wrap *gomock.Call +type MockReporterRenderCommentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterRenderCommentCall) Return(arg0 string, arg1 error) *MockReporterRenderCommentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterRenderCommentCall) Do(f func(string, any) (string, error)) *MockReporterRenderCommentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterRenderCommentCall) DoAndReturn(f func(string, any) (string, error)) *MockReporterRenderCommentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RenderSummary mocks base method. +func (m *MockReporter) RenderSummary(name string, data any) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RenderSummary", name, data) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RenderSummary indicates an expected call of RenderSummary. +func (mr *MockReporterMockRecorder) RenderSummary(name, data any) *MockReporterRenderSummaryCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenderSummary", reflect.TypeOf((*MockReporter)(nil).RenderSummary), name, data) + return &MockReporterRenderSummaryCall{Call: call} +} + +// MockReporterRenderSummaryCall wrap *gomock.Call +type MockReporterRenderSummaryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterRenderSummaryCall) Return(arg0 string, arg1 error) *MockReporterRenderSummaryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterRenderSummaryCall) Do(f func(string, any) (string, error)) *MockReporterRenderSummaryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterRenderSummaryCall) DoAndReturn(f func(string, any) (string, error)) *MockReporterRenderSummaryCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// SARIF mocks base method. +func (m *MockReporter) SARIF(ctx context.Context, report ci.SARIFReport) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SARIF", ctx, report) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SARIF indicates an expected call of SARIF. +func (mr *MockReporterMockRecorder) SARIF(ctx, report any) *MockReporterSARIFCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SARIF", reflect.TypeOf((*MockReporter)(nil).SARIF), ctx, report) + return &MockReporterSARIFCall{Call: call} +} + +// MockReporterSARIFCall wrap *gomock.Call +type MockReporterSARIFCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterSARIFCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterSARIFCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterSARIFCall) Do(f func(context.Context, ci.SARIFReport) (ci.Receipt, error)) *MockReporterSARIFCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterSARIFCall) DoAndReturn(f func(context.Context, ci.SARIFReport) (ci.Receipt, error)) *MockReporterSARIFCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Summary mocks base method. +func (m *MockReporter) Summary(markdown string) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Summary", markdown) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Summary indicates an expected call of Summary. +func (mr *MockReporterMockRecorder) Summary(markdown any) *MockReporterSummaryCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Summary", reflect.TypeOf((*MockReporter)(nil).Summary), markdown) + return &MockReporterSummaryCall{Call: call} +} + +// MockReporterSummaryCall wrap *gomock.Call +type MockReporterSummaryCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterSummaryCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterSummaryCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterSummaryCall) Do(f func(string) (ci.Receipt, error)) *MockReporterSummaryCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterSummaryCall) DoAndReturn(f func(string) (ci.Receipt, error)) *MockReporterSummaryCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// UpdateCheck mocks base method. +func (m *MockReporter) UpdateCheck(ctx context.Context, req ci.CheckRequest) (ci.Receipt, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateCheck", ctx, req) + ret0, _ := ret[0].(ci.Receipt) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateCheck indicates an expected call of UpdateCheck. +func (mr *MockReporterMockRecorder) UpdateCheck(ctx, req any) *MockReporterUpdateCheckCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCheck", reflect.TypeOf((*MockReporter)(nil).UpdateCheck), ctx, req) + return &MockReporterUpdateCheckCall{Call: call} +} + +// MockReporterUpdateCheckCall wrap *gomock.Call +type MockReporterUpdateCheckCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterUpdateCheckCall) Return(arg0 ci.Receipt, arg1 error) *MockReporterUpdateCheckCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterUpdateCheckCall) Do(f func(context.Context, ci.CheckRequest) (ci.Receipt, error)) *MockReporterUpdateCheckCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterUpdateCheckCall) DoAndReturn(f func(context.Context, ci.CheckRequest) (ci.Receipt, error)) *MockReporterUpdateCheckCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// WithOutput mocks base method. +func (m *MockReporter) WithOutput(w io.Writer) ci.Reporter { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WithOutput", w) + ret0, _ := ret[0].(ci.Reporter) + return ret0 +} + +// WithOutput indicates an expected call of WithOutput. +func (mr *MockReporterMockRecorder) WithOutput(w any) *MockReporterWithOutputCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithOutput", reflect.TypeOf((*MockReporter)(nil).WithOutput), w) + return &MockReporterWithOutputCall{Call: call} +} + +// MockReporterWithOutputCall wrap *gomock.Call +type MockReporterWithOutputCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockReporterWithOutputCall) Return(arg0 ci.Reporter) *MockReporterWithOutputCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockReporterWithOutputCall) Do(f func(io.Writer) ci.Reporter) *MockReporterWithOutputCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockReporterWithOutputCall) DoAndReturn(f func(io.Writer) ci.Reporter) *MockReporterWithOutputCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/pkg/runner/step/testmain_test.go b/pkg/runner/step/testmain_test.go index 4597d519c9f..3c63bf430c8 100644 --- a/pkg/runner/step/testmain_test.go +++ b/pkg/runner/step/testmain_test.go @@ -21,7 +21,11 @@ import ( // on in CI). The test binary itself impersonates the shell: it echoes a // "ready" marker in response to a scripted "printf ready" line, mirroring // pkg/asciicast's own session test helper. -const sessionShellHelperEnv = "_ATMOS_STEP_SESSION_SHELL" +const ( + sessionShellHelperEnv = "_ATMOS_STEP_SESSION_SHELL" + sessionShellReadyFileEnv = "_ATMOS_STEP_SESSION_READY_FILE" + sessionShellStartupDelayEnv = "_ATMOS_STEP_SESSION_STARTUP_DELAY" +) // sessionShellBannerEnv makes the fake shell print sessionShellBanner once it reads input. const ( @@ -148,9 +152,15 @@ func runStepSessionShellHelper() { // The test binary can emit terminal queries during startup that swallow // input typed before the helper starts reading. Tests that need their typed // line to reach the helper wait for this banner before typing. + if delay, err := time.ParseDuration(os.Getenv(sessionShellStartupDelayEnv)); err == nil { + time.Sleep(delay) + } if os.Getenv(sessionShellBannerEnv) == "1" { _, _ = os.Stdout.WriteString(sessionShellBanner + "\n") } + if path := os.Getenv(sessionShellReadyFileEnv); path != "" { + _ = os.WriteFile(path, []byte("ready"), 0o600) + } if os.Getenv(sessionShellDelayEnv) == "1" { time.Sleep(3 * time.Second) } diff --git a/pkg/runner/step/variables.go b/pkg/runner/step/variables.go index c44a5efc5c9..21e3b22e411 100644 --- a/pkg/runner/step/variables.go +++ b/pkg/runner/step/variables.go @@ -86,6 +86,9 @@ type Variables struct { // artifacts holds the retained operation identities and the report collector of artifact steps. // It is shared by every Variables cloned from this one. artifacts *artifactSession + // artifactScope numbers the artifact operations of a parallel branch. It is nil outside a branch, + // where the session's root scope applies. + artifactScope *artifactScope } // OutputWriters routes step subprocess output through component-scoped streams. diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index 2f88b3f1f0e..743cf0f2bfa 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -1622,6 +1622,12 @@ type CITemplatesConfig struct { // Container maps a container operation name (`image`) to a template file name under base_path. Container map[string]string `yaml:"container,omitempty" json:"container,omitempty" mapstructure:"container"` + + // Artifacts maps an artifact operation name (`summary` for the whole report frame, or an action + // such as `publish`, `pull`, `copy`, `delete`, `sign`, `verify`, `inspect`, `show`, `list`, or + // `search` for one operation's section) to a template file name under base_path. A configured + // file that does not exist is an error; the built-in template is used only when the key is unset. + Artifacts map[string]string `yaml:"artifacts,omitempty" json:"artifacts,omitempty" mapstructure:"artifacts"` } type Helmfile struct { diff --git a/pkg/script/starlark/parallel.go b/pkg/script/starlark/parallel.go index e1f322ead4d..8bd6430e064 100644 --- a/pkg/script/starlark/parallel.go +++ b/pkg/script/starlark/parallel.go @@ -103,9 +103,10 @@ type parallelRun struct { } func (s *session) runParallel(ctx context.Context, tasks []*task, run parallelRun) (starlark.Value, error) { + run.library = scheduleGroup(run.library) graph := dependency.NewGraph() for i, t := range tasks { - if err := graph.AddNode(&dependency.Node{ID: fmt.Sprintf("%09d", i), Metadata: map[string]any{"task": t}}); err != nil { + if err := graph.AddNode(&dependency.Node{ID: fmt.Sprintf("%09d", i), Metadata: map[string]any{"task": t, "index": i}}); err != nil { return nil, err } } @@ -113,7 +114,8 @@ func (s *session) runParallel(ctx context.Context, tasks []*task, run parallelRu defer cancel() dispatcher := scheduler.DispatcherFunc(func(ctx context.Context, node *dependency.Node) (scheduler.Result, error) { t := node.Metadata["task"].(*task) - value, err := s.runTask(ctx, taskPrefix(run.prefix, t, len(tasks)), t, run.library) + index, _ := node.Metadata["index"].(int) + value, err := s.runTask(ctx, taskPrefix(run.prefix, t, len(tasks)), t, scheduleBranch(run.library, index)) if err != nil && run.failFast { cancel() } @@ -215,6 +217,9 @@ func (s *session) runTask(ctx context.Context, prefix string, t *task, library a ctx, cancel = arm(ctx, t.timeout) defer cancel() } + if scoped, ok := library.(interface{ ForkTask() api.StepLibrary }); ok { + library = scoped.ForkTask() + } s.event(TaskEvent{Name: t.name, Status: "running"}) cfg := retry.DefaultConfig() if t.retry != nil { diff --git a/pkg/script/starlark/schedule_test.go b/pkg/script/starlark/schedule_test.go new file mode 100644 index 00000000000..d7bee94bd4e --- /dev/null +++ b/pkg/script/starlark/schedule_test.go @@ -0,0 +1,204 @@ +package starlark + +import ( + "context" + "sync" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cloudposse/atmos/pkg/api" + "github.com/cloudposse/atmos/pkg/script" +) + +// scheduledFake is a step library that records the scheduled index of each fork. +type scheduledFake struct { + forks *[]int +} + +func (scheduledFake) Names() []string { return nil } +func (scheduledFake) Validate(*api.StepCall) error { return nil } +func (scheduledFake) Run(context.Context, *api.StepCall) (*api.StepResult, error) { return nil, nil } + +func (f scheduledFake) Fork() api.StepLibrary { *f.forks = append(*f.forks, -1); return f } + +func (f scheduledFake) ForkAt(index int) api.StepLibrary { + *f.forks = append(*f.forks, index) + return f +} + +func TestScheduleBranchForksEveryAttemptAtTheBranchIndex(t *testing.T) { + var forks []int + parent := scheduledFake{forks: &forks} + branch := scheduleBranch(parent, 3) + + // Each retry attempt forks again; every fork records the same scheduled index. + forkSteps(branch) + forkSteps(branch) + assert.Equal(t, []int{3, 3}, forks) +} + +func TestScheduleBranchLeavesOtherLibrariesAlone(t *testing.T) { + assert.Nil(t, scheduleBranch(nil, 1)) + + var forks []int + // A library that does not implement api.ScheduledForker keeps forking normally. + var plain api.StepLibrary = struct{ api.StepLibrary }{scheduledFake{forks: &forks}} + assert.Equal(t, plain, scheduleBranch(plain, 1)) + forkSteps(scheduleBranch(plain, 1)) + assert.Equal(t, []int{-1}, forks) +} + +// TestParallelForksEachBranchAtItsScheduledIndex runs a real script and checks that the library +// the engine hands to a branch was forked at the branch's index in the group. +func TestParallelForksEachBranchAtItsScheduledIndex(t *testing.T) { + var ( + mu sync.Mutex + forks []int + ) + library := &lockedFake{mu: &mu, forks: &forks} + _, err := New().Execute(t.Context(), script.Spec{ + Steps: library, + Source: "def work(name):\n return name\nsteps.parallel(tasks = [steps.task(name = n, function = work, args = [n]) for n in [\"a\", \"b\", \"c\"]], max_concurrency = 3)\n", + }) + require.NoError(t, err) + + mu.Lock() + defer mu.Unlock() + assert.ElementsMatch(t, []int{0, 1, 2}, scheduledIndexes(forks), "every branch forks at its own scheduled index") +} + +// scheduledIndexes drops the unscheduled forks (the engine's own thread fork). +func scheduledIndexes(forks []int) []int { + var scheduled []int + for _, index := range forks { + if index >= 0 { + scheduled = append(scheduled, index) + } + } + return scheduled +} + +// lockedFake is a concurrency-safe scheduled step library. +type lockedFake struct { + mu *sync.Mutex + forks *[]int +} + +func (*lockedFake) Names() []string { return nil } +func (*lockedFake) Validate(*api.StepCall) error { return nil } +func (*lockedFake) Run(context.Context, *api.StepCall) (*api.StepResult, error) { return nil, nil } + +func (l *lockedFake) Fork() api.StepLibrary { + l.mu.Lock() + defer l.mu.Unlock() + *l.forks = append(*l.forks, -1) + return l +} + +func (l *lockedFake) ForkAt(index int) api.StepLibrary { + l.mu.Lock() + defer l.mu.Unlock() + *l.forks = append(*l.forks, index) + return l +} + +// groupFake is a library that positions parallel groups and counts the groups it was asked for. +type groupFake struct { + lockedFake + + groups *int +} + +// Fork keeps the group-scheduling library, as the engine forks it for the script's own thread. +func (g *groupFake) Fork() api.StepLibrary { + g.lockedFake.Fork() + return g +} + +func (g *groupFake) ScheduleGroup() api.ScheduledForker { + g.mu.Lock() + defer g.mu.Unlock() + *g.groups++ + return g +} + +var _ api.GroupScheduler = (*groupFake)(nil) + +func TestScheduleGroupReservesOnePositionPerGroup(t *testing.T) { + var ( + mu sync.Mutex + forks []int + groups int + ) + library := &groupFake{lockedFake: lockedFake{mu: &mu, forks: &forks}, groups: &groups} + _, err := New().Execute(t.Context(), script.Spec{ + Steps: library, + Source: "def work(name):\n return name\n" + + "steps.parallel(tasks = [steps.task(name = n, function = work, args = [n]) for n in [\"a\", \"b\", \"c\"]], max_concurrency = 3)\n" + + "steps.parallel(tasks = [steps.task(name = n, function = work, args = [n]) for n in [\"d\", \"e\"]], max_concurrency = 2)\n", + }) + require.NoError(t, err) + + mu.Lock() + defer mu.Unlock() + assert.Equal(t, 2, groups, "each parallel group reserves its position once, not once per branch") + assert.ElementsMatch(t, []int{0, 1, 2, 0, 1}, scheduledIndexes(forks), "the branches of each group fork from the group's library") +} + +func TestScheduleGroupLeavesOtherLibrariesAlone(t *testing.T) { + assert.Nil(t, scheduleGroup(nil)) + + var forks []int + plain := scheduledFake{forks: &forks} + assert.Equal(t, api.StepLibrary(plain), scheduleGroup(plain), "a library that does not position groups is used as is") +} + +// taskForkFake is a step library that hands every parallel task its own fork, as the automation +// library does to isolate artifact operation identities. +type taskForkFake struct { + mu *sync.Mutex + id int + next *int + steps *[]int +} + +func (*taskForkFake) Names() []string { return []string{"ping"} } +func (*taskForkFake) Validate(*api.StepCall) error { return nil } + +func (f *taskForkFake) Run(context.Context, *api.StepCall) (*api.StepResult, error) { + f.mu.Lock() + defer f.mu.Unlock() + *f.steps = append(*f.steps, f.id) + return &api.StepResult{}, nil +} + +func (f *taskForkFake) Fork() api.StepLibrary { return f } + +func (f *taskForkFake) ForkTask() api.StepLibrary { + f.mu.Lock() + defer f.mu.Unlock() + *f.next++ + return &taskForkFake{mu: f.mu, id: *f.next, next: f.next, steps: f.steps} +} + +// TestParallelTasksRunOnTheirOwnTaskFork checks that steps called inside a parallel task reach the +// task's fork and never the group's shared library. +func TestParallelTasksRunOnTheirOwnTaskFork(t *testing.T) { + var ( + mu sync.Mutex + next int + steps []int + ) + library := &taskForkFake{mu: &mu, next: &next, steps: &steps} + _, err := New().Execute(t.Context(), script.Spec{ + Steps: library, + Source: "def work(name):\n steps.ping()\nsteps.parallel(tasks = [steps.task(name = n, function = work, args = [n]) for n in [\"a\", \"b\"]], max_concurrency = 2)\n", + }) + require.NoError(t, err) + + mu.Lock() + defer mu.Unlock() + assert.ElementsMatch(t, []int{1, 2}, steps, "each task steps on its own fork, never on the shared library (id 0)") +} diff --git a/pkg/script/starlark/steps.go b/pkg/script/starlark/steps.go index 879f0687114..fd27f0512c2 100644 --- a/pkg/script/starlark/steps.go +++ b/pkg/script/starlark/steps.go @@ -12,6 +12,7 @@ import ( "github.com/cloudposse/atmos/pkg/api" iolib "github.com/cloudposse/atmos/pkg/io" + "github.com/cloudposse/atmos/pkg/perf" ) const stepLibraryKey = "atmos.step-library" @@ -159,3 +160,35 @@ func forkSteps(library api.StepLibrary) api.StepLibrary { } return library.Fork() } + +// scheduledLibrary is the parent library of a parallel group, seen from one branch: every fork the +// branch makes, including the fork of each retry attempt, records the branch's scheduled index. +type scheduledLibrary struct { + api.StepLibrary + index int +} + +// Fork implements api.StepLibrary. +func (l scheduledLibrary) Fork() api.StepLibrary { + defer perf.Track(nil, "starlark.scheduledLibrary.Fork")() + + return l.StepLibrary.(api.ScheduledForker).ForkAt(l.index) +} + +// scheduleBranch returns the library a branch at the given index of a parallel group forks from. A +// library that cannot record scheduled positions is returned unchanged and forks normally. +func scheduleBranch(library api.StepLibrary, index int) api.StepLibrary { + if _, ok := library.(api.ScheduledForker); !ok { + return library + } + return scheduledLibrary{StepLibrary: library, index: index} +} + +// scheduleGroup reserves one scheduled position for a parallel group, and returns the library its +// branches fork from. A library that does not position groups is returned unchanged. +func scheduleGroup(library api.StepLibrary) api.StepLibrary { + if scheduler, ok := library.(api.GroupScheduler); ok { + return scheduler.ScheduleGroup() + } + return library +} diff --git a/pkg/utils/yaml_tag_walker.go b/pkg/utils/yaml_tag_walker.go index a476e1e5653..77cdc1ee4e7 100644 --- a/pkg/utils/yaml_tag_walker.go +++ b/pkg/utils/yaml_tag_walker.go @@ -354,6 +354,14 @@ func simpleTagHandler(resolve func(fullTagValue string) (any, error)) TagHandler } } +// LocalIncludeFile resolves an !include path to the local file it names, or "" for a remote +// include. It is the thin adapter callers outside this package (such as the scaffold +// publication-root confinement in pkg/manifest) use to locate an include without +// duplicating the resolution rules. +func LocalIncludeFile(includeFile, manifestFile string, atmosConfig *schema.AtmosConfiguration) string { + return findLocalFile(includeFile, manifestFile, atmosConfig) +} + // ScaffoldTagPolicy returns the TagWalkPolicy used to resolve scaffold.yaml // manifests. Unlike the stack-manifest policy, Defer is false: scaffold.yaml // has no later evaluation phase, so a tag needing real stack/component/ diff --git a/pkg/workflow/test_runner.go b/pkg/workflow/test_runner.go index 121f7b7e98f..9f1053f5fe6 100644 --- a/pkg/workflow/test_runner.go +++ b/pkg/workflow/test_runner.go @@ -285,14 +285,16 @@ func (r *testRun) skipStep(s *schema.WorkflowStep, status string) { } type testGroupExecutor struct { - run *testRun - parent *schema.WorkflowStep - group *testGroup - vars *step.Variables - mu sync.Mutex - failures atomic.Int64 - policy controlFailConfig - cancel context.CancelFunc + run *testRun + parent *schema.WorkflowStep + group *testGroup + vars *step.Variables + scheduled *step.ScheduledGroup + indices map[string]int + mu sync.Mutex + failures atomic.Int64 + policy controlFailConfig + cancel context.CancelFunc } // group schedules isolated children with the group concurrency and failure policies. @@ -305,7 +307,11 @@ func (r *testRun) group(ctx context.Context, s *schema.WorkflowStep, g *testGrou r.report.Update("step:"+s.Name, testreport.Failed, 0, err.Error()) return err } - executor := &testGroupExecutor{run: r, parent: s, group: g, vars: groupVars, policy: effectiveControlFail(s), cancel: cancel} + indices := make(map[string]int, len(g.order)) + for index, id := range g.order { + indices[id] = index + } + executor := &testGroupExecutor{run: r, parent: s, group: g, vars: groupVars, scheduled: groupVars.ScheduleGroup(), indices: indices, policy: effectiveControlFail(s), cancel: cancel} aggregate := scheduler.New(g.graph, executor, scheduler.WithMaxConcurrency(effectiveControlConcurrency(s, len(g.order)))).Run(ctx) r.reportSkipped(g, aggregate) for name, result := range groupVars.Steps { @@ -331,7 +337,7 @@ func (r *testRun) group(ctx context.Context, s *schema.WorkflowStep, g *testGrou // Dispatch executes one scheduled case and records its result before applying group cancellation. func (e *testGroupExecutor) Dispatch(ctx context.Context, node *dependency.Node) (scheduler.Result, error) { cn := node.Metadata["child"].(controlNode) - local := e.branchVariables(cn.matrix) + local := e.branchVariables(node.ID, cn.matrix) child := cn.step if len(cn.matrix) > 0 { child.Name = strings.TrimPrefix(child.Name, e.parent.Name+"_"+matrixRowSuffix(cn.matrix)+"_") @@ -364,9 +370,9 @@ func (e *testGroupExecutor) accountFailure(vars *step.Variables) bool { } // branchVariables isolates mutable state and exposes prior results from the same matrix row. -func (e *testGroupExecutor) branchVariables(matrix map[string]string) *step.Variables { +func (e *testGroupExecutor) branchVariables(id string, matrix map[string]string) *step.Variables { e.mu.Lock() - local := e.vars.Clone() + local := e.scheduled.ForkAt(e.indices[id]) e.mu.Unlock() local.SetTemplateRoot("matrix", matrix) if len(matrix) == 0 { diff --git a/website/blog/2026-10-31-artifacts.mdx b/website/blog/2026-10-31-artifacts.mdx new file mode 100644 index 00000000000..776f6b47824 --- /dev/null +++ b/website/blog/2026-10-31-artifacts.mdx @@ -0,0 +1,67 @@ +--- +slug: artifacts +title: "Publish, Discover, and Restore Versioned Artifacts from One Repository Config" +authors: [osterman] +tags: [feature, experimental] +--- + +Every team ends up with the same pile of shared assets: component source trees, scaffolds, backups, configuration, container images. Each one tends to grow its own way to publish and fetch it. One lives in an OCI registry, another in an S3 bucket, a third in a directory somebody copies around, and none of them tell you in the CI log what was actually published. Moving a workflow from one storage backend to another means rewriting the workflow. + +Atmos now has a single artifact model for all of it. You configure the destinations once, publish many named, versioned artifacts into them, and switch backends by changing the repository name rather than the workflow. + + + +## The Problem + +Publishing and restoring shared assets usually means a different tool, flag set, and naming convention per backend. Documentation such as a package README is only reachable after downloading the whole payload. CI jobs finish without leaving a record of what they published, and an air-gapped environment has no way to prove that what it restores is what was published. + +## The Fix + +The `artifacts` section of `atmos.yaml` declares repositories. A repository is a collection root that holds many artifacts of different kinds, on OCI registries, OCI layouts, S3, local directories, or local archives. Each artifact has a name, an explicit version, labels, a README and CHANGELOG, and content digests. Because the README and CHANGELOG are stored apart from the payload, `atmos artifacts show` reads them without downloading anything else. + +The same operations run in four places: the CLI, workflows and custom commands through the [`artifact` step](/steps/type/artifact), and Terraform lifecycle hooks. In CI, each operation leaves a job summary with the outcome, the destination, the digests, and whether a signature was verified. + +## How to Use It + +Declare the repositories once, following the [artifacts configuration](/cli/configuration/artifacts): + +```yaml +artifacts: + repositories: + shared: + kind: oci/registry + identity: registry-publisher + options: + registry: ghcr.io + prefix: acme/atmos + backups: + kind: aws/s3 + packaging: tgz + options: + bucket: acme-artifacts + prefix: atmos + local: + kind: local/dir + options: + path: .atmos/artifacts +``` + +Then [publish](/cli/commands/artifacts/publish) a component tree. Changing only `--repository` sends it to a different backend: + +```shell +atmos artifacts publish ./components/terraform/vpc \ + --repository=shared \ + --name=components/terraform/vpc \ + --version=1.2.0 \ + --kind=component/terraform +``` + +From there, the [`atmos artifacts` commands](/cli/commands/artifacts/usage) cover the rest of the lifecycle: pull, copy between repositories, inspect, list, search by label, sign, verify, and delete. [Catalogs](/cli/commands/artifacts/catalog) add an optional maintained index for registries that cannot enumerate their contents. Scaffolds publish with [`atmos scaffold publish`](/cli/commands/scaffold/publish), and the [supported artifact kinds](/cli/commands/artifacts/kinds) drop transient files such as `.terraform/` and state files from component packages. + +Publishing is idempotent. Republishing identical content is a no-op, changed content is a conflict unless you pass `--force`, and existing plugin releases stay immutable either way. When a trust policy is configured, `sign` and `verify` use Sigstore, and a checksum is never reported as proof of who published an artifact. + +This feature is experimental. Command names, flags, and the configuration shape may still change based on your feedback. + +## Get Involved + +Try it against a local repository first, then point the same commands at S3 or a registry. Tell us what is missing in the [Atmos discussions](https://github.com/orgs/cloudposse/discussions) or open an issue on [GitHub](https://github.com/cloudposse/atmos/issues). diff --git a/website/docs/ci/job-summaries.mdx b/website/docs/ci/job-summaries.mdx index 3aa834a8e68..463d22aee3f 100644 --- a/website/docs/ci/job-summaries.mdx +++ b/website/docs/ci/job-summaries.mdx @@ -169,6 +169,14 @@ includes a reproduction command, with `--fail-on-drift` when used. CloudFormation also publishes [CI output variables](/ci#outputs). It does not publish commit statuses, PR comments, or stored artifacts. +## Artifact Summaries + +[Artifact operations](/cli/commands/artifacts/usage#ci-summaries-and-outputs) write one report per command, +workflow, custom command, or hook, even when an operation failed. The report lists every operation with its +outcome, destination, labeled digests, size, duration, and lock scope, and shows the signature subject and verified +signer for `sign` and `verify`. A signed artifact is never reported as verified, and a checksum is never reported +as publisher authentication. Customize it with [`ci.templates.artifacts`](/cli/configuration/ci/templates#artifacts). + ## Configuration
diff --git a/website/docs/cli/commands/artifacts/catalog-add.mdx b/website/docs/cli/commands/artifacts/catalog-add.mdx index ab5ff715ab7..3ac4176b78c 100644 --- a/website/docs/cli/commands/artifacts/catalog-add.mdx +++ b/website/docs/cli/commands/artifacts/catalog-add.mdx @@ -8,6 +8,7 @@ description: List releases in the repository's published catalog. import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Resolve one or more releases and list them in the latest published catalog, creating the catalog when none exists. Only artifact metadata is read. @@ -15,6 +16,8 @@ Resolve one or more releases and list them in the latest published catalog, crea + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/catalog-build.mdx b/website/docs/cli/commands/artifacts/catalog-build.mdx index 7481871ffe0..8ccdc33d0e5 100644 --- a/website/docs/cli/commands/artifacts/catalog-build.mdx +++ b/website/docs/cli/commands/artifacts/catalog-build.mdx @@ -8,6 +8,7 @@ description: Build a catalog snapshot from an inventory without publishing it. import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Resolve the releases of an inventory in one repository and write them to a catalog snapshot file. Build reads artifact metadata only: it downloads no payload and publishes nothing. @@ -15,6 +16,8 @@ Resolve the releases of an inventory in one repository and write them to a catal + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/catalog-publish.mdx b/website/docs/cli/commands/artifacts/catalog-publish.mdx index 968b9280e50..5147d80df2b 100644 --- a/website/docs/cli/commands/artifacts/catalog-publish.mdx +++ b/website/docs/cli/commands/artifacts/catalog-publish.mdx @@ -8,6 +8,7 @@ description: Publish a catalog snapshot to the repository's configured catalog. import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Publish a catalog snapshot to the catalog configured on a repository. The command refuses to overwrite newer catalog metadata with a stale snapshot. @@ -15,6 +16,8 @@ Publish a catalog snapshot to the catalog configured on a repository. The comman + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/catalog-remove.mdx b/website/docs/cli/commands/artifacts/catalog-remove.mdx index 8255994b362..97b1739e335 100644 --- a/website/docs/cli/commands/artifacts/catalog-remove.mdx +++ b/website/docs/cli/commands/artifacts/catalog-remove.mdx @@ -8,6 +8,7 @@ description: Unlist a release from the repository's published catalog. import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Unlist a release from the latest published catalog. The artifact, its signatures, and every consumer lock file are untouched. @@ -15,6 +16,8 @@ Unlist a release from the latest published catalog. The artifact, its signatures + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/catalog-sync.mdx b/website/docs/cli/commands/artifacts/catalog-sync.mdx index 38b3e164a63..425bebd6fb8 100644 --- a/website/docs/cli/commands/artifacts/catalog-sync.mdx +++ b/website/docs/cli/commands/artifacts/catalog-sync.mdx @@ -8,6 +8,7 @@ description: Merge an inventory's releases into the repository's published catal import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Resolve the releases of an inventory and merge them into the latest published catalog. Entries the inventory does not mention are kept, so sync is safe to run on a schedule. @@ -15,6 +16,8 @@ Resolve the releases of an inventory and merge them into the latest published ca + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/catalog.mdx b/website/docs/cli/commands/artifacts/catalog.mdx index 9ce6dbfed9a..cd4bc0c2d03 100644 --- a/website/docs/cli/commands/artifacts/catalog.mdx +++ b/website/docs/cli/commands/artifacts/catalog.mdx @@ -8,6 +8,7 @@ description: Build and maintain the optional discovery catalog of an artifact re import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' A catalog is a maintained discovery snapshot of one repository. It lets you list and search a whole OCI registry collection when the registry cannot enumerate its repositories. Direct reads never need a catalog. @@ -15,6 +16,8 @@ A catalog is a maintained discovery snapshot of one repository. It lets you list + + ## Usage ```shell diff --git a/website/docs/cli/commands/artifacts/kinds.mdx b/website/docs/cli/commands/artifacts/kinds.mdx new file mode 100644 index 00000000000..0b881c8a1d9 --- /dev/null +++ b/website/docs/cli/commands/artifacts/kinds.mdx @@ -0,0 +1,93 @@ +--- +title: Artifact Kinds +sidebar_label: kinds +id: kinds +description: What each artifact kind validates, excludes, and records, and how existing consumers read published scaffolds and components. +--- + +import Intro from '@site/src/components/Intro' +import Experimental from '@site/src/components/Experimental' + + +An artifact kind says what the content means. Every kind publishes through the same command, the same repositories, and the same signatures; a kind only adds the validation and the default exclusions that suit its content. + + + + +Choose the kind with `atmos artifacts publish --kind=`. Convenience commands supply their own kind, so [`atmos scaffold publish`](/cli/commands/scaffold/publish) needs no `--kind`. The kind is independent of the repository kind: a `scaffold` publishes equally to a local directory, an S3 bucket, or an OCI registry. + +
+
`files` (default)
+
+ Any file or directory. Nothing is validated and nothing is excluded, which makes it the right kind for backups, configuration, modules, and any tree that no other kind describes. Generic publishing never inherits the exclusions of another kind. +
+ +
`scaffold`
+
+ A scaffold template directory. The producer validates `scaffold.yaml` at the source root without generating output or running scaffold hooks, and takes the default name, version, and description from the manifest. It excludes nothing. +
+ +
`component/terraform`
+
+ A Terraform root module. The producer leaves out Terraform working directories, state, and saved plans, and records the component type in the Record's kind data. Publishing never runs Terraform and needs no stack. +
+
+ +## Scaffolds + +`atmos scaffold publish ./scaffolds/landing-zone --repository=shared` validates the manifest and publishes the directory. See [`atmos scaffold publish`](/cli/commands/scaffold/publish) for the name and version precedence, the two README roles, and the errors. + +The root `README.md` is part of the scaffold and keeps its generation behavior. The reserved `.atmos/artifact/` directory holds the package `README.md` and `CHANGELOG.md`. It is distribution metadata, so scaffold generation and updates never write it, from a published release or from a plain directory. + +## Terraform Components + +```shell +atmos artifacts publish ./components/terraform/vpc \ + --repository=shared --name=components/terraform/vpc --version=1.2.0 --kind=component/terraform +``` + +The `component/terraform` producer applies these default exclusions at any depth below the source: + +
+
`.terraform/**`
+
Every `.terraform` directory and its contents: downloaded providers and modules, and backend initialization data.
+ +
`*.tfstate` and `*.tfstate.*`
+
State files and their backups, including the `terraform.tfstate.d` workspace directory.
+ +
`*.tfplan` and `*.tfplan.*`
+
Saved plan files and their JSON renderings.
+
+ +The dependency lock file `.terraform.lock.hcl` stays in the payload, because it belongs to the component. Scripts keep their executable bits. A root `README.md` is ordinary content, and `.atmos/artifact/README.md` and `.atmos/artifact/CHANGELOG.md` become the package documents. + +Every exclusion is visible. A dry run, like a real publication, reports each excluded entry with the rule that excluded it as an `excluded` entry in the result's `diagnostics`, so you see what the package leaves out before anything is written: + +```shell +atmos artifacts publish ./components/terraform/vpc --repository=shared \ + --name=components/terraform/vpc --version=1.2.0 --kind=component/terraform --dry-run +``` + +The exclusions belong to the `component/terraform` kind only. Publish the same directory with the default `files` kind, for example as a backup of a working directory, and every requested file is kept. + +The component name has no default beyond the source basename, and the version is always explicit. The `metadata.name` in a `component.yaml` names the vendoring manifest and its `source.version` is the upstream version, so neither describes the component you are publishing. + +## Other Trees + +Terraform modules, stack and configuration trees, and any other directory publish as `files`. Atmos does not add provider-cache, module-cache, or export adapters for them. + +## Consuming Published Packages + +Existing consumers read a published package through its `oci://` reference, for example `oci://registry.example.com/acme/atmos/components/terraform/vpc:1.2.0`: + +- Component source provisioning (a component `source` with an `oci://` URI), vendoring, and `atmos scaffold generate` fetch the package's payload layer and nothing else. The README and CHANGELOG blobs are never unpacked, and the `.atmos/artifact/` distribution files never reach the provisioned component or the generated project. +- Executable bits survive, and `.terraform.lock.hcl` arrives with the component. +- Images published before artifacts existed, such as single-layer component images and OpenTofu module packages, extract exactly as they did. +- [`atmos artifacts show`](/cli/commands/artifacts/show) reads a package README or CHANGELOG from its own blob without downloading the payload. + +## Related + +- [`atmos artifacts publish`](/cli/commands/artifacts/publish) +- [`atmos scaffold publish`](/cli/commands/scaffold/publish) +- [`atmos artifacts pull`](/cli/commands/artifacts/pull) +- [Artifacts Configuration](/cli/configuration/artifacts) diff --git a/website/docs/cli/commands/artifacts/list.mdx b/website/docs/cli/commands/artifacts/list.mdx index 23866a987b5..04243d6acd9 100644 --- a/website/docs/cli/commands/artifacts/list.mdx +++ b/website/docs/cli/commands/artifacts/list.mdx @@ -44,7 +44,19 @@ atmos artifacts list --repository=shared,backups --format=json List reads repositories and never changes them. Entries are sorted by name and then version. A repository that cannot enumerate its collection, or that fails to refresh, is reported under `repositories` in the structured result and as a message on stderr, so a missing result is explained rather than silent. -Labels are exact `key=value` selectors. An entry is kept only when every selector matches exactly. +Labels are exact `key=value` selectors that apply to the labels published with each version. An entry is kept only when every selector matches exactly, so a repository default or an S3 object tag never matches an older artifact. + +### Cache, refresh, and offline + +Remote repositories (`aws/s3` and `oci/registry`) are listed once and cached for fifteen minutes. Within that window a listing makes no repository request at all and does not resolve credentials. Local directories, archives, and OCI layouts are always listed live. Each repository under `repositories` reports its `source` (`live`, `cache`, or `catalog`) and, for a snapshot, when it was `fetched_at`. + +`--refresh` revalidates every selected source. Unchanged references are resolved again but their metadata is reused by digest, and a reference that disappeared is dropped only after the whole refresh completed. A failed refresh reports its error and keeps the previous snapshot. + +With `plugins.policy.offline: true`, only existing snapshots are served, of any age, and nothing contacts a repository. A missing or corrupt snapshot fails, and so does `--refresh`. + +A collection listing of an `oci/registry` repository uses the registry's repository catalog scoped to the repository prefix, or the repository's configured [catalog](/cli/commands/artifacts/catalog). Listing the versions of one `name` needs neither. A collection that can be enumerated by neither fails with an unsupported-capability error instead of returning an empty list. + +When a repository could not be listed but others were, the command still succeeds with the readable entries, reports the failure on stderr, and sets `incomplete: true` in structured output. An incomplete result is never complete. ## Arguments @@ -72,7 +84,7 @@ Labels are exact `key=value` selectors. An entry is kept only when every selecto
`--refresh` (optional)
- Bypass cached discovery snapshots. + Revalidate the selected sources instead of using a fresh cached snapshot. Fails when offline policy is enabled. Environment variable: `ATMOS_ARTIFACTS_REFRESH`
@@ -85,7 +97,7 @@ Labels are exact `key=value` selectors. An entry is kept only when every selecto ## Output -The table shows the repository alias, name, version, kind, description, and labels. When piped, the table becomes plain tab-separated rows. `json` and `yaml` return an `artifacts` array, which is `[]` when nothing matches, and a `repositories` array with the per-repository counts and diagnostics. Each entry carries `repository`, `ref`, `name`, `version`, `kind`, `description`, `labels`, `documents`, `resolved_digest`, `record_digest`, `content_digest`, and the `pinned` reference that a consumer lockfile can store. +The table shows the repository alias, name, version, kind, description, and labels. When piped, the table becomes plain tab-separated rows. `json` and `yaml` return an `artifacts` array, which is `[]` when nothing matches, an `incomplete` flag when a repository could not be listed, and a `repositories` array with the per-repository counts, sources, and diagnostics. Each entry carries `repository`, `ref`, `name`, `version`, `kind`, `description`, `labels`, `documents`, `resolved_digest`, `record_digest`, `content_digest`, and the `pinned` reference that a consumer lockfile can store. When nothing matches, stderr reports `No artifacts found.`, or says that no repositories are configured. @@ -98,6 +110,9 @@ When nothing matches, stderr reports `No artifacts found.`, or says that no repo
Malformed label
A selector without `=` or `:` fails before any repository is read.
+
Offline without a snapshot
+
Offline discovery fails with an offline error when a repository has no valid snapshot, or when `--refresh` is requested.
+
Unsupported format
`text` is not a collection format. Use `table`, `json`, `yaml`, `csv`, or `tsv`.
@@ -108,4 +123,5 @@ Every failure exits with a nonzero status. For failures reached while the comman - [`atmos artifacts search`](/cli/commands/artifacts/search) - [`atmos artifacts inspect`](/cli/commands/artifacts/inspect) +- [`atmos artifacts catalog`](/cli/commands/artifacts/catalog) - [Artifacts Configuration](/cli/configuration/artifacts) diff --git a/website/docs/cli/commands/artifacts/publish.mdx b/website/docs/cli/commands/artifacts/publish.mdx index f45dd61df8e..c85a3f7be7d 100644 --- a/website/docs/cli/commands/artifacts/publish.mdx +++ b/website/docs/cli/commands/artifacts/publish.mdx @@ -42,12 +42,18 @@ atmos artifacts publish ./dist --repository=backups --name=builds/app --version= # Machine-readable result atmos artifacts publish ./dist --repository=backups --name=builds/app --version=build-126 --format=json + +# Publish a Terraform component; transient Terraform data is excluded and reported +atmos artifacts publish ./components/terraform/vpc --repository=shared \ + --name=components/terraform/vpc --version=1.2.0 --kind=component/terraform --dry-run ``` ## Behavior The name comes from `--name`, then from metadata the producer supplies, then from the source basename. The version comes from `--version`, then from producer metadata; when neither exists the command fails, because Atmos never generates a version. The kind defaults to `files`. +Kind-specific producers validate and filter what they package. `--kind=scaffold` validates the scaffold configuration first, and `--kind=component/terraform` leaves out Terraform working directories, state, and saved plans. See [Artifact Kinds](/cli/commands/artifacts/kinds). Every excluded entry is reported with its rule as an `excluded` diagnostic, in dry runs too, and the default `files` kind excludes nothing. + Atmos compares content, documents, and user metadata before it writes. An identical publication is a no-op that returns the existing Record with `outcome: unchanged`. Different content at the same reference fails until you pass `--force`, which creates a replacement Record (`outcome: replaced`) and updates the reference. Bytes addressed by an old digest are not modified. `--force` does not bypass authentication, signature verification, or the immutability of plugin releases. @@ -90,7 +96,7 @@ Writes are serialized by a lock. Local and OCI repositories lock at host scope b
`--kind` (optional)
- Artifact kind. Defaults to `files`. + Artifact kind: `files` (default), `scaffold`, or `component/terraform`. See [Artifact Kinds](/cli/commands/artifacts/kinds). Environment variable: `ATMOS_ARTIFACTS_KIND`
@@ -161,6 +167,8 @@ Every failure exits with a nonzero status. For failures reached while the comman ## Related +- [`atmos scaffold publish`](/cli/commands/scaffold/publish) +- [Artifact Kinds](/cli/commands/artifacts/kinds) - [`atmos artifacts pull`](/cli/commands/artifacts/pull) - [`atmos artifacts inspect`](/cli/commands/artifacts/inspect) - [`atmos artifacts sign`](/cli/commands/artifacts/sign) diff --git a/website/docs/cli/commands/artifacts/search.mdx b/website/docs/cli/commands/artifacts/search.mdx index 25ec68db765..036c62d0a10 100644 --- a/website/docs/cli/commands/artifacts/search.mdx +++ b/website/docs/cli/commands/artifacts/search.mdx @@ -39,7 +39,9 @@ atmos artifacts search vpc --format=json ## Behavior -Search reads repositories and caches and never changes them, including catalogs. Without `--repository`, every configured repository is searched. Labels are exact `key=value` selectors, and every selector must match. Omitting the text returns every entry that satisfies the label selectors. +Search reads repositories and caches and never changes them, including catalogs. Without `--repository`, every configured repository is searched. A search served from a fresh discovery snapshot makes no repository request. + +Remote repositories are cached for fifteen minutes; `--refresh` revalidates them, and `plugins.policy.offline: true` serves existing snapshots only and fails when one is missing or corrupt. A repository that could not be searched is reported on stderr and marks the structured result `incomplete: true`. See [`atmos artifacts list`](/cli/commands/artifacts/list) for the full cache, refresh, and offline behavior. Labels are exact `key=value` selectors, and every selector must match. Omitting the text returns every entry that satisfies the label selectors. ## Arguments @@ -67,7 +69,7 @@ Search reads repositories and caches and never changes them, including catalogs.
`--refresh` (optional)
- Bypass cached discovery snapshots. + Revalidate the selected sources instead of using a fresh cached snapshot. Fails when offline policy is enabled. Environment variable: `ATMOS_ARTIFACTS_REFRESH`
diff --git a/website/docs/cli/commands/artifacts/usage.mdx b/website/docs/cli/commands/artifacts/usage.mdx index 47e8c4c1649..71cfef566b1 100644 --- a/website/docs/cli/commands/artifacts/usage.mdx +++ b/website/docs/cli/commands/artifacts/usage.mdx @@ -78,6 +78,10 @@ An artifact reference takes one of two forms: +## Artifact Kinds + +The kind says what the content means: `files` for any tree, `scaffold` for a validated scaffold template, and `component/terraform` for a Terraform root module that leaves out working directories, state, and saved plans. [`atmos scaffold publish`](/cli/commands/scaffold/publish) supplies the scaffold kind for you. See [Artifact Kinds](/cli/commands/artifacts/kinds) for what each kind validates, excludes, and records. + ## Digests Results label each digest by what it identifies: @@ -144,12 +148,52 @@ A failed command exits with a nonzero status. For a command that runs, `--format ## Environment Variables -Every flag has an `ATMOS_ARTIFACTS_` environment variable: `ATMOS_ARTIFACTS_REPOSITORY`, `ATMOS_ARTIFACTS_NAME`, `ATMOS_ARTIFACTS_VERSION`, `ATMOS_ARTIFACTS_KIND`, `ATMOS_ARTIFACTS_FORCE`, `ATMOS_ARTIFACTS_DRY_RUN`, `ATMOS_ARTIFACTS_LABELS`, `ATMOS_ARTIFACTS_README`, `ATMOS_ARTIFACTS_CHANGELOG`, `ATMOS_ARTIFACTS_OUTPUT`, `ATMOS_ARTIFACTS_FROM`, `ATMOS_ARTIFACTS_TO`, `ATMOS_ARTIFACTS_REFRESH`, `ATMOS_ARTIFACTS_FORMAT`, and `ATMOS_ARTIFACTS_YES`. A command-line flag overrides its environment variable, which overrides the default. +Every flag has an `ATMOS_ARTIFACTS_` environment variable: `ATMOS_ARTIFACTS_REPOSITORY`, `ATMOS_ARTIFACTS_NAME`, `ATMOS_ARTIFACTS_VERSION`, `ATMOS_ARTIFACTS_KIND`, `ATMOS_ARTIFACTS_FORCE`, `ATMOS_ARTIFACTS_DRY_RUN`, `ATMOS_ARTIFACTS_LABELS`, `ATMOS_ARTIFACTS_README`, `ATMOS_ARTIFACTS_CHANGELOG`, `ATMOS_ARTIFACTS_OUTPUT`, `ATMOS_ARTIFACTS_FROM`, `ATMOS_ARTIFACTS_TO`, `ATMOS_ARTIFACTS_REFRESH`, `ATMOS_ARTIFACTS_FORMAT`, `ATMOS_ARTIFACTS_YES`, `ATMOS_ARTIFACTS_INPUT`, and `ATMOS_ARTIFACTS_EXPECTED_DIGEST`. A command-line flag overrides its environment variable, which overrides the default. ## Authentication and CI Repositories authenticate through Atmos Auth identities named in `artifacts.repositories..identity`, so there is no separate login. Signing can prompt for Sigstore confirmation or identity-provider login. In CI, pass `--yes` or set `ATMOS_ARTIFACTS_YES` to accept confirmation; configure the identity provider for unattended authentication. Use [`--dry-run`](/cli/commands/artifacts/publish) to validate a publication without contacting a repository or resolving credentials. +## CI Summaries and Outputs + +With [`ci.enabled: true`](/cli/configuration/ci), every `atmos artifacts` command that runs a repository operation appends one Markdown report to the CI job summary and writes the operation's results as CI output variables. The report covers published, unchanged, replaced, downloaded, copied, deleted, signed, verified, inspected, listed, and failed outcomes. + +Each operation gets a row in an overview table and a section with: + +- the outcome, the artifact reference, the repository, and the destination, with credentials and query strings removed so a presigned URL never reaches a summary +- the size and duration +- the digests, each labeled by what it identifies: the **resolved** digest (the OCI manifest or index, or the record for local and S3 repositories), the **record** digest, the **content** digest, and the **representation** digest (a transfer checksum) +- the lock that coordinated a mutation, stated as the scope that actually applied (`host` or `repository`) and what it does and does not exclude +- for `sign` and `verify`, the signature subject, the verified signer identities or key fingerprints, and the verification status + +A report never blurs three distinctions. A digest or checksum proves that content is intact, not who published it. A **signed** artifact has evidence stored for it, but only a **verified** result means a trusted signer was authenticated. An **unchecked** result means no trust configuration was supplied, so nothing is claimed. + +A failed operation is reported too, so a failed publish shows its error in the summary instead of only in the log. Reporting is best-effort. A template that cannot be loaded or a summary that cannot be written logs a warning and never changes the command's exit status or its JSON and YAML output on stdout. The report is only ever written to the CI summary file or, when no CI provider is detected, to stderr. + +The CI output variables use the [named outputs](/steps/type/artifact#result) of the operation with an `artifact_` prefix: `artifact_ref`, `artifact_location`, `artifact_resolved_digest`, `artifact_record_digest`, `artifact_content_digest`, `artifact_representation_digest`, `artifact_size`, and `artifact_outcome`. A value the operation did not produce is omitted. + +The summary and the outputs follow the existing CI switches: `ci.enabled`, `ci.summary.enabled`, `ci.output.enabled`, and an explicit CI mode such as `--ci`. With reporting disabled, Atmos makes no extra request to a repository. The report is built from the result the operation already returned. Pull request comments and commit checks are separate, opt-in CI features and are not written by artifact operations. Customize the report with [`ci.templates.artifacts`](/cli/configuration/ci/templates#artifacts). + +The [`atmos artifacts catalog`](/cli/commands/artifacts/catalog) subcommands are the exception. They maintain a repository's discovery catalog, do not open a report session, and write neither a CI summary nor CI output variables. + +## Workflows, Custom Commands, and Hooks + +Every command except the [`atmos artifacts catalog`](/cli/commands/artifacts/catalog) subcommands also runs as an [`artifact` step](/steps/type/artifact) in a workflow, a custom command, an embedded script, or a `kind: step` lifecycle hook. The step calls the same implementation in process, so it needs no `atmos artifacts` subprocess, and it returns the result that `--format=json` prints under `metadata.artifact`, together with the named outputs `ref`, `location`, `resolved_digest`, `record_digest`, `content_digest`, `representation_digest`, `size`, and `outcome`. A workflow, a custom command, an embedded script, or a hook writes one [CI report](#ci-summaries-and-outputs) for all of its artifact operations after it ends, with retries collapsed to the final attempt. + +```yaml +hooks: + backup-output: + events: [after.terraform.apply] + kind: step + type: artifact + with: + action: publish + source: ./dist + repository: backups + artifact_name: backups/app + version: build-123 +``` + ## Subcommands @@ -158,3 +202,4 @@ Repositories authenticate through Atmos Auth identities named in `artifacts.repo - [Artifacts Configuration](/cli/configuration/artifacts): repositories, identities, packaging, locking, and verification policy - [Authentication](/cli/configuration/auth): identities used by `identity` +- [`artifact` step](/steps/type/artifact): run the same operations from workflows, custom commands, scripts, and hooks diff --git a/website/docs/cli/commands/scaffold/publish.mdx b/website/docs/cli/commands/scaffold/publish.mdx index 0e419ed5767..c18768f0a4f 100644 --- a/website/docs/cli/commands/scaffold/publish.mdx +++ b/website/docs/cli/commands/scaffold/publish.mdx @@ -8,6 +8,7 @@ description: Validate a scaffold and publish it as a versioned artifact in a con import Intro from '@site/src/components/Intro' import Experimental from '@site/src/components/Experimental' +import CastPlayer from '@site/src/components/CastPlayer' Share a scaffold with your team as a pinned, versioned release. The command validates the scaffold configuration first, then publishes the directory to one configured artifact repository so that `atmos scaffold generate` can create and update projects from an exact version. @@ -15,6 +16,8 @@ Share a scaffold with your team as a pinned, versioned release. The command vali + + ## Usage ```shell @@ -155,3 +158,4 @@ Conflicts, locks, and every other publication failure behave as described for [` - [`atmos scaffold validate`](/cli/commands/scaffold/validate) - [`atmos scaffold generate`](/cli/commands/scaffold/generate) - [`atmos artifacts publish`](/cli/commands/artifacts/publish) +- [Artifact Kinds](/cli/commands/artifacts/kinds) diff --git a/website/docs/cli/commands/scaffold/usage.mdx b/website/docs/cli/commands/scaffold/usage.mdx index fb29f1716f8..3e2a5980d33 100644 --- a/website/docs/cli/commands/scaffold/usage.mdx +++ b/website/docs/cli/commands/scaffold/usage.mdx @@ -23,6 +23,7 @@ generated output. | [`atmos scaffold list`](/cli/commands/scaffold/list) | List embedded, configured, and catalog templates. | | [`atmos scaffold generate`](/cli/commands/scaffold/generate) | Generate or update output from a template. | | [`atmos scaffold validate`](/cli/commands/scaffold/validate) | Validate a template's `scaffold.yaml` manifest. | +| [`atmos scaffold publish`](/cli/commands/scaffold/publish) | Validate a template and publish it as a versioned artifact. | ## Template Contract diff --git a/website/docs/cli/configuration/artifacts.mdx b/website/docs/cli/configuration/artifacts.mdx index 8a8b9bc12be..eb44355eed3 100644 --- a/website/docs/cli/configuration/artifacts.mdx +++ b/website/docs/cli/configuration/artifacts.mdx @@ -106,6 +106,11 @@ The keys under `artifacts.repositories` (`shared`, `backups`, `local`, `archives A default `description` and default `labels` for newly published artifacts. Labels you pass to `atmos artifacts publish --labels` override matching keys. Labels belong to each published version, not to the repository. +
`catalog` (optional, `oci/registry` only)
+
+ An `oci:///:` reference to the repository's discovery catalog. The catalog must be on the repository's registry host and below its `prefix`, so it can never direct the repository identity to another host. Listing and searching the collection use the catalog when a registry cannot enumerate its repositories. See [Discovery Cache and Catalogs](#discovery-cache-and-catalogs). +
+
`verification` (optional)
Signature policy for this repository. See [Signature Verification](#signature-verification). @@ -236,6 +241,52 @@ artifacts: An `aws/s3` repository coordinates across hosts by itself. Local and OCI repositories provide host scope on their own; an OCI tag is not a distributed lease, so use `locking.repository` for cross-host exclusion. S3 lock claims never expire, so a crashed writer leaves a diagnostic naming the claim to remove after you confirm that the writer has stopped. The `lock_scope` field of every mutation result reports the scope that actually coordinated it. +## Discovery Cache and Catalogs + +`atmos artifacts list` and `atmos artifacts search` read repositories directly, and cache the listing of remote repositories (`aws/s3` and `oci/registry`) for fifteen minutes. Local directories, archives, and OCI layouts are listed live every time. + +The cache lives in the Atmos cache directory under `artifacts/discovery`, as one private snapshot file per repository source. Each snapshot is scoped by your authentication configuration, the authentication realm, and the identity bound to each repository, never by credential values, so a different realm or identity never reuses another's snapshot. A refresh replaces a snapshot atomically only after it completed. Pass `--refresh` to revalidate a source before the fifteen minutes pass. A refresh reuses the metadata of references whose digest is unchanged, and removes a reference that disappeared only after a complete refresh. + +With `plugins.policy.offline: true`, discovery is offline: it serves existing snapshots of any age, makes no registry or bucket request, and fails with an offline error when a snapshot is missing or corrupt or when `--refresh` is requested. Current policy is checked on every read, including reads of a cached snapshot, and a cached listing never proves that a payload is still available. + +A registry cannot be enumerated portably. Listing a whole `oci/registry` collection uses the registry's repository catalog scoped to `prefix`, or the repository's `catalog` when one is configured. Listing the versions of one name (`atmos artifacts list `) needs neither. A collection that cannot be enumerated fails with an unsupported-capability error instead of returning an empty list. + + +```yaml +artifacts: + repositories: + shared: + kind: oci/registry + identity: registry-reader + options: + registry: ghcr.io + prefix: acme/atmos + catalog: oci://ghcr.io/acme/atmos/catalog:stable +``` + + +A catalog is a maintained discovery snapshot, not a trust grant. Publishing, signing, or deleting an artifact never edits a catalog; maintain it with [`atmos artifacts catalog`](/cli/commands/artifacts/catalog). Every catalog entry must be bound to the repository path it is configured on. + +## CI Reporting + +Artifact operations report to CI through the same switches as every other Atmos feature, and add no artifact-specific reporting keys. The report is a Markdown job summary and a set of CI output variables: + +
+
`ci.enabled`
+
The master switch. Without it, artifact operations write no summary and no CI outputs.
+ +
`ci.summary.enabled`
+
Appends one report per command, workflow, custom command, or hook to the job summary. Defaults to `true` when `ci.enabled` is set.
+ +
`ci.output.enabled`
+
Writes the `artifact_*` output variables. Defaults to `true` when `ci.enabled` is set.
+ +
`ci.templates.artifacts`
+
Replaces the built-in report templates. See [CI templates](/cli/configuration/ci/templates#artifacts).
+
+ +Pull request comments (`ci.comments`) and commit checks (`ci.checks`) are not written by artifact operations. With reporting disabled, no operation makes an extra metadata or evidence request. See [CI summaries and outputs](/cli/commands/artifacts/usage#ci-summaries-and-outputs) for what a report contains. + ## Environment Variables The flags of the `atmos artifacts` commands read `ATMOS_ARTIFACTS_*` environment variables, such as `ATMOS_ARTIFACTS_REPOSITORY` and `ATMOS_ARTIFACTS_FORMAT`. Command-line flags override environment variables. See the [command reference](/cli/commands/artifacts/usage) for each variable. @@ -243,4 +294,5 @@ The flags of the `atmos artifacts` commands read `ATMOS_ARTIFACTS_*` environment ## Related - [`atmos artifacts`](/cli/commands/artifacts/usage) - publish, pull, copy, inspect, list, search, delete, sign, and verify +- [`atmos artifacts catalog`](/cli/commands/artifacts/catalog) - build and maintain a repository's discovery catalog - [Authentication](/cli/configuration/auth) - identities referenced by `identity` diff --git a/website/docs/cli/configuration/ci/templates.mdx b/website/docs/cli/configuration/ci/templates.mdx index b2eabedef54..2d82c86c3ab 100644 --- a/website/docs/cli/configuration/ci/templates.mdx +++ b/website/docs/cli/configuration/ci/templates.mdx @@ -36,6 +36,9 @@ ci: destroy: "helmfile-destroy.md" container: image: "image.md" + artifacts: + summary: "artifacts-summary.md" + publish: "artifacts-publish.md" ``` @@ -109,6 +112,19 @@ ci: `.ExposedPorts`, `.Env` (rows with `.Name` and `.Value`), `.Labels` (rows with `.Name` and `.Value`), `.Layers` (rows with `.Index` and `.Digest`), and `.RawJSON`.
+ +
`ci.templates.artifacts.summary`
+
+ Filename of the custom template for the whole artifact report (the heading, the overview table, and the + per-operation sections) within the base path. See [Artifacts](#artifacts). +
+ +
`ci.templates.artifacts.`
+
+ Filename of the custom template for the section of one artifact operation, where `` is `publish`, + `pull`, `copy`, `inspect`, `list`, `search`, `delete`, `show`, `sign`, `verify`, or `pin`. The other + operations keep the built-in section. A configured file that does not exist is an error. +
## Template Context @@ -204,6 +220,70 @@ reaches the job summary. | `.Diff` | string | Aggregated unified diff across changed objects (Secrets omitted, truncated) | | `.Error` | string | Command error message, if any | +## Artifacts + +[Artifact operations](/cli/commands/artifacts/usage#ci-summaries-and-outputs) write one report per command, +workflow, custom command, or hook. The report is two layers of templates, each resolved in the usual order: the +file named under `ci.templates.artifacts`, then `/artifacts/.md`, then the built-in template. + +- `summary` is the frame: the heading, the overview table, and where the operation sections go. +- `` (`publish`, `pull`, `copy`, and so on) is the section of one operation. Every action has the same + built-in section, so you can override one action without touching the others. + +A file named under `ci.templates.artifacts` that does not exist fails the report with an error that names the +resolved path, so a typo never silently reverts to the built-in template. The failure is logged as a warning and +never changes the exit status of the artifact operation. Output variables do not depend on the template and are +still written. + + +```yaml +ci: + templates: + base_path: ".atmos/ci/templates" # artifacts/summary.md and artifacts/.md are found here + artifacts: + publish: "my-publish-section.md" # replaces only the publish section +``` + + +Every string the templates receive is already escaped Markdown, with secrets masked and URL credentials and query +strings removed. Print the fields as they are. Strings shown here as code spans arrive wrapped in backticks. + +The `summary` template receives: + +| Variable | Type | Description | +|----------|------|-------------| +| `.Heading` | string | The report heading text | +| `.Overview` | string | One-line count of operations and outcomes | +| `.Total`, `.Succeeded`, `.Unchanged`, `.Failed`, `.Canceled` | int | Operation counts. An unchanged operation counts once, as unchanged | +| `.Rows` | []object | Overview rows: `.Number`, `.Operation`, `.Icon`, `.Status`, `.Artifact`, `.Repository`, `.Destination`, `.Digest`, `.Size`, `.Duration` | +| `.Sections` | []string | The rendered per-operation sections, in report order | +| `.Omitted` | int | Sections left out to fit the size limit | +| `.Notice` | string | Visible note about a size-reduced report, empty for a complete one | + +An `` template receives one operation: + +| Variable | Type | Description | +|----------|------|-------------| +| `.Number`, `.Title`, `.Summary` | | Position in the report, the heading text, and a one-sentence statement | +| `.Action`, `.ActionLabel`, `.Step` | string | The action, its title-cased form, and the step name (empty outside a step) | +| `.Icon`, `.Status`, `.Kind` | string | Status symbol, wording such as `Published`, and the kind: `success`, `unchanged`, `dry-run`, `unchecked`, `incomplete`, `failed`, or `canceled` | +| `.Repository`, `.Requested`, `.Ref`, `.Destination` | string | Code spans. `.Requested` is empty when it equals `.Ref` | +| `.Aliases` | []string | Other locations or tags that resolve to the same content | +| `.Size`, `.ExactSize`, `.Duration` | string | Human-readable values, empty when the operation has none | +| `.Attempts` | int | Attempts taken; the report shows the final one | +| `.Lock` | object | `.Scope` (`host`, `repository`, or `none`) and `.Guarantee`; empty for reads | +| `.Digests` | []object | `.Label` (`Resolved`, `Record`, `Content`, `Representation`), `.Meaning`, `.Value`, `.Short` | +| `.Integrity` | string | What the digests prove and what they do not | +| `.Signature` | object | `.Status` (`signed`, `verified`, `unchecked`, `failed`), `.Statement`, `.SubjectKind`, `.SubjectDigest`, `.Policy`, `.Claims` (`.Identity`, `.Issuer`, `.KeyID`), `.Evidence` (`.Format`, `.Digest`); empty unless the operation signed or verified | +| `.Error` | string | A fenced code block with the error of a failed operation | +| `.Diagnostics`, `.DiagnosticsMore` | []object, int | Non-fatal messages (`.Severity`, `.Code`, `.Message`) and how many more were not shown | +| `.Description`, `.Labels`, `.Inventory` | | Record metadata and the payload listing (`.Count`, `.Bytes`, `.Files`, `.More`) | +| `.Collection` | object | For `list` and `search`: `.Count`, `.Incomplete`, `.Repositories`, `.Artifacts`, `.More` | + +Summaries stay within 1 MiB, the GitHub step summary limit, with room for content that earlier steps wrote. +A larger report first drops the inventory and metadata details, then trailing operation sections, and only then cuts the text. Each step is announced in a visible +notice, and the overview table always lists every operation. + ## Customizing the Kubernetes Summary Kubernetes summaries resolve by the base-path convention rather than the `terraform`/`helmfile` @@ -292,6 +372,7 @@ The default templates are embedded in the Atmos binary: - Helm: `pkg/ci/plugins/helm/templates/` - Helmfile: `pkg/ci/plugins/helmfile/templates/` - Kubernetes: `pkg/ci/plugins/kubernetes/templates/` +- Artifacts: `pkg/artifact/report/templates/` You can use these as a starting point for customization. diff --git a/website/docs/stacks/hooks.mdx b/website/docs/stacks/hooks.mdx index cb610a1d605..b1eb711c1aa 100644 --- a/website/docs/stacks/hooks.mdx +++ b/website/docs/stacks/hooks.mdx @@ -695,6 +695,28 @@ hooks: destination: handler.zip ``` +The [`artifact` step type](/steps/type/artifact) publishes a build output to a configured artifact +repository after an apply. A hook that sets `retry:` keeps one operation identity across its +attempts, so the publication's creation time does not change on every retry. This example uses the GitHub Actions run ID, +which stays stable across retries of the same run: + +```yaml +hooks: + backup-output: + kind: step + type: artifact + events: [after.terraform.apply] + on_failure: fail + retry: + max_attempts: 3 + with: + action: publish + source: ./dist + repository: backups + artifact_name: backups/app + version: 'build-{{ env "GITHUB_RUN_ID" }}' +``` + #### Working directory A step's relative paths (`source`, `destination`, `path`, `files`, `context`, and similar diff --git a/website/docs/steps/type/artifact.mdx b/website/docs/steps/type/artifact.mdx index 1216d20356b..5e61683953c 100644 --- a/website/docs/steps/type/artifact.mdx +++ b/website/docs/steps/type/artifact.mdx @@ -164,7 +164,7 @@ steps: ## CI reports -A workflow, custom command, embedded script, or hook that runs artifact steps writes one [CI report](/cli/commands/artifacts/usage) when it ends, even when it failed. The report has one section per operation, ordered by where each step was scheduled: sequential steps in order, and the branches of a parallel group in branch order, whatever order they finish in. Every attempt of a retried step is one operation, and the report shows the final attempt. +A workflow, custom command, embedded script, or hook that runs artifact steps writes one [CI report](/cli/commands/artifacts/usage#ci-summaries-and-outputs) when it ends, even when it failed. The report has one section per operation, ordered by where each step was scheduled: sequential steps in order, and the branches of a parallel group in branch order, whatever order they finish in. Every attempt of a retried step is one operation, and the report shows the final attempt. The named outputs are also written as CI output variables when `ci.output.enabled` is on: `artifact_` carries the last operation in the report, and `artifact__` carries the last operation of the step with that name, with every character other than a letter or digit in the step name replaced by an underscore. A hook adds nothing to its own output, so the report is never rendered twice. diff --git a/website/src/data/roadmap.js b/website/src/data/roadmap.js index bdcb922de40..31a5e46fe5d 100644 --- a/website/src/data/roadmap.js +++ b/website/src/data/roadmap.js @@ -609,6 +609,7 @@ export const roadmapConfig = { { label: 'Vendor lock verification and drift enforcement', status: 'shipped', quarter: 'q3-2026', pr: 2756, changelog: 'vendor-lock-verify', description: 'Every `atmos vendor pull` now records a `vendor.lock.yaml` receipt (declared source, resolved identity, per-file checksum) for every vendored, OCI, and local-file source and mixin. `atmos vendor verify` checks a checkout against that receipt with zero network access. `vendor.lock.enforcement` (silent/warn/strict) controls how a drifted `pull` behaves. `version:` now also accepts a semver range, resolved once and locked until an explicit update.', benefits: 'Detect a manually edited or partially fetched vendored file without re-fetching everything. Gate CI on drift instead of trusting the checkout.' }, { label: 'SBOM generation from vendor, OCI, and Terraform provenance', status: 'shipped', quarter: 'q3-2026', pr: 2756, changelog: 'sbom-provenance', description: 'New experimental `atmos sbom generate` renders CycloneDX and SPDX SBOMs from vendor lock receipts, OCI source digests, and Terraform provider/module evidence in one provenance graph. CI artifact upload is included.', benefits: 'Compliance teams get a standards-based SBOM instead of manually reconciling vendor receipts, provider locks, and module downloads by hand.', experimental: true }, { label: 'GitHub Enterprise Server support', status: 'shipped', quarter: 'q3-2026', changelog: 'github-enterprise-server-support', description: 'Vendoring, remote imports, the CI provider, and the GitHub API client now resolve `GITHUB_SERVER_URL` / `GITHUB_API_URL` consistently, so they work against a GitHub Enterprise Server instance instead of assuming public github.com. Toolchain installs (aqua-registry tools) get their own `ATMOS_TOOLCHAIN_*` variables, since those tools stay on public github.com regardless of where your own repositories live.', benefits: 'Point Atmos at your GitHub Enterprise Server instance with two standard environment variables — no `atmos.yaml` changes. Toolchain installs keep working unmodified on GitHub Enterprise Server runners.' }, + { label: 'Artifacts: versioned publish, discovery, and restore across OCI, S3, and local repositories', status: 'shipped', quarter: 'q4-2026', changelog: 'artifacts', docs: '/cli/commands/artifacts/usage', experimental: true, description: 'A single `artifacts.repositories` configuration publishes, pulls, copies, inspects, searches, signs, and verifies named, versioned artifacts across OCI registries, OCI layouts, S3, local directories, and local archives. The same operations run from the CLI, workflows, custom commands, and Terraform hooks, with optional catalogs, Sigstore verification, package README and CHANGELOG reads without downloading the payload, and CI job summaries.', benefits: 'Components, scaffolds, and backups share one publishing workflow. Switching storage means changing the repository name, and every CI run records what it published.' }, ], issues: [], prs: [ diff --git a/website/static/casts/screengrabs/atmos--help.cast b/website/static/casts/screengrabs/atmos--help.cast index cf011e37640..01187bef6f6 100644 --- a/website/static/casts/screengrabs/atmos--help.cast +++ b/website/static/casts/screengrabs/atmos--help.cast @@ -1,374 +1,382 @@ -{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1793820391,"command":"atmos --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} -[0.027991041,"o","\n"] -[0.000183,"o","\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\n\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\n\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\n\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\n\n"] -[0.000054,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] -[0.000001917,"o","\n"] -[0.001064542,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAtmos is a framework for orchestrating and operating infrastructure workflows across\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mmultiple cloud and DevOps\u001b[0m\u001b[38;2;247;250;252m toolchains.\u001b[0m\n"] -[0.000016458,"o","\n"] -[0.000004625,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] -[0.000001458,"o","\n"] -[0.000058125,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[sub-command]\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] -[0.000003542,"o","\n"] -[0.000010833,"o","\u001b[1;38;2;0;163;224mSUBCOMMAND ALIASES\u001b[0m\n"] -[0.000001167,"o","\n"] -[0.001098333,"o"," \u001b[1;38;2;0;163;224man \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos ansible\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000946167,"o"," \u001b[1;38;2;0;163;224mc \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos container\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.00090275,"o"," \u001b[1;38;2;0;163;224memu \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos emulator\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000931458,"o"," \u001b[1;38;2;0;163;224mhf \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos helmfile\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.001067834,"o"," \u001b[1;38;2;0;163;224mk8s \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos kubernetes\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000934166,"o"," \u001b[1;38;2;0;163;224mpk \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos packer\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000953084,"o"," \u001b[1;38;2;0;163;224mtf \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos terraform\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000004291,"o","\n"] -[0.000122459,"o","\u001b[1;38;2;0;163;224mBUILT-IN COMMANDS\u001b[0m\n"] -[0.00000175,"o","\n"] -[0.000003,"o"," "] +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794363059,"command":"atmos --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030311833,"o","\n"] +[0.000143083,"o","\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m \u001b[0m\n\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\n\n"] +[0.000071917,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002583,"o","\n"] +[0.001090667,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAtmos is a framework for orchestrating and operating infrastructure workflows across\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mmultiple cloud and DevOps\u001b[0m\u001b[38;2;247;250;252m toolchains.\u001b[0m\n"] +[0.000022292,"o","\n"] +[0.00000375,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.000050916,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[sub-command]\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.00000275,"o","\n"] +[0.000009334,"o","\u001b[1;38;2;0;163;224mSUBCOMMAND ALIASES\u001b[0m\n"] +[0.000001166,"o","\n"] +[0.001033542,"o"," \u001b[1;38;2;0;163;224man \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos ansible\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000848292,"o"," \u001b[1;38;2;0;163;224mc \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos container\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000974916,"o"," \u001b[1;38;2;0;163;224memu \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos emulator\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000922375,"o"," \u001b[1;38;2;0;163;224mhf \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos helmfile\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.001092334,"o"," \u001b[1;38;2;0;163;224mk8s \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos kubernetes\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000996916,"o"," \u001b[1;38;2;0;163;224mpk \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos packer\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000893709,"o"," \u001b[1;38;2;0;163;224mtf \u001b[0m \u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mAlias of \u001b[0m\u001b[38;2;0;255;255;1matmos terraform\u001b[0m\u001b[38;2;247;250;252m command\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000003875,"o","\n"] +[0.000104458,"o","\u001b[1;38;2;0;163;224mBUILT-IN COMMANDS\u001b[0m\n"] +[0.000002083,"o","\n"] +[0.0000025,"o"," "] [0.000003375,"o","\u001b[1;38;2;0;163;224mabout\u001b[0m"] -[0.000003416,"o"," "] -[0.000120625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLearn about\u001b[0m\u001b[38;2;255;255;255m Atmos\u001b[0m\u001b[0m\n"] -[0.000008542,"o"," "] -[0.000003042,"o","\u001b[1;38;2;0;163;224mai\u001b[0m"] -[0.000002041,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002125,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001792,"o"," "] -[0.000104875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAI-powered assistant for Atmos\u001b[0m\u001b[38;2;255;255;255m operations\u001b[0m\u001b[0m\n"] -[0.000003833,"o"," "] -[0.000002625,"o","\u001b[1;38;2;0;163;224mansible\u001b[0m"] -[0.000001542,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001458,"o"," "] -[0.000111,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage ansible-based automation\u001b[0m\u001b[38;2;255;255;255m for\u001b[0m\u001b[0m\n"] -[0.000005667,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255minfrastructure\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] -[0.000050917,"o"," "] -[0.000003416,"o","\u001b[1;38;2;0;163;224matlantis\u001b[0m"] -[0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001875,"o"," "] -[0.000089542,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate and manage Atlantis\u001b[0m\u001b[38;2;255;255;255m configurations\u001b[0m\u001b[0m\n"] -[0.000003458,"o"," "] -[0.000002667,"o","\u001b[1;38;2;0;163;224mauth\u001b[0m"] -[0.000001666,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002667,"o"," "] -[0.000102333,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAuthenticate with cloud providers\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] -[0.0000045,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255midentity\u001b[0m\u001b[38;2;255;255;255m services.\u001b[0m\u001b[0m\n"] -[0.000011542,"o"," "] -[0.00001125,"o","\u001b[1;38;2;0;163;224maws\u001b[0m"] -[0.000002542,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002458,"o"," "] -[0.000148208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun AWS-specific commands for interacting\u001b[0m\u001b[38;2;255;255;255m with\u001b[0m\u001b[0m\n"] -[0.00000825,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] -[0.00000325,"o"," "] -[0.000002625,"o","\u001b[1;38;2;0;163;224mazure\u001b[0m"] -[0.000001459,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000003416,"o"," "] -[0.0001115,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun Azure-specific commands for\u001b[0m\u001b[38;2;255;255;255m interacting\u001b[0m\u001b[0m\n"] -[0.000005167,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mwith cloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] -[0.000003583,"o"," "] -[0.000006084,"o","\u001b[1;38;2;0;163;224mcast\u001b[0m"] -[0.000001583,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001542,"o"," "] -[0.000114125,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mPlay and render Atmos asciicast\u001b[0m\u001b[38;2;255;255;255m recordings\u001b[0m\u001b[0m\n"] -[0.00000375,"o"," "] -[0.00000275,"o","\u001b[1;38;2;0;163;224mci\u001b[0m"] -[0.0000015,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001916,"o"," "] -[0.000092834,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCI/CD integration\u001b[0m\u001b[38;2;255;255;255m commands\u001b[0m\u001b[0m\n"] +[0.000002875,"o"," "] +[0.000088,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLearn about\u001b[0m\u001b[38;2;255;255;255m Atmos\u001b[0m\u001b[0m\n"] +[0.000007834,"o"," "] +[0.000003041,"o","\u001b[1;38;2;0;163;224mai\u001b[0m"] +[0.000001625,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001959,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001916,"o"," "] +[0.000085292,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAI-powered assistant for Atmos\u001b[0m\u001b[38;2;255;255;255m operations\u001b[0m\u001b[0m\n"] +[0.000003667,"o"," "] +[0.00000275,"o","\u001b[1;38;2;0;163;224mansible\u001b[0m"] +[0.000001791,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002375,"o"," "] +[0.00009975,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage ansible-based automation\u001b[0m\u001b[38;2;255;255;255m for\u001b[0m\u001b[0m\n"] +[0.000004459,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255minfrastructure\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] +[0.000038541,"o"," "] +[0.000003542,"o","\u001b[1;38;2;0;163;224martifacts\u001b[0m"] +[0.000001708,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002625,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001584,"o"," "] +[0.000105208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mPublish, pull, copy, inspect, sign,\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] +[0.000005583,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mverify versioned artifacts\u001b[0m\u001b[38;2;255;255;255m across\u001b[0m\u001b[0m\n"] +[0.00000475,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mrepositories\u001b[0m\u001b[0m\n"] +[0.000003209,"o"," "] +[0.00000225,"o","\u001b[1;38;2;0;163;224matlantis\u001b[0m"] +[0.000001208,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001625,"o"," "] +[0.000084167,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate and manage Atlantis\u001b[0m\u001b[38;2;255;255;255m configurations\u001b[0m\u001b[0m\n"] [0.000003166,"o"," "] -[0.000002959,"o","\u001b[1;38;2;0;163;224mcompletion\u001b[0m"] -[0.000011416,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000005167,"o"," "] -[0.000137208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate autocompletion scripts for\u001b[0m\u001b[38;2;255;255;255m Bash,\u001b[0m\u001b[0m\n"] -[0.000029125,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mZsh, Fish, and\u001b[0m\u001b[38;2;255;255;255m PowerShell\u001b[0m\u001b[0m\n"] -[0.000004209,"o"," "] -[0.000003708,"o","\u001b[1;38;2;0;163;224mcomposition\u001b[0m"] -[0.000002083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001959,"o"," "] -[0.000117958,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mInspect compositions that group\u001b[0m\u001b[38;2;255;255;255m component\u001b[0m\u001b[0m\n"] -[0.000005417,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255minstances into\u001b[0m\u001b[38;2;255;255;255m systems\u001b[0m\u001b[0m\n"] +[0.00000275,"o","\u001b[1;38;2;0;163;224mauth\u001b[0m"] +[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001958,"o"," "] +[0.000094333,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAuthenticate with cloud providers\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] +[0.000003875,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255midentity\u001b[0m\u001b[38;2;255;255;255m services.\u001b[0m\u001b[0m\n"] [0.00000275,"o"," "] -[0.000002333,"o","\u001b[1;38;2;0;163;224mconfig\u001b[0m"] -[0.000001167,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001458,"o"," "] -[0.000096375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRead and edit your atmos.yaml\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] +[0.000002792,"o","\u001b[1;38;2;0;163;224maws\u001b[0m"] +[0.000001625,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002,"o"," "] +[0.000090208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun AWS-specific commands for interacting\u001b[0m\u001b[38;2;255;255;255m with\u001b[0m\u001b[0m\n"] +[0.000004584,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] +[0.000003583,"o"," "] +[0.000002708,"o","\u001b[1;38;2;0;163;224mazure\u001b[0m"] +[0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000093542,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun Azure-specific commands for\u001b[0m\u001b[38;2;255;255;255m interacting\u001b[0m\u001b[0m\n"] +[0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mwith cloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] +[0.000002959,"o"," "] +[0.000018666,"o","\u001b[1;38;2;0;163;224mcast\u001b[0m"] +[0.000001584,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000091625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mPlay and render Atmos asciicast\u001b[0m\u001b[38;2;255;255;255m recordings\u001b[0m\u001b[0m\n"] [0.0000035,"o"," "] -[0.00000275,"o","\u001b[1;38;2;0;163;224mcontainer\u001b[0m"] -[0.000001458,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.00000175,"o"," "] -[0.000104667,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage persistent, stack-scoped\u001b[0m\u001b[38;2;255;255;255m container\u001b[0m\u001b[0m\n"] -[0.000004375,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents\u001b[0m\u001b[0m\n"] -[0.000002958,"o"," "] -[0.000004417,"o","\u001b[1;38;2;0;163;224mdescribe\u001b[0m"] -[0.000001542,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.0000015,"o"," "] -[0.000102,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mShow details about Atmos configurations\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] -[0.000003708,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents\u001b[0m\u001b[0m\n"] -[0.000007042,"o"," "] -[0.000002791,"o","\u001b[1;38;2;0;163;224mdevcontainer\u001b[0m"] -[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002292,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001166,"o"," "] -[0.000094334,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage development\u001b[0m\u001b[38;2;255;255;255m containers\u001b[0m\u001b[0m\n"] -[0.000005708,"o"," "] -[0.000002917,"o","\u001b[1;38;2;0;163;224mdocs\u001b[0m"] -[0.000003625,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001791,"o"," "] -[0.0000945,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOpen Atmos documentation or display\u001b[0m\u001b[38;2;255;255;255m component-\u001b[0m\u001b[0m\n"] -[0.0000145,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mspecific\u001b[0m\u001b[38;2;255;255;255m docs\u001b[0m\u001b[0m\n"] -[0.000001959,"o"," "] -[0.000002708,"o","\u001b[1;38;2;0;163;224mdoctor\u001b[0m"] -[0.000002167,"o"," "] -[0.000162625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDiagnose project health and apply\u001b[0m\u001b[38;2;255;255;255m verified\u001b[0m\u001b[0m\n"] -[0.000004416,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mmigrations\u001b[0m\u001b[0m\n"] +[0.000002583,"o","\u001b[1;38;2;0;163;224mci\u001b[0m"] +[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000079917,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCI/CD integration\u001b[0m\u001b[38;2;255;255;255m commands\u001b[0m\u001b[0m\n"] +[0.000003,"o"," "] +[0.000002958,"o","\u001b[1;38;2;0;163;224mcompletion\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002084,"o"," "] +[0.000097375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate autocompletion scripts for\u001b[0m\u001b[38;2;255;255;255m Bash,\u001b[0m\u001b[0m\n"] +[0.000004208,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mZsh, Fish, and\u001b[0m\u001b[38;2;255;255;255m PowerShell\u001b[0m\u001b[0m\n"] [0.000002875,"o"," "] -[0.00000275,"o","\u001b[1;38;2;0;163;224memulator\u001b[0m"] -[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001708,"o"," "] -[0.000105042,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage local emulators for AWS, GCP,\u001b[0m\u001b[38;2;255;255;255m Azure,\u001b[0m\u001b[0m\n"] -[0.00000475,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mKubernetes, Vault, and OCI\u001b[0m\u001b[38;2;255;255;255m registries\u001b[0m\u001b[0m\n"] -[0.000001542,"o"," "] -[0.000002625,"o","\u001b[1;38;2;0;163;224menv\u001b[0m"] -[0.000002166,"o"," "] -[0.000111709,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput environment variables configured\u001b[0m\u001b[38;2;255;255;255m in\u001b[0m\u001b[0m\n"] -[0.000003208,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255matmos.yaml\u001b[0m\u001b[0m\n"] -[0.000002792,"o"," "] -[0.000002083,"o","\u001b[1;38;2;0;163;224mgcp\u001b[0m"] -[0.000001,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001875,"o"," "] -[0.000097167,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun GCP-specific commands for interacting\u001b[0m\u001b[38;2;255;255;255m with\u001b[0m\u001b[0m\n"] -[0.000003958,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] -[0.000007,"o"," "] -[0.000002125,"o","\u001b[1;38;2;0;163;224mgit\u001b[0m"] -[0.000001125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000004417,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.0000015,"o"," "] -[0.000107541,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGitOps enablement: automate Git\u001b[0m\u001b[38;2;255;255;255m commits\u001b[0m\u001b[0m\n"] -[0.000005084,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mlocally and in\u001b[0m\u001b[38;2;255;255;255m CI\u001b[0m\u001b[0m\n"] -[0.000004708,"o"," "] -[0.000002542,"o","\u001b[1;38;2;0;163;224mhelm\u001b[0m"] -[0.000010916,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000003333,"o","\u001b[1;38;2;0;163;224mcomposition\u001b[0m"] +[0.0000015,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000004209,"o"," "] +[0.000095166,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mInspect compositions that group\u001b[0m\u001b[38;2;255;255;255m component\u001b[0m\u001b[0m\n"] +[0.000003459,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255minstances into\u001b[0m\u001b[38;2;255;255;255m systems\u001b[0m\u001b[0m\n"] +[0.00000225,"o"," "] +[0.000002208,"o","\u001b[1;38;2;0;163;224mconfig\u001b[0m"] +[0.000001083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001667,"o"," "] +[0.000086375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRead and edit your atmos.yaml\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] +[0.000002917,"o"," "] +[0.000002875,"o","\u001b[1;38;2;0;163;224mcontainer\u001b[0m"] +[0.000001291,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000009959,"o"," "] +[0.00008525,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage persistent, stack-scoped\u001b[0m\u001b[38;2;255;255;255m container\u001b[0m\u001b[0m\n"] +[0.000004,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents\u001b[0m\u001b[0m\n"] +[0.000002625,"o"," "] +[0.000002666,"o","\u001b[1;38;2;0;163;224mdescribe\u001b[0m"] +[0.000001667,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001792,"o"," "] +[0.000085875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mShow details about Atmos configurations\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] +[0.000003708,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents\u001b[0m\u001b[0m\n"] +[0.000014667,"o"," "] +[0.000002958,"o","\u001b[1;38;2;0;163;224mdevcontainer\u001b[0m"] +[0.000001458,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] [0.000001667,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001333,"o"," "] -[0.000097417,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage native Helm\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] -[0.000002708,"o"," "] -[0.000002292,"o","\u001b[1;38;2;0;163;224mhelmfile\u001b[0m"] +[0.000001375,"o"," "] +[0.000100833,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage development\u001b[0m\u001b[38;2;255;255;255m containers\u001b[0m\u001b[0m\n"] +[0.000003084,"o"," "] +[0.000002458,"o","\u001b[1;38;2;0;163;224mdocs\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001792,"o"," "] +[0.000088917,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOpen Atmos documentation or display\u001b[0m\u001b[38;2;255;255;255m component-\u001b[0m\u001b[0m\n"] +[0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mspecific\u001b[0m\u001b[38;2;255;255;255m docs\u001b[0m\u001b[0m\n"] +[0.000001792,"o"," "] +[0.000002958,"o","\u001b[1;38;2;0;163;224mdoctor\u001b[0m"] +[0.000002417,"o"," "] +[0.000115125,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDiagnose project health and apply\u001b[0m\u001b[38;2;255;255;255m verified\u001b[0m\u001b[0m\n"] +[0.000007416,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mmigrations\u001b[0m\u001b[0m\n"] +[0.000002959,"o"," "] +[0.000002833,"o","\u001b[1;38;2;0;163;224memulator\u001b[0m"] [0.000001208,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001584,"o"," "] -[0.000095625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage Helmfile-based Kubernetes\u001b[0m\u001b[38;2;255;255;255m deployments\u001b[0m\u001b[0m\n"] -[0.000001666,"o"," "] -[0.000002084,"o","\u001b[1;38;2;0;163;224mhelp\u001b[0m"] -[0.00000175,"o"," "] -[0.000086125,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mHelp about any\u001b[0m\u001b[38;2;255;255;255m command\u001b[0m\u001b[0m\n"] -[0.000004541,"o"," "] -[0.000003584,"o","\u001b[1;38;2;0;163;224minit\u001b[0m"] -[0.000002583,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001542,"o"," "] -[0.000094083,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mInitialize a new Atmos project from\u001b[0m\u001b[38;2;255;255;255m a\u001b[0m\u001b[0m\n"] -[0.000004958,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mtemplate or source\u001b[0m\u001b[38;2;255;255;255m directory\u001b[0m\u001b[0m\n"] -[0.000005375,"o"," "] -[0.000002334,"o","\u001b[1;38;2;0;163;224mkubernetes\u001b[0m"] -[0.000001166,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001292,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001125,"o"," "] -[0.000092458,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage Kubernetes-native\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] -[0.000002792,"o"," "] -[0.000002208,"o","\u001b[1;38;2;0;163;224mlist\u001b[0m"] -[0.000002584,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000090041,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mList available stacks and\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] -[0.000004625,"o"," "] -[0.000002167,"o","\u001b[1;38;2;0;163;224mlsp\u001b[0m"] -[0.000001125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001875,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001125,"o"," "] -[0.000089458,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLanguage Server Protocol\u001b[0m\u001b[38;2;255;255;255m commands\u001b[0m\u001b[0m\n"] -[0.000004292,"o"," "] -[0.0000025,"o","\u001b[1;38;2;0;163;224mmcp\u001b[0m"] -[0.00000125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001292,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000009875,"o"," "] -[0.000098166,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage MCP servers and external\u001b[0m\u001b[38;2;255;255;255m server\u001b[0m\u001b[0m\n"] -[0.000003084,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mconnections\u001b[0m\u001b[0m\n"] -[0.000002375,"o"," "] -[0.000002125,"o","\u001b[1;38;2;0;163;224mpacker\u001b[0m"] -[0.00000125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000092208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage packer-based machine images\u001b[0m\u001b[38;2;255;255;255m for\u001b[0m\u001b[0m\n"] -[0.000004833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mmultiple\u001b[0m\u001b[38;2;255;255;255m platforms\u001b[0m\u001b[0m\n"] -[0.000004417,"o"," "] -[0.000002208,"o","\u001b[1;38;2;0;163;224mplugin\u001b[0m"] -[0.000001667,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001917,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.00000125,"o"," "] -[0.000091583,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCreate, install, and manage Atmos\u001b[0m\u001b[38;2;255;255;255m plugins\u001b[0m\u001b[0m\n"] -[0.000003,"o"," "] -[0.000003708,"o","\u001b[1;38;2;0;163;224mpolicy\u001b[0m"] -[0.000001917,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001417,"o"," "] -[0.000091208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate, inspect, and test policies\u001b[0m\u001b[38;2;255;255;255m offline\u001b[0m\u001b[0m\n"] +[0.000001417,"o"," "] +[0.000090083,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage local emulators for AWS, GCP,\u001b[0m\u001b[38;2;255;255;255m Azure,\u001b[0m\u001b[0m\n"] +[0.000004084,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mKubernetes, Vault, and OCI\u001b[0m\u001b[38;2;255;255;255m registries\u001b[0m\u001b[0m\n"] +[0.000001583,"o"," "] +[0.000003083,"o","\u001b[1;38;2;0;163;224menv\u001b[0m"] +[0.000002959,"o"," "] +[0.000085541,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput environment variables configured\u001b[0m\u001b[38;2;255;255;255m in\u001b[0m\u001b[0m\n"] +[0.000003667,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255matmos.yaml\u001b[0m\u001b[0m\n"] [0.000002917,"o"," "] -[0.000003583,"o","\u001b[1;38;2;0;163;224mpro\u001b[0m"] -[0.000001208,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001459,"o"," "] -[0.000093916,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAccess premium features integrated with\u001b[0m\u001b[38;2;255;255;255m atmos-\u001b[0m\u001b[0m\n"] -[0.000003042,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mpro.com\u001b[0m\u001b[0m\n"] -[0.000002375,"o"," "] -[0.000002125,"o","\u001b[1;38;2;0;163;224mprofile\u001b[0m"] -[0.000001083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002042,"o"," "] -[0.0000845,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage configuration\u001b[0m\u001b[38;2;255;255;255m profiles\u001b[0m\u001b[0m\n"] -[0.000004583,"o"," "] -[0.000002042,"o","\u001b[1;38;2;0;163;224msbom\u001b[0m"] -[0.000001125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001208,"o"," "] -[0.000105125,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate software bills of materials\u001b[0m\u001b[38;2;255;255;255m from\u001b[0m\u001b[0m\n"] -[0.000004834,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAtmos\u001b[0m\u001b[38;2;255;255;255m locks\u001b[0m\u001b[0m\n"] -[0.000015166,"o"," "] -[0.000002292,"o","\u001b[1;38;2;0;163;224mscaffold\u001b[0m"] -[0.000001083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.00000125,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001,"o"," "] -[0.000092167,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate code from scaffold\u001b[0m\u001b[38;2;255;255;255m templates\u001b[0m\u001b[0m\n"] -[0.000005542,"o"," "] -[0.000002666,"o","\u001b[1;38;2;0;163;224msecret\u001b[0m"] -[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001541,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001375,"o"," "] -[0.000095042,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage declarative secrets across stacks\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] -[0.000003583,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents.\u001b[0m\u001b[0m\n"] -[0.000002959,"o"," "] -[0.000005375,"o","\u001b[1;38;2;0;163;224mstack\u001b[0m"] +[0.000003208,"o","\u001b[1;38;2;0;163;224mgcp\u001b[0m"] +[0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001791,"o"," "] +[0.000095209,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun GCP-specific commands for interacting\u001b[0m\u001b[38;2;255;255;255m with\u001b[0m\u001b[0m\n"] +[0.000004083,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcloud\u001b[0m\u001b[38;2;255;255;255m resources\u001b[0m\u001b[0m\n"] +[0.000013458,"o"," "] +[0.000002709,"o","\u001b[1;38;2;0;163;224mgit\u001b[0m"] [0.000001416,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001542,"o"," "] -[0.000106208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage stack definitions, configuration,\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] -[0.000003584,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponent\u001b[0m\u001b[38;2;255;255;255m lifecycles\u001b[0m\u001b[0m\n"] -[0.00000425,"o"," "] -[0.000002,"o","\u001b[1;38;2;0;163;224mstore\u001b[0m"] -[0.000001083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000004042,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] -[0.000001625,"o"," "] -[0.000092708,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage raw values in configured\u001b[0m\u001b[38;2;255;255;255m store\u001b[0m\u001b[0m\n"] -[0.000003708,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mbackends.\u001b[0m\u001b[0m\n"] -[0.000001625,"o"," "] -[0.000002917,"o","\u001b[1;38;2;0;163;224msupport\u001b[0m"] -[0.000002458,"o"," "] -[0.000093709,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mShow Atmos support\u001b[0m\u001b[38;2;255;255;255m options\u001b[0m\u001b[0m\n"] -[0.000003208,"o"," "] +[0.000001834,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001416,"o"," "] +[0.000095875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGitOps enablement: automate Git\u001b[0m\u001b[38;2;255;255;255m commits\u001b[0m\u001b[0m\n"] +[0.000003917,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mlocally and in\u001b[0m\u001b[38;2;255;255;255m CI\u001b[0m\u001b[0m\n"] +[0.000010292,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224mhelm\u001b[0m"] +[0.000001291,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000175,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001542,"o"," "] +[0.000077792,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage native Helm\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] +[0.000002833,"o"," "] +[0.000002667,"o","\u001b[1;38;2;0;163;224mhelmfile\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001792,"o"," "] +[0.000083333,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage Helmfile-based Kubernetes\u001b[0m\u001b[38;2;255;255;255m deployments\u001b[0m\u001b[0m\n"] +[0.000002,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224mhelp\u001b[0m"] +[0.000002167,"o"," "] +[0.000082916,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mHelp about any\u001b[0m\u001b[38;2;255;255;255m command\u001b[0m\u001b[0m\n"] +[0.000004417,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224minit\u001b[0m"] +[0.000002125,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000007333,"o"," "] +[0.000087584,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mInitialize a new Atmos project from\u001b[0m\u001b[38;2;255;255;255m a\u001b[0m\u001b[0m\n"] +[0.000004166,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mtemplate or source\u001b[0m\u001b[38;2;255;255;255m directory\u001b[0m\u001b[0m\n"] +[0.000004875,"o"," "] +[0.00000325,"o","\u001b[1;38;2;0;163;224mkubernetes\u001b[0m"] +[0.000001375,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000175,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001334,"o"," "] +[0.000081375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage Kubernetes-native\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] +[0.000002958,"o"," "] +[0.000002708,"o","\u001b[1;38;2;0;163;224mlist\u001b[0m"] +[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.00008975,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mList available stacks and\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] +[0.000005375,"o"," "] +[0.000002625,"o","\u001b[1;38;2;0;163;224mlsp\u001b[0m"] +[0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000225,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001458,"o"," "] +[0.000078583,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLanguage Server Protocol\u001b[0m\u001b[38;2;255;255;255m commands\u001b[0m\u001b[0m\n"] +[0.000005167,"o"," "] +[0.000002417,"o","\u001b[1;38;2;0;163;224mmcp\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.00000175,"o"," "] +[0.000083709,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage MCP servers and external\u001b[0m\u001b[38;2;255;255;255m server\u001b[0m\u001b[0m\n"] +[0.0000035,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mconnections\u001b[0m\u001b[0m\n"] +[0.000002583,"o"," "] +[0.000002583,"o","\u001b[1;38;2;0;163;224mpacker\u001b[0m"] +[0.000007084,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000175,"o"," "] +[0.000087833,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage packer-based machine images\u001b[0m\u001b[38;2;255;255;255m for\u001b[0m\u001b[0m\n"] +[0.000004042,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mmultiple\u001b[0m\u001b[38;2;255;255;255m platforms\u001b[0m\u001b[0m\n"] +[0.000005,"o"," "] +[0.000002625,"o","\u001b[1;38;2;0;163;224mplugin\u001b[0m"] +[0.000001916,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001959,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.00000175,"o"," "] +[0.000086208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCreate, install, and manage Atmos\u001b[0m\u001b[38;2;255;255;255m plugins\u001b[0m\u001b[0m\n"] +[0.000003125,"o"," "] +[0.000002583,"o","\u001b[1;38;2;0;163;224mpolicy\u001b[0m"] +[0.000001375,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000003542,"o"," "] +[0.000085917,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate, inspect, and test policies\u001b[0m\u001b[38;2;255;255;255m offline\u001b[0m\u001b[0m\n"] +[0.000003125,"o"," "] +[0.000002333,"o","\u001b[1;38;2;0;163;224mpro\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001667,"o"," "] +[0.000089417,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAccess premium features integrated with\u001b[0m\u001b[38;2;255;255;255m atmos-\u001b[0m\u001b[0m\n"] +[0.000003666,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mpro.com\u001b[0m\u001b[0m\n"] +[0.000011459,"o"," "] +[0.000002833,"o","\u001b[1;38;2;0;163;224mprofile\u001b[0m"] +[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000095833,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage configuration\u001b[0m\u001b[38;2;255;255;255m profiles\u001b[0m\u001b[0m\n"] +[0.000005334,"o"," "] +[0.000002875,"o","\u001b[1;38;2;0;163;224msbom\u001b[0m"] +[0.000001458,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000175,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001542,"o"," "] +[0.000095875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate software bills of materials\u001b[0m\u001b[38;2;255;255;255m from\u001b[0m\u001b[0m\n"] +[0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAtmos\u001b[0m\u001b[38;2;255;255;255m locks\u001b[0m\u001b[0m\n"] +[0.000005,"o"," "] +[0.000002458,"o","\u001b[1;38;2;0;163;224mscaffold\u001b[0m"] +[0.00000225,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001375,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001209,"o"," "] +[0.000089708,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate code from scaffold\u001b[0m\u001b[38;2;255;255;255m templates\u001b[0m\u001b[0m\n"] +[0.0000055,"o"," "] +[0.000002583,"o","\u001b[1;38;2;0;163;224msecret\u001b[0m"] +[0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002333,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.0000015,"o"," "] +[0.000093292,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage declarative secrets across stacks\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] +[0.000003667,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponents.\u001b[0m\u001b[0m\n"] +[0.000002708,"o"," "] +[0.000002458,"o","\u001b[1;38;2;0;163;224mstack\u001b[0m"] +[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002458,"o"," "] +[0.000099667,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage stack definitions, configuration,\u001b[0m\u001b[38;2;255;255;255m and\u001b[0m\u001b[0m\n"] +[0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcomponent\u001b[0m\u001b[38;2;255;255;255m lifecycles\u001b[0m\u001b[0m\n"] +[0.000004958,"o"," "] +[0.000003417,"o","\u001b[1;38;2;0;163;224mstore\u001b[0m"] +[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001416,"o"," \u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m"] +[0.000001125,"o"," "] +[0.000089834,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage raw values in configured\u001b[0m\u001b[38;2;255;255;255m store\u001b[0m\u001b[0m\n"] +[0.000011916,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mbackends.\u001b[0m\u001b[0m\n"] +[0.000002,"o"," "] +[0.000002834,"o","\u001b[1;38;2;0;163;224msupport\u001b[0m"] +[0.000001666,"o"," "] +[0.000087667,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mShow Atmos support\u001b[0m\u001b[38;2;255;255;255m options\u001b[0m\u001b[0m\n"] +[0.0000025,"o"," "] [0.000002458,"o","\u001b[1;38;2;0;163;224mterraform\u001b[0m"] -[0.00000125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001834,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] [0.00000175,"o"," "] -[0.000091959,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mExecute Terraform commands using Atmos\u001b[0m\u001b[38;2;255;255;255m stack\u001b[0m\u001b[0m\n"] -[0.000012208,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mconfigurations\u001b[0m\u001b[0m\n"] -[0.000003458,"o"," "] -[0.000002417,"o","\u001b[1;38;2;0;163;224mtheme\u001b[0m"] -[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001875,"o"," "] -[0.000089875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage terminal themes for Atmos\u001b[0m\u001b[38;2;255;255;255m CLI\u001b[0m\u001b[0m\n"] -[0.000003583,"o"," "] -[0.0000025,"o","\u001b[1;38;2;0;163;224mtoolchain\u001b[0m"] -[0.00000125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000095333,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage tool versions and\u001b[0m\u001b[38;2;255;255;255m installations\u001b[0m\u001b[0m\n"] -[0.000003209,"o"," "] -[0.000004291,"o","\u001b[1;38;2;0;163;224mvalidate\u001b[0m"] +[0.000095583,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mExecute Terraform commands using Atmos\u001b[0m\u001b[38;2;255;255;255m stack\u001b[0m\u001b[0m\n"] +[0.000004458,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mconfigurations\u001b[0m\u001b[0m\n"] +[0.000002834,"o"," "] +[0.000002083,"o","\u001b[1;38;2;0;163;224mtheme\u001b[0m"] +[9.58e-7,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001792,"o"," "] +[0.000087625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage terminal themes for Atmos\u001b[0m\u001b[38;2;255;255;255m CLI\u001b[0m\u001b[0m\n"] +[0.000003125,"o"," "] +[0.00000275,"o","\u001b[1;38;2;0;163;224mtoolchain\u001b[0m"] [0.000001417,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001875,"o"," "] -[0.000091417,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate configurations against OPA\u001b[0m\u001b[38;2;255;255;255m policies\u001b[0m\u001b[0m\n"] -[0.00000575,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mand JSON\u001b[0m\u001b[38;2;255;255;255m schemas\u001b[0m\u001b[0m\n"] +[0.000002,"o"," "] +[0.0000845,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage tool versions and\u001b[0m\u001b[38;2;255;255;255m installations\u001b[0m\u001b[0m\n"] [0.000002916,"o"," "] -[0.000002625,"o","\u001b[1;38;2;0;163;224mvendor\u001b[0m"] -[0.000005875,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002292,"o"," "] -[0.000131208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage external dependencies for\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] -[0.000004292,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mor\u001b[0m\u001b[38;2;255;255;255m stacks\u001b[0m\u001b[0m\n"] +[0.000002834,"o","\u001b[1;38;2;0;163;224mvalidate\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002833,"o"," "] +[0.000107375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate configurations against OPA\u001b[0m\u001b[38;2;255;255;255m policies\u001b[0m\u001b[0m\n"] +[0.000004042,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mand JSON\u001b[0m\u001b[38;2;255;255;255m schemas\u001b[0m\u001b[0m\n"] +[0.000002625,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224mvendor\u001b[0m"] +[0.000001333,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000225,"o"," "] +[0.000099959,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mManage external dependencies for\u001b[0m\u001b[38;2;255;255;255m components\u001b[0m\u001b[0m\n"] +[0.00000375,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mor\u001b[0m\u001b[38;2;255;255;255m stacks\u001b[0m\u001b[0m\n"] +[0.000002791,"o"," "] +[0.000002834,"o","\u001b[1;38;2;0;163;224mversion\u001b[0m"] +[0.000001375,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002583,"o"," "] +[0.000095208,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDisplay the version of Atmos you are\u001b[0m\u001b[38;2;255;255;255m running\u001b[0m\u001b[0m\n"] +[0.00001175,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mand check for\u001b[0m\u001b[38;2;255;255;255m updates\u001b[0m\u001b[0m\n"] [0.000002875,"o"," "] -[0.000002625,"o","\u001b[1;38;2;0;163;224mversion\u001b[0m"] -[0.000001292,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.0000015,"o"," "] -[0.000103291,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDisplay the version of Atmos you are\u001b[0m\u001b[38;2;255;255;255m running\u001b[0m\u001b[0m\n"] -[0.000005084,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mand check for\u001b[0m\u001b[38;2;255;255;255m updates\u001b[0m\u001b[0m\n"] -[0.000002708,"o"," "] -[0.000002167,"o","\u001b[1;38;2;0;163;224mworkflow\u001b[0m"] -[0.000001,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001333,"o"," "] -[0.000085708,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun predefined tasks using\u001b[0m\u001b[38;2;255;255;255m workflows\u001b[0m\u001b[0m\n"] -[0.000001667,"o","\n"] -[0.000013667,"o","\u001b[1;38;2;0;163;224mCUSTOM COMMANDS\u001b[0m\n"] -[0.000001416,"o","\n"] +[0.000002,"o","\u001b[1;38;2;0;163;224mworkflow\u001b[0m"] +[0.000001125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000125,"o"," "] +[0.0000945,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRun predefined tasks using\u001b[0m\u001b[38;2;255;255;255m workflows\u001b[0m\u001b[0m\n"] +[0.00000175,"o","\n"] +[0.000006917,"o","\u001b[1;38;2;0;163;224mCUSTOM COMMANDS\u001b[0m\n"] +[0.000001458,"o","\n"] +[0.000003709,"o"," "] +[0.000002041,"o","\u001b[1;38;2;0;163;224mbuild\u001b[0m"] +[0.000001084,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001375,"o"," "] +[0.000083333,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mBuild and documentation commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] +[0.000003042,"o"," "] +[0.000002416,"o","\u001b[1;38;2;0;163;224mcache\u001b[0m"] +[0.000001209,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000080292,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGitHub Actions cache\u001b[0m\u001b[38;2;255;255;255m maintenance\u001b[0m\u001b[0m\n"] [0.000002875,"o"," "] -[0.000002584,"o","\u001b[1;38;2;0;163;224mbuild\u001b[0m"] -[0.0000115,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002041,"o"," "] -[0.0000885,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mBuild and documentation commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] -[0.000003167,"o"," "] -[0.000002583,"o","\u001b[1;38;2;0;163;224mcache\u001b[0m"] -[0.000001375,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000102875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGitHub Actions cache\u001b[0m\u001b[38;2;255;255;255m maintenance\u001b[0m\u001b[0m\n"] -[0.000002625,"o"," "] -[0.000001917,"o","\u001b[1;38;2;0;163;224mcheck\u001b[0m"] -[0.000001042,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001291,"o"," "] -[0.000084834,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRead-only repository\u001b[0m\u001b[38;2;255;255;255m checks\u001b[0m\u001b[0m\n"] -[0.000002666,"o"," "] -[0.000002167,"o","\u001b[1;38;2;0;163;224mdev\u001b[0m"] -[9.58e-7,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000002,"o"," "] -[0.000088375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDevelopment workflow commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] -[0.000002459,"o"," "] -[0.000002,"o","\u001b[1;38;2;0;163;224mfix\u001b[0m"] -[0.000001083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.00000125,"o"," "] -[0.000232875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAutonomous patch-quality checks for pr-maintenance-loop,\u001b[0m\u001b[38;2;255;255;255m scoped\u001b[0m\u001b[0m\n"] -[0.000005375,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mto the current\u001b[0m\u001b[38;2;255;255;255m branch's\u001b[0m\u001b[0m\n"] -[0.000005417,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mdiff vs a base ref (default origin/main): lint,\u001b[0m\u001b[38;2;255;255;255m failing\u001b[0m\u001b[0m\n"] +[0.000002625,"o","\u001b[1;38;2;0;163;224mcheck\u001b[0m"] +[0.000001291,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001584,"o"," "] +[0.000085041,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRead-only repository\u001b[0m\u001b[38;2;255;255;255m checks\u001b[0m\u001b[0m\n"] +[0.000003209,"o"," "] +[0.000002375,"o","\u001b[1;38;2;0;163;224mdev\u001b[0m"] +[0.0000015,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000081458,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDevelopment workflow commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] +[0.000003459,"o"," "] +[0.000002416,"o","\u001b[1;38;2;0;163;224mfix\u001b[0m"] +[0.000001209,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001708,"o"," "] +[0.000180625,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAutonomous patch-quality checks for pr-maintenance-loop,\u001b[0m\u001b[38;2;255;255;255m scoped\u001b[0m\u001b[0m\n"] +[0.000004708,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mto the current\u001b[0m\u001b[38;2;255;255;255m branch's\u001b[0m\u001b[0m\n"] +[0.000005459,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mdiff vs a base ref (default origin/main): lint,\u001b[0m\u001b[38;2;255;255;255m failing\u001b[0m\u001b[0m\n"] [0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mtests, coverage gaps, and\u001b[0m\u001b[38;2;255;255;255m replying\u001b[0m\u001b[0m\n"] -[0.000003875,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mto/resolving GitHub PR review\u001b[0m\u001b[38;2;255;255;255m threads.\u001b[0m\u001b[0m\n"] -[0.000002333,"o"," \u001b[38;2;73;85;104m\u001b[0m\n"] -[0.000004875,"o"," \u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mThese commands gather data and apply purely mechanical\u001b[0m\u001b[38;2;255;255;255m steps\u001b[0m\u001b[0m\n"] -[0.000004292,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m(e.g. running the\u001b[0m\u001b[38;2;255;255;255m existing\u001b[0m\u001b[0m\n"] -[0.000003958,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mlint gate). The actual \"fix this failing test\" / \"fix\u001b[0m\u001b[38;2;255;255;255m this\u001b[0m\u001b[0m\n"] -[0.000015125,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcoverage gap\" / \"fix this\u001b[0m\u001b[38;2;255;255;255m lint\u001b[0m\u001b[0m\n"] -[0.000004959,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mfinding\" reasoning is done by Claude Code agents that\u001b[0m\u001b[38;2;255;255;255m consume\u001b[0m\u001b[0m\n"] -[0.000005791,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mthis output —\u001b[0m\u001b[38;2;255;255;255m see\u001b[0m\u001b[0m\n"] -[0.000009542,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m.claude/skills/lint/SKILL.md and\u001b[0m\u001b[38;2;255;255;255m .claude/skills/test-\u001b[0m\u001b[0m\n"] -[0.000005042,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcoverage/SKILL.md.\u001b[0m\u001b[0m\n"] +[0.000009625,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mto/resolving GitHub PR review\u001b[0m\u001b[38;2;255;255;255m threads.\u001b[0m\u001b[0m\n"] +[0.000003292,"o"," \u001b[38;2;73;85;104m\u001b[0m\n"] +[0.000004083,"o"," \u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mThese commands gather data and apply purely mechanical\u001b[0m\u001b[38;2;255;255;255m steps\u001b[0m\u001b[0m\n"] +[0.000004917,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m(e.g. running the\u001b[0m\u001b[38;2;255;255;255m existing\u001b[0m\u001b[0m\n"] +[0.000004125,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mlint gate). The actual \"fix this failing test\" / \"fix\u001b[0m\u001b[38;2;255;255;255m this\u001b[0m\u001b[0m\n"] +[0.000003958,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcoverage gap\" / \"fix this\u001b[0m\u001b[38;2;255;255;255m lint\u001b[0m\u001b[0m\n"] +[0.000003833,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mfinding\" reasoning is done by Claude Code agents that\u001b[0m\u001b[38;2;255;255;255m consume\u001b[0m\u001b[0m\n"] +[0.000004917,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mthis output —\u001b[0m\u001b[38;2;255;255;255m see\u001b[0m\u001b[0m\n"] +[0.000004167,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m.claude/skills/lint/SKILL.md and\u001b[0m\u001b[38;2;255;255;255m .claude/skills/test-\u001b[0m\u001b[0m\n"] +[0.000009625,"o"," \u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mcoverage/SKILL.md.\u001b[0m\u001b[0m\n"] [0.00000275,"o"," "] [0.000002625,"o","\u001b[1;38;2;0;163;224mformat\u001b[0m"] -[0.000012083,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000009333,"o"," "] -[0.000152334,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mFormat repository files without staging\u001b[0m\u001b[38;2;255;255;255m changes\u001b[0m\u001b[0m\n"] -[0.0000075,"o"," "] -[0.000003,"o","\u001b[1;38;2;0;163;224mlint\u001b[0m"] -[0.00000125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000119416,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLinting commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] -[0.000004875,"o"," "] -[0.000004709,"o","\u001b[1;38;2;0;163;224mrelease\u001b[0m"] -[0.000001625,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001916,"o"," "] -[0.000109667,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRelease planning, publication, and milestone\u001b[0m\u001b[38;2;255;255;255m operations\u001b[0m\u001b[0m\n"] -[0.000005708,"o"," "] -[0.00000325,"o","\u001b[1;38;2;0;163;224mscreengrabs\u001b[0m"] -[0.0000015,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001959,"o"," "] -[0.000091291,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate and install website screengrab\u001b[0m\u001b[38;2;255;255;255m artifacts\u001b[0m\u001b[0m\n"] -[0.000003917,"o"," "] -[0.000002958,"o","\u001b[1;38;2;0;163;224mtest\u001b[0m"] -[0.000001125,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] -[0.000001625,"o"," "] -[0.000090709,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mTest commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] -[0.000002333,"o","\n"] -[0.000019083,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] -[0.0000035,"o","\n"] -[0.000101709,"o"," "] -[0.000003583,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001291,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000002042,"o"," "] +[0.000080542,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mFormat repository files without staging\u001b[0m\u001b[38;2;255;255;255m changes\u001b[0m\u001b[0m\n"] +[0.000008125,"o"," "] +[0.000002541,"o","\u001b[1;38;2;0;163;224mlint\u001b[0m"] +[0.000001459,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.00000175,"o"," "] +[0.000079166,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mLinting commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] +[0.00000325,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224mrelease\u001b[0m"] +[0.000001334,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001583,"o"," "] +[0.000084375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRelease planning, publication, and milestone\u001b[0m\u001b[38;2;255;255;255m operations\u001b[0m\u001b[0m\n"] +[0.000011292,"o"," "] +[0.0000095,"o","\u001b[1;38;2;0;163;224mscreengrabs\u001b[0m"] +[0.000001375,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001333,"o"," "] +[0.000080833,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate and install website screengrab\u001b[0m\u001b[38;2;255;255;255m artifacts\u001b[0m\u001b[0m\n"] +[0.000003667,"o"," "] +[0.000002458,"o","\u001b[1;38;2;0;163;224mtest\u001b[0m"] +[0.000001834,"o"," \u001b[38;2;73;85;104m[command]\u001b[0m"] +[0.000001916,"o"," "] +[0.00008825,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mTest commands for Atmos\u001b[0m\u001b[38;2;255;255;255m development\u001b[0m\u001b[0m\n"] +[0.000001834,"o","\n"] +[0.00001675,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000099625,"o"," "] +[0.000003083,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] [0.000001375,"o"," "] -[0.000115875,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m atmos\u001b[0m\u001b[0m\n"] -[0.000002,"o","\n"] -[0.000001583,"o"," "] -[0.000002917,"o","\u001b[1;38;2;0;163;224m --version\u001b[0m"] +[0.000087042,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m atmos\u001b[0m\u001b[0m\n"] +[0.000001625,"o","\n"] [0.000001792,"o"," "] -[0.000098666,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDisplay the Atmos CLI\u001b[0m\u001b[38;2;255;255;255m version\u001b[0m\u001b[0m\n"] -[0.000002334,"o","\n"] +[0.000002833,"o","\u001b[1;38;2;0;163;224m --version\u001b[0m"] +[0.000001542,"o"," "] +[0.000079375,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mDisplay the Atmos CLI\u001b[0m\u001b[38;2;255;255;255m version\u001b[0m\u001b[0m\n"] +[0.000001583,"o","\n"] [0.00000125,"o","\n"] -[0.000988125,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1matmos [command] --help\u001b[0m\u001b[38;2;247;250;252m for more information about a\u001b[0m\u001b[38;2;247;250;252m command.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000936333,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000015792,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools\u001b[0m\n"] +[0.000856917,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1matmos [command] --help\u001b[0m\u001b[38;2;247;250;252m for more information about a\u001b[0m\u001b[38;2;247;250;252m command.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000863083,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.00001425,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog--help.cast new file mode 100644 index 00000000000..e327e35459a --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog--help.cast @@ -0,0 +1,51 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405640,"command":"atmos artifacts catalog --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.031379125,"o","\n"] +[0.000165916,"o","\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\n\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\n\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\n\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\n\n"] +[0.000062584,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002416,"o","\n"] +[0.000019792,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000002042,"o","\n"] +[0.001228666,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mBuild, publish, and maintain the optional catalog of a configured repository. A\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mcatalog is\u001b[0m\u001b[38;2;247;250;252m a \u001b[0m\u001b[38;2;247;250;252mmaintained discovery snapshot published as an artifact record of kind\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mcatalog. It lets a registry\u001b[0m\u001b[38;2;247;250;252m that \u001b[0m\u001b[38;2;247;250;252mcannot enumerate repositories be listed and searched.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mCatalogs are discoverable data, never a trust\u001b[0m\u001b[38;2;247;250;252m grant: \u001b[0m\u001b[38;2;247;250;252mpublishing, signing, or deleting\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252man artifact never edits a catalog, and removing an entry only unlists\u001b[0m\u001b[38;2;247;250;252m it. \u001b[0m\u001b[38;2;247;250;252mCatalog\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mwrites need one externally serialized\u001b[0m\u001b[38;2;247;250;252m publisher.\u001b[0m\n"] +[0.000016667,"o","\n"] +[0.00000425,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001708,"o","\n"] +[0.000049709,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[sub-command]\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002416,"o","\n"] +[0.000004084,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001208,"o","\n"] +[0.000224875,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Build a catalog snapshot from an inventory, then publish it\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mbuild\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--input=inventory.yaml\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;155;81;224;48;2;47;46;54moutput=catalog.json\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog.json\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- List or unlist one release in the published catalog\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54madd\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcomponents/terraform/vpc:1.2.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mremove\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcomponents/terraform/vpc:1.2.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Merge an inventory into the published catalog, keeping every other entry\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54msync\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--input=inventory.yaml\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000023667,"o","\n"] +[0.000131333,"o","\u001b[1;38;2;0;163;224mBUILT-IN COMMANDS\u001b[0m\n"] +[0.000001625,"o","\n"] +[0.000001708,"o"," "] +[0.000002542,"o","\u001b[1;38;2;0;163;224madd\u001b[0m"] +[0.000002875,"o"," "] +[0.00011475,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mList releases in the repository's published\u001b[0m\u001b[38;2;255;255;255m catalog\u001b[0m\u001b[0m\n"] +[0.000002042,"o"," "] +[0.00000275,"o","\u001b[1;38;2;0;163;224mbuild\u001b[0m"] +[0.00000225,"o"," "] +[0.00010375,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mBuild a catalog snapshot from an inventory without publishing\u001b[0m\u001b[38;2;255;255;255m it\u001b[0m\u001b[0m\n"] +[0.000002291,"o"," "] +[0.000003209,"o","\u001b[1;38;2;0;163;224mpublish\u001b[0m"] +[0.000002291,"o"," "] +[0.000104334,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mPublish a catalog snapshot to the repository's configured\u001b[0m\u001b[38;2;255;255;255m catalog\u001b[0m\u001b[0m\n"] +[0.000001875,"o"," "] +[0.000002375,"o","\u001b[1;38;2;0;163;224mremove\u001b[0m"] +[0.000002333,"o"," "] +[0.000132958,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mUnlist a release from the repository's published\u001b[0m\u001b[38;2;255;255;255m catalog\u001b[0m\u001b[0m\n"] +[0.000002167,"o"," "] +[0.000002833,"o","\u001b[1;38;2;0;163;224msync\u001b[0m"] +[0.000002042,"o"," "] +[0.000102,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mMerge an inventory's releases into the repository's published\u001b[0m\u001b[38;2;255;255;255m catalog\u001b[0m\u001b[0m\n"] +[0.000002292,"o","\n"] +[0.000013541,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001459,"o","\n"] +[0.000086416,"o"," "] +[0.000004,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001459,"o"," "] +[0.000101541,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m catalog\u001b[0m\u001b[0m\n"] +[0.000001875,"o","\n"] +[0.000001334,"o","\n"] +[0.000932958,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1matmos artifacts catalog [command] --help\u001b[0m\u001b[38;2;247;250;252m for more information about a\u001b[0m\u001b[38;2;247;250;252m command.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000959542,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000019458,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog-add--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog-add--help.cast new file mode 100644 index 00000000000..eca3dde76a7 --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog-add--help.cast @@ -0,0 +1,41 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405642,"command":"atmos artifacts catalog add --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030114333,"o","\n"] +[0.000127917,"o","\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;99m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\n\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\n\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;38m \u001b[0m\n\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;38m \u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m \u001b[0m\n\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;38m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m█\u001b[0m\u001b[38;5;44m \u001b[0m\n\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;69m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;38m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\n\n"] +[0.000054833,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.00000175,"o","\n"] +[0.000008167,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001666,"o","\n"] +[0.001194667,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mResolve the releases (name:version or name@sha256:\u001b[0m\u001b[38;2;247;250;252m) in the repository and list them in\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mthe\u001b[0m\u001b[38;2;247;250;252m latest \u001b[0m\u001b[38;2;247;250;252mpublished catalog, creating the catalog when none exists. Only artifact\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mmetadata is\u001b[0m\u001b[38;2;247;250;252m read.\u001b[0m\n"] +[0.000038208,"o","\n"] +[0.000006292,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000047584,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54madd\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u003cref\u003e...\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000003041,"o","\n"] +[0.0000035,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001084,"o","\n"] +[0.000045375,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- List one release in the published catalog\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54madd\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcomponents/terraform/vpc:1.2.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002666,"o","\n"] +[0.000010584,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001083,"o","\n"] +[0.000098083,"o"," "] +[0.000003792,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.00000125,"o"," "] +[0.000002417,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001125,"o"," "] +[0.000136375,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.000002125,"o","\n"] +[0.000001416,"o"," "] +[0.0000025,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000003042,"o"," "] +[0.000097,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m add\u001b[0m\u001b[0m\n"] +[0.000001583,"o","\n"] +[0.000011959,"o"," "] +[0.000004666,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.0000015,"o"," "] +[0.000002375,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001292,"o"," "] +[0.000108667,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository alias \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.000001083,"o","\n"] +[0.000951292,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000014875,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog-add\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog-build--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog-build--help.cast new file mode 100644 index 00000000000..a4e889a3740 --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog-build--help.cast @@ -0,0 +1,63 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405641,"command":"atmos artifacts catalog build --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030654292,"o","\n"] +[0.000201791,"o","\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;99m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\n\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\n\u001b[38;5;128m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;69m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\n\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\n\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m█\u001b[0m\u001b[38;5;69m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m█\u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m█\u001b[0m\u001b[38;5;39m \u001b[0m\n\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;63m \u001b[0m\u001b[38;5;69m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;33m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;39m \u001b[0m\u001b[38;5;38m \u001b[0m\u001b[38;5;44m \u001b[0m\u001b[38;5;44m \u001b[0m\n\n"] +[0.000113334,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002583,"o","\n"] +[0.000009792,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001833,"o","\n"] +[0.001200583,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mResolve the releases of an AtmosArtifactInventory in one configured repository and\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mwrite\u001b[0m\u001b[38;2;247;250;252m an \u001b[0m\u001b[38;2;247;250;252mAtmosArtifactCatalog snapshot. Build reads artifact metadata only: no payload\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mis downloaded and nothing\u001b[0m\u001b[38;2;247;250;252m is \u001b[0m\u001b[38;2;247;250;252mpublished. The snapshot records the revision of the\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mcatalog it was based on, so publishing it later\u001b[0m\u001b[38;2;247;250;252m fails \u001b[0m\u001b[38;2;247;250;252mif the catalog changed in\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mbetween.\u001b[0m\n"] +[0.000025625,"o","\n"] +[0.000006042,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.00000175,"o","\n"] +[0.000046208,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mbuild\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002792,"o","\n"] +[0.00000425,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000057292,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Build a catalog snapshot from an inventory\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mbuild\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--input=inventory.yaml\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;155;81;224;48;2;47;46;54moutput=catalog.json\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000003917,"o","\n"] +[0.00001375,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001083,"o","\n"] +[0.000112958,"o"," "] +[0.000003459,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.000001291,"o"," "] +[0.0000025,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000084417,"o"," "] +[0.000144542,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.000002833,"o","\n"] +[0.000001917,"o"," "] +[0.000003333,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000002083,"o"," "] +[0.000087,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m build\u001b[0m\u001b[0m\n"] +[0.000001667,"o","\n"] +[0.00000125,"o"," "] +[0.000002417,"o","\u001b[1;38;2;0;163;224m --input\u001b[0m"] +[0.000001291,"o"," "] +[0.000002334,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001916,"o"," "] +[0.00008575,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAtmosArtifactInventory manifest listing the releases\u001b[0m\u001b[38;2;255;255;255m to\u001b[0m\u001b[0m\n"] +[0.000003042,"o"," \u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mresolve\u001b[0m\u001b[0m\n"] +[0.000001167,"o","\n"] +[0.00000175,"o"," "] +[0.000013375,"o","\u001b[1;38;2;0;163;224m --name\u001b[0m"] +[0.000003875,"o"," "] +[0.000004083,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001583,"o"," "] +[0.000121375,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCatalog manifest name (default: the configured catalog\u001b[0m\u001b[38;2;255;255;255m name)\u001b[0m\u001b[0m\n"] +[0.000001875,"o","\n"] +[0.000001459,"o"," "] +[0.000002625,"o","\u001b[1;38;2;0;163;224m --output\u001b[0m"] +[0.000001166,"o"," "] +[0.000002959,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001166,"o"," "] +[0.000097292,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mFile to write the catalog snapshot to (.json, .yaml, or\u001b[0m\u001b[38;2;255;255;255m .yml)\u001b[0m\u001b[0m\n"] +[0.000001542,"o","\n"] +[0.000001416,"o"," "] +[0.000002334,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.000001166,"o"," "] +[0.000002,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001125,"o"," "] +[0.00010125,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository alias \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[0.000001459,"o","\n"] +[0.000001166,"o","\n"] +[0.000973917,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.0000205,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog-build\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog-publish--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog-publish--help.cast new file mode 100644 index 00000000000..a8210004330 --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog-publish--help.cast @@ -0,0 +1,50 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405641,"command":"atmos artifacts catalog publish --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030363916,"o","\n"] +[0.000118625,"o","\u001b[38;5;49m \u001b[0m\u001b[38;5;49m█\u001b[0m\u001b[38;5;49m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;84m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m \u001b[0m\n\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;84m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\n\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;84m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\n\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m█\u001b[0m\u001b[38;5;48m \u001b[0m\u001b[38;5;84m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;119m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\n\u001b[38;5;84m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\n\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;83m \u001b[0m\u001b[38;5;119m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\n\n"] +[0.000063625,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000001959,"o","\n"] +[0.000010041,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001792,"o","\n"] +[0.001070458,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mPublish an AtmosArtifactCatalog snapshot to the catalog configured on the repository.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mThe command\u001b[0m\u001b[38;2;247;250;252m fails \u001b[0m\u001b[38;2;247;250;252mbefore any write when the repository has no catalog, when the\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252msnapshot names a location outside\u001b[0m\u001b[38;2;247;250;252m the \u001b[0m\u001b[38;2;247;250;252mrepository, or when the catalog changed since\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mthe snapshot was built. Run only one catalog writer at a\u001b[0m\u001b[38;2;247;250;252m time: \u001b[0m\u001b[38;2;247;250;252mthe checks detect stale\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252minput but are not an atomic registry\u001b[0m\u001b[38;2;247;250;252m lock.\u001b[0m\n"] +[0.000019917,"o","\n"] +[0.000003667,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001166,"o","\n"] +[0.000040084,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m\u003cfile\u003e\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002083,"o","\n"] +[0.000003208,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.0000015,"o","\n"] +[0.000089042,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Publish a built snapshot to the repository's configured catalog\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog.json\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m-\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m Refuse to publish unless the catalog is still the revision the snapshot was built fro\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54mm\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog.json\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--expected-\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;155;81;224;48;2;47;46;54mdigest=sha256:\u003cdigest\u003e\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000018792,"o","\n"] +[0.00001025,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001125,"o","\n"] +[0.000090958,"o"," "] +[0.000003542,"o","\u001b[1;38;2;0;163;224m --expected-digest\u001b[0m"] +[0.00000125,"o"," "] +[0.000002458,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001208,"o"," "] +[0.000101959,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mRequire the published catalog to have this\u001b[0m\u001b[38;2;255;255;255m manifest\u001b[0m\u001b[0m\n"] +[0.000010291,"o"," \u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mdigest\u001b[0m\u001b[0m\n"] +[0.000001209,"o","\n"] +[0.000001625,"o"," "] +[0.000003125,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.000001,"o"," "] +[0.00000225,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001208,"o"," "] +[0.00009725,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.0000015,"o","\n"] +[0.00000125,"o"," "] +[0.000002333,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001709,"o"," "] +[0.000094083,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m publish\u001b[0m\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000001209,"o"," "] +[0.000002541,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.000001125,"o"," "] +[0.000002334,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001708,"o"," "] +[0.000097875,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository\u001b[0m\u001b[38;2;255;255;255m alias\u001b[0m\u001b[0m\n"] +[0.000003125,"o"," \u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[0.000001208,"o","\n"] +[9.59e-7,"o","\n"] +[0.000863333,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000011458,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog-publish\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog-remove--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog-remove--help.cast new file mode 100644 index 00000000000..faaf6eb1642 --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog-remove--help.cast @@ -0,0 +1,41 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405642,"command":"atmos artifacts catalog remove --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030041125,"o","\n"] +[0.000142958,"o","\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\n\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\n\n"] +[0.000054917,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002208,"o","\n"] +[0.000009875,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001959,"o","\n"] +[0.001035833,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUnlist a name:version from the latest published catalog. The artifact, its signatures,\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mand every\u001b[0m\u001b[38;2;247;250;252m consumer \u001b[0m\u001b[38;2;247;250;252mlock file are untouched: removal only stops the release from being\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mdiscovered.\u001b[0m\n"] +[0.000014667,"o","\n"] +[0.0000035,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001458,"o","\n"] +[0.000041708,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mremove\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m\u003cref\u003e\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.0000025,"o","\n"] +[0.000003584,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.000049791,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Unlist one release without deleting the artifact\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mremove\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcomponents/terraform/vpc:1.2.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000003334,"o","\n"] +[0.000012375,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000095208,"o"," "] +[0.000004042,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.0000015,"o"," "] +[0.000002958,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001584,"o"," "] +[0.000107541,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.000001917,"o","\n"] +[0.000001667,"o"," "] +[0.00000325,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001708,"o"," "] +[0.000093667,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m remove\u001b[0m\u001b[0m\n"] +[0.000011625,"o","\n"] +[0.000001833,"o"," "] +[0.000004042,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.000006125,"o"," "] +[0.000002666,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.00000125,"o"," "] +[0.000096375,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository alias \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[0.000001417,"o","\n"] +[0.000001,"o","\n"] +[0.000895083,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000016209,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog-remove\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-artifacts-catalog-sync--help.cast b/website/static/casts/screengrabs/atmos-artifacts-catalog-sync--help.cast new file mode 100644 index 00000000000..c5c7343cc1d --- /dev/null +++ b/website/static/casts/screengrabs/atmos-artifacts-catalog-sync--help.cast @@ -0,0 +1,48 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405642,"command":"atmos artifacts catalog sync --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030037333,"o","\n"] +[0.000121,"o","\u001b[38;5;83m \u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\n\u001b[38;5;83m█\u001b[0m\u001b[38;5;119m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;118m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\n\u001b[38;5;118m█\u001b[0m\u001b[38;5;118m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m█\u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\n\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;154m \u001b[0m\u001b[38;5;148m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\n\n"] +[0.000061333,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002334,"o","\n"] +[0.000009875,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001666,"o","\n"] +[0.001053209,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mResolve the releases of an AtmosArtifactInventory and merge them into the latest\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mpublished catalog.\u001b[0m\u001b[38;2;247;250;252m Entries \u001b[0m\u001b[38;2;247;250;252mthe inventory does not mention are kept. Only artifact\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mmetadata is\u001b[0m\u001b[38;2;247;250;252m read.\u001b[0m\n"] +[0.000015791,"o","\n"] +[0.000003459,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.0000015,"o","\n"] +[0.000035458,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54msync\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.00000225,"o","\n"] +[0.000003792,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001208,"o","\n"] +[0.000045125,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Merge the releases of an inventory into the published catalog\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54martifacts\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mcatalog\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54msync\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--input=inventory.yaml\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002833,"o","\n"] +[0.000011417,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001167,"o","\n"] +[0.000088083,"o"," "] +[0.000004125,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.000001542,"o"," "] +[0.000002958,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001708,"o"," "] +[0.000109292,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.000002333,"o","\n"] +[0.000001584,"o"," "] +[0.000003,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001791,"o"," "] +[0.000096709,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m sync\u001b[0m\u001b[0m\n"] +[0.00001875,"o","\n"] +[0.000001916,"o"," "] +[0.000003,"o","\u001b[1;38;2;0;163;224m --input\u001b[0m"] +[0.000001917,"o"," "] +[0.000003542,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001458,"o"," "] +[0.000104125,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mAtmosArtifactInventory manifest listing the releases to\u001b[0m\u001b[38;2;255;255;255m merge\u001b[0m\u001b[0m\n"] +[0.000001792,"o","\n"] +[0.000001583,"o"," "] +[0.000003167,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.000001541,"o"," "] +[0.000002917,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001417,"o"," "] +[0.000090375,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository alias \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[0.000001625,"o","\n"] +[0.000001208,"o","\n"] +[0.000891542,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000014958,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/artifacts/catalog-sync\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-scaffold--help.cast b/website/static/casts/screengrabs/atmos-scaffold--help.cast index 3e9bfa46f38..4917b0bef81 100644 --- a/website/static/casts/screengrabs/atmos-scaffold--help.cast +++ b/website/static/casts/screengrabs/atmos-scaffold--help.cast @@ -1,39 +1,43 @@ -{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1793820553,"command":"atmos scaffold --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} -[0.030582709,"o","\n"] -[0.000135708,"o","\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\n\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m \u001b[0m\n\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\n\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;164m█\u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m█\u001b[0m\u001b[38;5;93m \u001b[0m\n\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;128m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;129m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;93m \u001b[0m\u001b[38;5;99m \u001b[0m\n\n"] -[0.000055625,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] -[0.000002,"o","\n"] -[0.000007583,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] -[0.000001125,"o","\n"] -[0.001110334,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mGenerate code from scaffold templates defined in atmos.yaml or embedded\u001b[0m\u001b[38;2;247;250;252m templates.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mScaffold templates allow you to quickly generate boilerplate code,\u001b[0m\u001b[38;2;247;250;252m configurations, \u001b[0m\u001b[38;2;247;250;252mand\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mdirectory structures based on predefined\u001b[0m\u001b[38;2;247;250;252m templates.\u001b[0m\n"] -[0.000020833,"o","\n"] -[0.000003542,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794363045,"command":"atmos scaffold --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030096541,"o","\n"] +[0.000157875,"o","\u001b[38;5;154m \u001b[0m\u001b[38;5;148m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m \u001b[0m\n\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\n\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\n\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;184m \u001b[0m\u001b[38;5;178m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\n\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\n\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\n\n"] +[0.00014075,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002167,"o","\n"] +[0.000025,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001667,"o","\n"] +[0.001222875,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mGenerate code from scaffold templates defined in atmos.yaml or embedded\u001b[0m\u001b[38;2;247;250;252m templates.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mScaffold templates allow you to quickly generate boilerplate code,\u001b[0m\u001b[38;2;247;250;252m configurations, \u001b[0m\u001b[38;2;247;250;252mand\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mdirectory structures based on predefined\u001b[0m\u001b[38;2;247;250;252m templates.\u001b[0m\n"] +[0.000016125,"o","\n"] +[0.00000425,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] [0.000001458,"o","\n"] -[0.000052917,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[sub-command]\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] -[0.00000225,"o","\n"] -[0.000092833,"o","\u001b[1;38;2;0;163;224mBUILT-IN COMMANDS\u001b[0m\n"] -[0.000001333,"o","\n"] -[0.000001667,"o"," "] -[0.000002458,"o","\u001b[1;38;2;0;163;224mgenerate\u001b[0m"] -[0.000002125,"o"," "] -[0.000110875,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate code from a scaffold\u001b[0m\u001b[38;2;255;255;255m template\u001b[0m\u001b[0m\n"] -[0.000001917,"o"," "] -[0.000002667,"o","\u001b[1;38;2;0;163;224mlist\u001b[0m"] -[0.000001916,"o"," "] -[0.000094459,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mList available scaffold\u001b[0m\u001b[38;2;255;255;255m templates\u001b[0m\u001b[0m\n"] -[0.000001708,"o"," "] -[0.000002333,"o","\u001b[1;38;2;0;163;224mvalidate\u001b[0m"] -[0.000001625,"o"," "] -[0.000086167,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate scaffold template\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] -[0.0000015,"o","\n"] -[0.000010125,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000049375,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[sub-command]\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] [0.000002208,"o","\n"] -[0.000073334,"o"," "] -[0.00000275,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] -[0.000001041,"o"," "] -[0.000084834,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m scaffold\u001b[0m\u001b[0m\n"] -[0.000001416,"o","\n"] +[0.000090917,"o","\u001b[1;38;2;0;163;224mBUILT-IN COMMANDS\u001b[0m\n"] +[0.000001667,"o","\n"] +[0.000001833,"o"," "] +[0.000002958,"o","\u001b[1;38;2;0;163;224mgenerate\u001b[0m"] +[0.00000275,"o"," "] +[0.00010325,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mGenerate code from a scaffold\u001b[0m\u001b[38;2;255;255;255m template\u001b[0m\u001b[0m\n"] +[0.000002667,"o"," "] +[0.000003083,"o","\u001b[1;38;2;0;163;224mlist\u001b[0m"] +[0.000002584,"o"," "] +[0.000095583,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mList available scaffold\u001b[0m\u001b[38;2;255;255;255m templates\u001b[0m\u001b[0m\n"] +[0.000001625,"o"," "] +[0.000002583,"o","\u001b[1;38;2;0;163;224mpublish\u001b[0m"] +[0.000002042,"o"," "] +[0.000099833,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate and publish a scaffold as a versioned\u001b[0m\u001b[38;2;255;255;255m artifact\u001b[0m\u001b[0m\n"] +[0.000002292,"o"," "] +[0.000002833,"o","\u001b[1;38;2;0;163;224mvalidate\u001b[0m"] +[0.000002,"o"," "] +[0.000083209,"o","\u001b[38;2;73;85;104m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate scaffold template\u001b[0m\u001b[38;2;255;255;255m configuration\u001b[0m\u001b[0m\n"] +[0.000001791,"o","\n"] +[0.000010125,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001292,"o","\n"] +[0.000076792,"o"," "] +[0.000003375,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001416,"o"," "] +[0.000087084,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m scaffold\u001b[0m\u001b[0m\n"] +[0.000001708,"o","\n"] [0.00000125,"o","\n"] -[0.000929209,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1matmos scaffold [command] --help\u001b[0m\u001b[38;2;247;250;252m for more information about a\u001b[0m\u001b[38;2;247;250;252m command.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000873541,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] -[0.000018,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/scaffold/usage\u001b[0m\n"] +[0.000885333,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1matmos scaffold [command] --help\u001b[0m\u001b[38;2;247;250;252m for more information about a\u001b[0m\u001b[38;2;247;250;252m command.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000847542,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000028042,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/scaffold/usage\u001b[0m\n"] diff --git a/website/static/casts/screengrabs/atmos-scaffold-publish--help.cast b/website/static/casts/screengrabs/atmos-scaffold-publish--help.cast new file mode 100644 index 00000000000..8ef34303581 --- /dev/null +++ b/website/static/casts/screengrabs/atmos-scaffold-publish--help.cast @@ -0,0 +1,88 @@ +{"version":3,"term":{"cols":90,"rows":36,"type":"xterm-256color"},"timestamp":1794405663,"command":"atmos scaffold publish --help","env":{"COLORTERM":"truecolor","SHELL":"/bin/zsh"}} +[0.030336333,"o","\n"] +[0.000148167,"o","\u001b[38;5;184m \u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\n\u001b[38;5;184m█\u001b[0m\u001b[38;5;178m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\n\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\n\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;214m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;204m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\n\u001b[38;5;214m█\u001b[0m\u001b[38;5;214m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m█\u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m█\u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;198m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;199m█\u001b[0m\u001b[38;5;163m█\u001b[0m\u001b[38;5;164m \u001b[0m\n\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;208m \u001b[0m\u001b[38;5;209m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;203m \u001b[0m\u001b[38;5;204m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;198m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;199m \u001b[0m\u001b[38;5;163m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\u001b[38;5;164m \u001b[0m\n\n"] +[0.000054792,"o","👽 \u001b[38;2;73;85;104mtest\u001b[0m \u001b[38;2;73;85;104mdarwin/arm64\u001b[0m\n"] +[0.000002041,"o","\n"] +[0.0000185,"o","\u001b[48;2;236;201;75m \u001b[0m\u001b[1;38;2;26;32;44;48;2;236;201;75mEXPERIMENTAL\u001b[0m\u001b[48;2;236;201;75m \u001b[0m\n"] +[0.000001417,"o","\n"] +[0.001270667,"o","\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mValidate a scaffold directory and publish it to one configured artifact\u001b[0m\u001b[38;2;247;250;252m repository.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mThe scaffold configuration (scaffold.yaml at the source root) is validated first,\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mwithout generating output and without running scaffold hooks. The artifact name and\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mversion default to the scaffold manifest's metadata.name and metadata.version; --name\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mand --version override\u001b[0m\u001b[38;2;247;250;252m them.\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mThe root README is ordinary scaffold content. The files .atmos/artifact/README.md and\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252m.atmos/artifact/CHANGELOG.md are published as separate package documents and never\u001b[0m\n\u001b[38;2;73;85;104m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mappear in generated\u001b[0m\u001b[38;2;247;250;252m output.\u001b[0m\n"] +[0.000013041,"o","\n"] +[0.000003625,"o","\u001b[1;38;2;0;163;224mUSAGE\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.00004825,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m\u003csource\u003e\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[3;38;2;231;229;227;48;2;47;46;54m[flags]\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.000002125,"o","\n"] +[0.000003125,"o","\u001b[1;38;2;0;163;224mEXAMPLES\u001b[0m\n"] +[0.000001209,"o","\n"] +[0.000268625,"o"," \u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Publish a scaffold to a configured repository\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m./scaffolds/landing-zone\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\\\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m --repository=shared --name=scaffolds/landing-zone --version=2.0.0\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m-\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m Take the name and version from the scaffold manifest (metadata.name and metadata.vers\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54mion)\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m./scaffolds/landing-zone\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Validate the scaffold and plan the publication without writing anything\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m./scaffolds/landing-zone\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--dry-run\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Attach labels and package documents\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mpublish\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m./scaffolds/landing-zone\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--repository=shared\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;155;81;224;48;2;47;46;54m--\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;155;81;224;48;2;47;46;54mversion=2.0.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\\\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m --labels=team=platform --readme=docs/PACKAGE.md --changelog=docs/CHANGES.md\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54m- Generate a project from the published scaffold\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;87;83;78;48;2;47;46;54m$ \u001b[0m\u001b[1;38;2;155;81;224;48;2;47;46;54matmos\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mscaffold\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54mgenerate\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54moci://registry.example.com/acme/atmos/scaffolds/landing-\u001b[m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m\u001b[38;2;231;229;227;48;2;47;46;54mzone:2.0.0\u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m \u001b[0m\u001b[38;2;231;229;227;48;2;47;46;54m./my-project\u001b[0m\u001b[0m\u001b[48;2;47;46;54m \u001b[0m\u001b[48;2;47;46;54m \u001b[0m\n \u001b[48;2;47;46;54m \u001b[0m\n"] +[0.00002325,"o","\n"] +[0.000010041,"o","\u001b[1;38;2;0;163;224mFLAGS\u001b[0m\n"] +[0.000001334,"o","\n"] +[0.000084541,"o"," "] +[0.000003292,"o","\u001b[1;38;2;0;163;224m --changelog\u001b[0m"] +[0.000001167,"o"," "] +[0.000002541,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001417,"o"," "] +[0.000097917,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mCHANGELOG path, relative to the source\u001b[0m\u001b[38;2;255;255;255m directory\u001b[0m\u001b[0m\n"] +[0.00000175,"o","\n"] +[0.000001541,"o"," "] +[0.000003209,"o","\u001b[1;38;2;0;163;224m-n, --dry-run\u001b[0m"] +[0.000001375,"o"," "] +[0.000096125,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mValidate and plan the publication without writing\u001b[0m\u001b[38;2;255;255;255m anything\u001b[0m\u001b[0m\n"] +[0.000001416,"o","\n"] +[0.00000125,"o"," "] +[0.000002584,"o","\u001b[1;38;2;0;163;224m-f, --force\u001b[0m"] +[0.000001625,"o"," "] +[0.000088666,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mReplace an existing artifact with different\u001b[0m\u001b[38;2;255;255;255m content\u001b[0m\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.000001167,"o"," "] +[0.000002583,"o","\u001b[1;38;2;0;163;224m --format\u001b[0m"] +[0.000001292,"o"," "] +[0.000002583,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001542,"o"," "] +[0.000093042,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mOutput format: text, json, yaml (default \u001b[0m\u001b[38;2;155;81;224;1mtext\u001b[0m\u001b[38;2;255;255;255m)\u001b[0m\u001b[0m\n"] +[0.000001583,"o","\n"] +[0.000001,"o"," "] +[0.000002042,"o","\u001b[1;38;2;0;163;224m-h, --help\u001b[0m"] +[0.000001458,"o"," "] +[0.000101958,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mhelp for\u001b[0m\u001b[38;2;255;255;255m publish\u001b[0m\u001b[0m\n"] +[0.000001417,"o","\n"] +[0.000001083,"o"," "] +[0.000002292,"o","\u001b[1;38;2;0;163;224m --labels\u001b[0m"] +[0.000001667,"o"," "] +[0.000004875,"o","\u001b[38;2;73;85;104mstringArray\u001b[0m"] +[0.000001208,"o"," "] +[0.000093167,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mExact key=value labels (comma-separated and/or\u001b[0m\u001b[38;2;255;255;255m repeated)\u001b[0m\u001b[0m\n"] +[0.000001333,"o","\n"] +[0.000001042,"o"," "] +[0.000004375,"o","\u001b[1;38;2;0;163;224m --name\u001b[0m"] +[0.000001375,"o"," "] +[0.000002041,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.00000125,"o"," "] +[0.000092334,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mArtifact name (default: producer metadata, then the\u001b[0m\u001b[38;2;255;255;255m source\u001b[0m\u001b[0m\n"] +[0.00000375,"o"," \u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mbasename)\u001b[0m\u001b[0m\n"] +[0.00000125,"o","\n"] +[0.000001541,"o"," "] +[0.00000225,"o","\u001b[1;38;2;0;163;224m --readme\u001b[0m"] +[9.17e-7,"o"," "] +[0.000002375,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001083,"o"," "] +[0.0000805,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mREADME path, relative to the source\u001b[0m\u001b[38;2;255;255;255m directory\u001b[0m\u001b[0m\n"] +[0.000001459,"o","\n"] +[0.000001166,"o"," "] +[0.000011625,"o","\u001b[1;38;2;0;163;224m-r, --repository\u001b[0m"] +[0.000001125,"o"," "] +[0.000001959,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001166,"o"," "] +[0.000081667,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mConfigured artifact repository\u001b[0m\u001b[38;2;255;255;255m alias\u001b[0m\u001b[0m\n"] +[0.000003,"o"," \u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255m(artifacts.repositories)\u001b[0m\u001b[0m\n"] +[9.58e-7,"o","\n"] +[0.000001375,"o"," "] +[0.00000225,"o","\u001b[1;38;2;0;163;224m --version\u001b[0m"] +[0.000001542,"o"," "] +[0.000002167,"o","\u001b[38;2;73;85;104mstring\u001b[0m"] +[0.000001458,"o"," "] +[0.000117042,"o","\u001b[38;2;255;255;255m\u001b[38;2;255;255;255m\u001b[0m\u001b[38;2;255;255;255m\u001b[0m \u001b[38;2;255;255;255m \u001b[0m\u001b[38;2;255;255;255mArtifact version (required unless the producer supplies\u001b[0m\u001b[38;2;255;255;255m one)\u001b[0m\u001b[0m\n"] +[0.000001375,"o","\n"] +[0.000001,"o","\n"] +[0.000864041,"o","\n\u001b[38;2;73;85;104m\u001b[38;2;247;250;252m\u001b[0m\u001b[38;2;247;250;252m\u001b[0m \u001b[38;2;247;250;252mUse \u001b[0m\u001b[38;2;0;255;255;1m--help=usage\u001b[0m\u001b[38;2;247;250;252m for examples or \u001b[0m\u001b[38;2;0;255;255;1m--help=all\u001b[0m\u001b[38;2;247;250;252m for all flags and full\u001b[0m\u001b[38;2;247;250;252m help.\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\u001b[0m\n"] +[0.000013167,"o","\n \u001b[38;2;73;85;104mDocumentation:\u001b[0m \u001b[38;2;65;153;225mhttps://atmos.tools/cli/commands/scaffold/publish\u001b[0m\n"]