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 "example" generated commands (so changes to generated commands are easier to see) #18

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

tianon
Copy link
Member

@tianon tianon commented Jan 25, 2024

See #17 (comment)

Realizing we could (ab)use our sources.json and builds.json test suite to generate some example commands in the repo itself so that changes like this actually show what the pull/build/push command change is (and helps illustrate why the changes are being made). 👀

@tianon tianon requested a review from yosifkit as a code owner January 25, 2024 23:36
@@ -12,5 +12,27 @@ set -- docker:cli docker:dind docker:windowsservercore notary # a little bit of
# (see "library/" and ".external-pins/" for where these come from / are hard-coded for consistent testing purposes)
# NOTE: we are explicitly *not* pinning "golang:1.19-alpine3.16" so that this also tests unpinned parent behavior (that image is deprecated so should stay unchanging)

time bashbrew fetch "$@"
Copy link
Member Author

Choose a reason for hiding this comment

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

Splitting this out from being implied by sources.sh would've made PRs like #16 more interesting (because we'd see the actual change in generation time, not affected by Git fetch time), but we're doing such a small set here that it's really not much of a difference. 😄

@yosifkit yosifkit merged commit 7d4bdda into docker-library:main Jan 25, 2024
1 check passed
@yosifkit yosifkit deleted the example-commands branch January 25, 2024 23:47
[
first(.[] | select(normalized_builder == "buildkit")),
first(.[] | select(normalized_builder == "classic")),
first(.[] | select(normalized_builder == "oci-import")),
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like this would select three builds, but there are only two sets of commands generated. Is this because there are no oci-import examples yet?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's correct -- I had originally left a # TODO oci-import here, but realized I could just add the conditional and it would match as soon as there was an example in the test data (which I plan to add when I have an implementation in meta.jq).

Copy link
Member Author

Choose a reason for hiding this comment

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

(In other words, this is currently a very fancy and computational way to spell empty 😂)

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