This time, they are distinct implementations because the problem they are solving is inherently different.
For listing children of a given name, we *have* to walk the entire library (since we only have tag -> FROM mappings, not the reverse, which is fundamentally the question that "children" answers).
On the flip side, listing the parents of a given name is as straightforward as looking up the FROM values and walking until we can't anymore.
In my own testing, these new implementations are significantly more correct, and handle more edge cases (including things we couldn't support before like `bashbrew children --depth=1 scratch`, `bashbrew children mcr.microsoft.com/windows/servercore`, etc).
They also more correctly handle edge cases like tags that are `FROM` a "`SharedTag`" such that they don't walk up/down both sides of the tree (for example, `orientdb:3.2` -> `FROM eclipse-temurin:8-jdk`, which is both Windows *and* Linux, even though `orientdb:3.2` is Linux-only).
This patch adds a new `Builder` entry to the RFC2822 image manifest
files, allowing individual image components to opt into buildkit
support, using docker buildx.
Additionally, docker build is changed to explicitly set
DOCKER_BUILDKIT=0 to force a non-buildkit build in preparation for
the switching default in any upcoming docker versions.
Signed-off-by: Justin Chadwell <me@jedevc.com>
This allows us to more easily/reliably generate lists of users to ping on PRs (with the goal to ping them automatically, if one of them is not the PR author).
This is technically a breaking change, but I consider myself probably the most prolific user of bashbrew format strings (which is where this breakage would exhibit itself -- `bashbrew cat` should be unaffected), and I have exactly one script broken by it. That script was doing some processing to generate this exact data, so IMO this is a win. 😁
bashbrew cat --format='- `{{ $.RepoName }}`:{{ range .Manifest.Global.Maintainers }} @{{ .Handle }}{{ end }}' ...
Things we know we'll need to be able to do with the new `SharedTags` (and are thus included in this initial file format support):
- get list of all shared tags from a manifest (`manifest.GetAllSharedTags()`)
- get list of shared tags from an entry (`entry.SharedTags`)
- get list of entries given a shared tag (`manifest.GetSharedTag(tag)`)