Skip to content

Conversation

justinswe
Copy link
Contributor

Added configurable file and directory permissions to js_image_layer

The changes implement two new attributes:

  • directory_mode (default: "0755") - controls directory permissions
  • file_mode (default: "0555") - controls file permissions

Previously, these permission modes were hardcoded in the implementation. Now users can customize them when creating image layers, while maintaining the same default behavior for backward compatibility.

Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: Yes✔️
  • Breaking change (forces users to change their own code or config): No
  • Suggested release notes appear below: Yes✔️

Suggested Release Notes:

  • Added directory_mode and file_mode to js_image_layer — specify octal permissions for directories and files in generated layer tarballs (defaults: 0755 for directories, 0555 for files`).

Test plan

  • Covered by existing test cases ✔️
  • Manual testing; please provide instructions so we can reproduce✔️:
    Manual testing can be done via JS oci image; inspect the filesystem to ensure that the 'data' attribute directories have the appropriate permissions applied.

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2025

CLA assistant check
All committers have signed the CLA.

@justinswe justinswe marked this pull request as ready for review August 16, 2025 18:11
Copy link

aspect-workflows bot commented Aug 16, 2025

Test

All tests were cache hits

222 tests (100.0%) were fully cached saving 34s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 539ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 184ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 6s.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 533ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 630ms.


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 268ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 269ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 73ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 324ms.


Test

e2e/pnpm_lockfiles

All tests were cache hits

52 tests (100.0%) were fully cached saving 6s.


Test

e2e/pnpm_workspace

All tests were cache hits

15 tests (100.0%) were fully cached saving 2s.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

15 tests (100.0%) were fully cached saving 2s.


Test

e2e/repo_mapping

All tests were cache hits

3 tests (100.0%) were fully cached saving 410ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 137ms.


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 80ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 114ms.


Buildifier      Format

Copy link
Member

@thesayyn thesayyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it!

@thesayyn thesayyn enabled auto-merge (squash) August 18, 2025 16:02
auto-merge was automatically disabled August 18, 2025 19:41

Head branch was pushed to by a user without write access

@thesayyn thesayyn merged commit d5e8479 into aspect-build:main Aug 18, 2025
99 checks passed
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.

3 participants