FrankYang0529 opened a new pull request, #76418:
URL: https://github.com/apache/airflow/pull/76418
### Why
- On PRs that build the CI image on GitHub-hosted runners, every job that
loads the image rejects the CI image snapshot.
- The last commit of #74173 added `%U %G %s` to the `find` listing behind
the check on a restored snapshot. The goal was to reject a restore that changes
ownership or truncates a file.
- Two kinds of size in the `find` listing differ for the same image:
- Sizes of directories. On ext4, the size of a directory depends on the
order in which its entries were added and on the hash seed of the filesystem. A
restored layer gets its entries in a different order from the original layer on
the runner that built the image (the builder).
- Sizes of files that Docker writes for each container. `/etc/resolv.conf`
holds the host's DNS search domain, `/etc/hosts` depends on the IPv6 setting,
and `/etc/hostname` depends on the hostname.
### How
- The `find` listing no longer has a size for directories or for
`/etc/hostname`, `/etc/hosts` and `/etc/resolv.conf`. Every entry still has its
path, type, mode, owner and group. Apart from directories and those three
files, every entry also still has its size. So a truncated file or a changed
owner still fails the check.
- When the check rejects a restored image, the script now prints the
rejection message with `::warning::`. GitHub lists that warning in the
annotations on the summary page of the run, so we don't need to search a job
log to find it.
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please
change below checkbox to `[X]` followed by the name of the tool, uncomment
the "Generated-by".
-->
- [X] Yes - Claude Code
<!--
Generated-by: [Tool Name] following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]