Skip to content

Control included quota and storage providers via build tags#3664

Merged
phbnf merged 7 commits intogoogle:masterfrom
robstradling:cmd_storage_quota_build_tags
Nov 8, 2024
Merged

Control included quota and storage providers via build tags#3664
phbnf merged 7 commits intogoogle:masterfrom
robstradling:cmd_storage_quota_build_tags

Conversation

@robstradling
Copy link
Copy Markdown
Contributor

@robstradling robstradling commented Nov 7, 2024

#3644 (comment) noted 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,cloudspanner && ls -sh trillian_log_server
55M trillian_log_server*
go build -tags=cloudspanner,crdb,mysql,postgresql && ls -sh trillian_log_server
62M trillian_log_server*

Checklist

Loading
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