-
Notifications
You must be signed in to change notification settings - Fork 9
use multi layer push #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -555,8 +555,14 @@ elif [ -d "$(workspaces.shared-workspace.path)/${exportFile}" ]; then | |||||||||||||||||||||||||||||||||||||||
| [ -e "$item" ] || continue | ||||||||||||||||||||||||||||||||||||||||
| base=$(basename "$item") | ||||||||||||||||||||||||||||||||||||||||
| if [ -f "$item" ]; then | ||||||||||||||||||||||||||||||||||||||||
| echo "Creating $parts_dir/${base}${EXT_FILE}" | ||||||||||||||||||||||||||||||||||||||||
| # Record uncompressed size before compression (for OCI layer annotations) | ||||||||||||||||||||||||||||||||||||||||
| uncompressed_size=$(stat -c%s "$item" 2>/dev/null || stat -f%z "$item" 2>/dev/null || echo "") | ||||||||||||||||||||||||||||||||||||||||
| echo "Creating $parts_dir/${base}${EXT_FILE} (uncompressed: ${uncompressed_size:-unknown} bytes)" | ||||||||||||||||||||||||||||||||||||||||
| compress_file "$item" "$parts_dir/${base}${EXT_FILE}" || echo "Failed to create $parts_dir/${base}${EXT_FILE}" | ||||||||||||||||||||||||||||||||||||||||
| # Store uncompressed size in sidecar file for push_artifact.sh | ||||||||||||||||||||||||||||||||||||||||
| if [ -n "$uncompressed_size" ]; then | ||||||||||||||||||||||||||||||||||||||||
| echo "$uncompressed_size" > "$parts_dir/${base}${EXT_FILE}.size" | ||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+558
to
+565
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only write Right now the sidecar is created even if compression fails, which can leave misleading metadata. Gate the write on a successful compress. Suggested fix- compress_file "$item" "$parts_dir/${base}${EXT_FILE}" || echo "Failed to create $parts_dir/${base}${EXT_FILE}"
- # Store uncompressed size in sidecar file for push_artifact.sh
- if [ -n "$uncompressed_size" ]; then
- echo "$uncompressed_size" > "$parts_dir/${base}${EXT_FILE}.size"
- fi
+ if compress_file "$item" "$parts_dir/${base}${EXT_FILE}"; then
+ # Store uncompressed size in sidecar file for push_artifact.sh
+ if [ -n "$uncompressed_size" ]; then
+ echo "$uncompressed_size" > "$parts_dir/${base}${EXT_FILE}.size"
+ fi
+ else
+ echo "Failed to create $parts_dir/${base}${EXT_FILE}"
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| elif [ -d "$item" ]; then | ||||||||||||||||||||||||||||||||||||||||
| echo "Creating $parts_dir/${base}${EXT_DIR}" | ||||||||||||||||||||||||||||||||||||||||
| tar_dir "${exportFile}/$base" "$parts_dir/${base}${EXT_DIR}" || echo "Failed to create $parts_dir/${base}${EXT_DIR}" | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.