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 included quota and storage providers via build tags #3664

Merged
merged 7 commits into from
Nov 8, 2024

Conversation

robstradling
Copy link
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

@robstradling robstradling requested a review from a team as a code owner November 7, 2024 10:40
@phbnf
Copy link
Contributor

phbnf commented Nov 7, 2024

/gcbrun

@robstradling robstradling marked this pull request as draft November 7, 2024 10:56
@robstradling robstradling marked this pull request as ready for review November 7, 2024 11:12
@phbnf
Copy link
Contributor

phbnf commented Nov 7, 2024

Looks neat, thanks. Do you mind adding an entry in CHANGELOG.md, and something on the Working on the Code section to both publicize this feature and explain what needs to be done when someone adds a new backend storage?

@robstradling
Copy link
Contributor Author

Hi @phbnf. Done.

@phbnf
Copy link
Contributor

phbnf commented Nov 8, 2024

/gcbrun

@phbnf
Copy link
Contributor

phbnf commented Nov 8, 2024

Thanks @robstradling !

@phbnf phbnf merged commit cb94231 into google:master Nov 8, 2024
12 checks passed
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