Thanks to visit codestin.com
Credit goes to github.com

Skip to content

oci_tarball: use forward slash for tar contents#178

Merged
malt3 merged 5 commits intomainfrom
oci_tar_use_slash_paths
Oct 22, 2025
Merged

oci_tarball: use forward slash for tar contents#178
malt3 merged 5 commits intomainfrom
oci_tar_use_slash_paths

Conversation

@malt3
Copy link
Collaborator

@malt3 malt3 commented Oct 21, 2025

On Windows, the oci_tarball would use backslashes in file paths, which is incorrect.
Tar files always use forward slashes.

Closes #177

@aspect-workflows
Copy link

aspect-workflows bot commented Oct 21, 2025

Bazel 8 (Test)

2 test targets passed

Targets
//img/private/release/gazelle_plugin:release_files_test [k8-fastbuild] 242ms
//util:buildifier.check [k8-fastbuild]                                 2s

Total test execution time was 2s. 13 tests (86.7%) were fully cached saving 1s.


Integration Tests (Test)

⚠️ Buildkite build #427 failed.

Failed tests (3)
//e2e:generic_bazel_7_4_0                🔗
//e2e:generic_bazel_8_4_2                🔗
//e2e:generic_bazel_9_0_0-pre_20250921_2 🔗

💡 To reproduce the test failures, run

bazel test //e2e:generic_bazel_7_4_0 //e2e:generic_bazel_8_4_2 //e2e:generic_bazel_9_0_0-pre_20250921_2

Buildifier

@malt3 malt3 force-pushed the oci_tar_use_slash_paths branch 6 times, most recently from bb909f8 to 9849075 Compare October 22, 2025 09:29
malt3 added 5 commits October 22, 2025 11:30
On Windows, the oci_tarball would use backslashes in file paths, which
is incorrect.
Tar files always use forward slashes.

Closes #177
Before, blobs would be written to the tar file in iteration order of a map.
Now, we sort blob keys to ensure deterministic ordering.
@malt3 malt3 force-pushed the oci_tar_use_slash_paths branch from 9849075 to 0f7b1f7 Compare October 22, 2025 09:30
@malt3 malt3 marked this pull request as ready for review October 22, 2025 09:57
@malt3 malt3 merged commit 94d7069 into main Oct 22, 2025
10 of 11 checks passed
@malt3 malt3 deleted the oci_tar_use_slash_paths branch October 22, 2025 10:24
@peakschris
Copy link

Thank you! Would you be able to make a new release soon so I can use this?

@malt3
Copy link
Collaborator Author

malt3 commented Oct 22, 2025

Yes, I believe we can publish a new release later today.
I'm still fixing another minor bug in #185

@malt3
Copy link
Collaborator Author

malt3 commented Oct 23, 2025

This was released with v0.2.7

@peakschris
Copy link

Thank you. We have migrated our repo containing many oci image builds running on windows and linux hosts over to rules_img 0.2.7. So far it looks great. Thank you for the new ruleset :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blobs are at wrong location in *_oci_layout.tar archives on Windows

2 participants