Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for "bashbrew children" with SharedTags in FROM/--from= #82

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

tianon
Copy link
Member

@tianon tianon commented Sep 15, 2023

There's some hopefully good code comments describing this better, but essentially this changes the algorithm to have the "first" tag/entry in the SharedTag group be the "owner" of all the shared tags (instead of the following tags clobbering that and them thus being "owned" by the final Windows entry).

Before (finding tags which have both Debian and Ubuntu in their parentage):

$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
$ # (empty list, but adding "--arch-filter" makes it work:)
$ comm -12 <(bashbrew children --arch-filter debian | sort) <(bashbrew children --arch-filter ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j

After:

$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j

There's some hopefully good code comments describing this better, but essentially this changes the algorithm to have the "first" tag/entry in the SharedTag group be the "owner" of all the shared tags (instead of the following tags clobbering that and them thus being "owned" by the final Windows entry).

Before (finding tags which have both Debian *and* Ubuntu in their parentage):

```console
$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
$ # (empty list, but adding "--arch-filter" makes it work:)
$ comm -12 <(bashbrew children --arch-filter debian | sort) <(bashbrew children --arch-filter ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j
```

After:

```console
$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j
```
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.10%. Comparing base (ca308fd) to head (ed66831).
Report is 40 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #82   +/-   ##
=======================================
  Coverage   73.10%   73.10%           
=======================================
  Files           7        7           
  Lines         714      714           
=======================================
  Hits          522      522           
  Misses        162      162           
  Partials       30       30           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yosifkit yosifkit merged commit 6334a4f into docker-library:master Sep 15, 2023
4 checks passed
@tianon tianon deleted the sharedtag-children branch September 16, 2023 02:36
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.

4 participants