Update job archive retention to uniform policy with json and parquet target format

This commit is contained in:
2026-02-13 12:19:31 +01:00
parent 140c7f6e47
commit 2c8608f5a4
6 changed files with 533 additions and 158 deletions

View File

@@ -36,7 +36,11 @@ func NewFileTarget(path string) (*FileTarget, error) {
}
func (ft *FileTarget) WriteFile(name string, data []byte) error {
return os.WriteFile(filepath.Join(ft.path, name), data, 0o640)
fullPath := filepath.Join(ft.path, name)
if err := os.MkdirAll(filepath.Dir(fullPath), 0o750); err != nil {
return fmt.Errorf("create parent directory: %w", err)
}
return os.WriteFile(fullPath, data, 0o640)
}
// S3TargetConfig holds the configuration for an S3 parquet target.