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 IssuanceChainStorage PostgreSQL implementation #1618

Merged
merged 40 commits into from
Nov 26, 2024

Conversation

robstradling
Copy link
Contributor

@robstradling robstradling commented Nov 12, 2024

This PR is based on the existing IssuanceChainStorage MySQL implementation. The first several commits were auto-generated by this script, which forked the existing MySQL code into a different directory (whilst preserving the git history) and then searched'n'replaced "MySQL" to "PostgreSQL".

Checklist

@roger2hk
Copy link
Contributor

/gcbrun

@robstradling robstradling force-pushed the postgresql_storage_saving branch from 8bd62f4 to f350391 Compare November 12, 2024 15:20
@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

roger2hk commented Nov 16, 2024

The Cloud Build step 3 (ci-ready) failed because the hostname changed to postgresql_trillian-log-server_1 instead of deployment_trillian-log-server_1. The log server hostname can be found in step 2 (prepare).

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

@robstradling robstradling marked this pull request as ready for review November 20, 2024 10:49
@robstradling robstradling requested a review from a team as a code owner November 20, 2024 10:49
@robstradling robstradling requested review from phbnf and removed request for a team November 20, 2024 10:49
@roger2hk roger2hk self-requested a review November 20, 2024 11:19
Copy link
Contributor

Choose a reason for hiding this comment

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

given that the only diff between this file and the original ones is ctfe_storage_connection_string:, I wonder whether we could automatically generate them. No need to take action now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd wondered about locally editing them (e.g., with sed) in the Cloud Build script, but @roger2hk wasn't keen on that approach. We settled on duplicating the config files but avoiding duplicating the trillian/integration/ct_functions.sh script.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can have a script to generate that but I still want to have the generated config file(s) checked into the repository. This is similar to the generated protobuf files.

cloudbuild_postgresql.yaml Outdated Show resolved Hide resolved
@phbnf
Copy link
Contributor

phbnf commented Nov 25, 2024

Looks good to me, a few nits that can be handled later on - just one question as I'm not very familiar with PostgreSQL: there's no need to do anything special around STRICT mode, right? PostgreSQL handles it by always enforcing "strict mode" server side?

I'll let @roger2hk provide more insights as he's the author of the original mysql deduplication code.

@robstradling
Copy link
Contributor Author

Thanks for the review, @phbnf!

PostgreSQL doesn't have an equivalent of MySQL's "strict mode"; so yeah, it's "strict" by default.

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk
Copy link
Contributor

/gcbrun

scripts/resetpgctdb.sh Show resolved Hide resolved
@roger2hk
Copy link
Contributor

/gcbrun

@roger2hk roger2hk merged commit 3116f53 into google:master Nov 26, 2024
4 checks passed
@robstradling robstradling deleted the postgresql_storage_saving branch November 26, 2024 19:41
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