Rename publish runtime terminology to published outputs
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
const (
|
||||
InputKindManifest = "previous_manifest"
|
||||
InputKindArtifact = "previous_artifact"
|
||||
InputSource = "previous_session_archive.current"
|
||||
InputSource = "previous_session_publish.current"
|
||||
)
|
||||
|
||||
type Plan struct {
|
||||
@@ -199,7 +199,7 @@ func BuildPlan(
|
||||
selectedRel := ""
|
||||
selectedKey := ""
|
||||
for _, candidate := range candidates {
|
||||
remoteKey := artifacts.S3PromotedArtifactKey(previousSessionPrefix, candidate)
|
||||
remoteKey := artifacts.S3PublishedOutputKey(previousSessionPrefix, candidate)
|
||||
exists, err := store.Exists(ctx, remoteKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("check previous-session artifact object %q: %w", remoteKey, err)
|
||||
@@ -289,9 +289,9 @@ func artifactRelativePathCandidates(
|
||||
if rel, ok := manifestArtifactRelativePathBySourceID(previousManifest, sourceID); ok {
|
||||
appendCandidate(rel)
|
||||
base := path.Base(rel)
|
||||
for _, promoted := range manifestPromotedPaths(previousManifest) {
|
||||
if path.Base(promoted) == base {
|
||||
appendCandidate(promoted)
|
||||
for _, published := range manifestPublishedPaths(previousManifest) {
|
||||
if path.Base(published) == base {
|
||||
appendCandidate(published)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,15 +395,15 @@ func manifestSessionRoot(previousManifest *manifest.Manifest) (string, bool) {
|
||||
return filepath.Dir(runsDir), true
|
||||
}
|
||||
|
||||
func manifestPromotedPaths(previousManifest *manifest.Manifest) []string {
|
||||
func manifestPublishedPaths(previousManifest *manifest.Manifest) []string {
|
||||
if previousManifest == nil || len(previousManifest.Stages) == 0 {
|
||||
return nil
|
||||
}
|
||||
sr := previousManifest.Stages["archive"]
|
||||
sr := previousManifest.Stages["publish"]
|
||||
if sr == nil || sr.Metadata == nil {
|
||||
return nil
|
||||
}
|
||||
raw, ok := sr.Metadata["promoted_paths"]
|
||||
raw, ok := sr.Metadata["published_paths"]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -155,10 +155,10 @@ func previousManifestWithOutput(t *testing.T, cfg *config.Config, rel string, pr
|
||||
})
|
||||
}
|
||||
if promoted != nil {
|
||||
if m.Stages["archive"] == nil {
|
||||
m.MarkStageSucceeded("archive", time.Date(2026, 4, 26, 10, 2, 0, 0, time.UTC), nil)
|
||||
if m.Stages["publish"] == nil {
|
||||
m.MarkStageSucceeded("publish", time.Date(2026, 4, 26, 10, 2, 0, 0, time.UTC), nil)
|
||||
}
|
||||
m.Stages["archive"].Metadata = map[string]any{"promoted_paths": promoted}
|
||||
m.Stages["publish"].Metadata = map[string]any{"published_paths": promoted}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user