Skip to content

155: snapshotting preserves atime#178

Merged
mzihlmann merged 5 commits intomainfrom
155-timestamps-v2
Aug 13, 2025
Merged

155: snapshotting preserves atime#178
mzihlmann merged 5 commits intomainfrom
155-timestamps-v2

Conversation

@mzihlmann
Copy link
Collaborator

Fixes #155

Description

Unfortunately can't finish it on my side alone, everytime os.Open gets called we run into this issue. I don't see a way how i can monkeypatch it in go, so the only solution is to bring all dependencies to expose os as an interface, that will take some time.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

Examples of user facing changes:
- kaniko adds a new flag `--registry-repo` to override registry

@mzihlmann mzihlmann force-pushed the 155-timestamps-v2 branch 4 times, most recently from 2e90c82 to 3a3bc79 Compare August 13, 2025 19:36
@mzihlmann mzihlmann force-pushed the 155-timestamps-v2 branch 2 times, most recently from 83add1d to cf631f1 Compare August 13, 2025 20:01
@mzihlmann
Copy link
Collaborator Author

oh! buildkit doesnt preserve atime accross copy --from? let's have a look what the standard says.

@mzihlmann
Copy link
Collaborator Author

hmmm can't find reference to it, but it sort of make sense. snapshotting itself shouldnt alter atime, but if you create a copy its fine. let me check whether I can implement that behaviour here

@mzihlmann mzihlmann changed the title 155: COPY --from preserves atime 155: snapshotting preserves atime Aug 13, 2025
@mzihlmann mzihlmann force-pushed the 155-timestamps-v2 branch 3 times, most recently from 7473aee to 8c38110 Compare August 13, 2025 21:51
@mzihlmann mzihlmann marked this pull request as ready for review August 13, 2025 22:50
@mzihlmann mzihlmann merged commit c0b02c1 into main Aug 13, 2025
10 checks passed
@mzihlmann
Copy link
Collaborator Author

we can assume we have CAP_FOWNER, as per GoogleContainerTools/kaniko#778 (comment), so this feature should not break customer's setups and can be released without feature-flags. but it would be good to make this more explicit longterm.

@mzihlmann mzihlmann deleted the 155-timestamps-v2 branch August 14, 2025 07:41
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.

File creation times modified during COPY --from

1 participant