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

Control the included quota and storage providers via Go build tags #5

Closed
wants to merge 1 commit into from

Conversation

robstradling
Copy link
Owner

google#3644 (comment) notes that the log-signer and log-server binaries are huge, due in part to the presence of multiple quota and storage providers. This PR enables providers to be included selectively via Go build tags.

By default and for backwards compatibility, all providers are included:

> go build && ls -sh trillian_log_server
62M trillian_log_server*

Specify one build tag to include just one provider:

> go build -tags=cloudspanner && ls -sh trillian_log_server
54M trillian_log_server*
> go build -tags=crdb && ls -sh trillian_log_server
37M trillian_log_server*
> go build -tags=mysql && ls -sh trillian_log_server
34M trillian_log_server*
> go build -tags=postgresql && ls -sh trillian_log_server
40M trillian_log_server*

Specify multiple, comma-separated build tags to include multiple providers. e.g.,:

> go build -tags=mysql,postgresql && ls -sh trillian_log_server
40M trillian_log_server*
> go build -tags=cloudspanner,crdb,mysql,postgresql && ls -sh trillian_log_server
62M trillian_log_server*

@mhutchinson
Copy link

I dig this. My only hesitation is that the build rules needing to list all other provider targets is somewhat brittle. But for how often we add new storage providers, we can probably live with it.

Want to raise this as a draft PR against the repo and assign Al Cutter?

@robstradling
Copy link
Owner Author

I dig this. My only hesitation is that the build rules needing to list all other provider targets is somewhat brittle. But for how often we add new storage providers, we can probably live with it.

Yeah, I agree it's not ideal. The alternative was to break backcompat though, which I figured was a non-starter.

Want to raise this as a draft PR against the repo and assign Al Cutter?

I'll make a note to do this after google#3644 has been merged.

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