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

[RFC] reporegistry: embed the test repo in the go binary for easier use #902

Closed
wants to merge 1 commit into from

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Sep 4, 2024

[draft as this needs splitting into two commits, more tests and is also a bit of a discussion starter if it's a good idea, it will also make the binaries bigger, e.g. the "build" binary increases from 25MB -> 28MB (stripped), otoh only things that "import testdata" will be affected so should not be too bad]

Running cmd/build/build currently requires running it from a git checkout so that it can find the required repository files.

This commit embeds them into the binary via "go:embed" to make it easier to use build on it's own.

This will make working with otk to generate reference images easier.

Running `cmd/build/build` currently requires running it from a git
checkout so that it can find the required repository files.

This commit embeds them into the binary via "go:embed" to make
it easier to use `build` on it's own.

This will make working with `otk` to generate reference images
easier.
@achilleas-k
Copy link
Member

I think adding a --repositories (or --repos to save some typing ^_^) would be a nicer approach to this. There are many cases where I would like to generate manifests or build an image with the same definitions but different repositories. For example, if a repository snapshot update causes errors, the investigation would be much easier if I could run the same binary (same image definitions) against two separate repository configurations, without needing to recompile.

@mvo5
Copy link
Contributor Author

mvo5 commented Sep 5, 2024

Closing as something we currently do not want.

@mvo5 mvo5 closed this Sep 5, 2024
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.

2 participants