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 a datastore repair command for revisions from Postgres backups #1642

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

josephschorr
Copy link
Member

Fixes #1630

@josephschorr josephschorr requested review from jakedt, vroldanbet and a team November 9, 2023 22:08
@github-actions github-actions bot added area/CLI Affects the command line area/datastore Affects the storage system area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Nov 9, 2023
@josephschorr josephschorr force-pushed the pg-repair-revs branch 2 times, most recently from 4fbe949 to 97dbb51 Compare November 9, 2023 22:22
internal/datastore/postgres/revisions.go Show resolved Hide resolved
Short: "executes datastore repair",
Long: "Executes a repair operation for the datastore",
PreRunE: server.DefaultPreRunE(programName),
RunE: termination.PublishError(func(cmd *cobra.Command, args []string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we refactor this into a new function and add basic unit tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

For... printing and invoking a function?

Copy link
Contributor

Choose a reason for hiding this comment

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

the cmd package does not have good test coverage, and I observed regressions specifically around configuration change. This function does not have configuration going on. I still think that commands deserve test coverage too, but I leave that up to you

pkg/cmd/datastore.go Show resolved Hide resolved
pkg/cmd/datastore.go Show resolved Hide resolved
pkg/cmd/datastore.go Show resolved Hide resolved
internal/datastore/postgres/postgres.go Show resolved Hide resolved
internal/datastore/postgres/postgres.go Show resolved Hide resolved
vroldanbet
vroldanbet previously approved these changes Nov 14, 2023
vroldanbet
vroldanbet previously approved these changes Nov 15, 2023
vroldanbet
vroldanbet previously approved these changes Nov 16, 2023
@vroldanbet vroldanbet added this pull request to the merge queue Nov 17, 2023
Merged via the queue into authzed:main with commit 57bf05e Nov 17, 2023
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
@josephschorr josephschorr deleted the pg-repair-revs branch November 27, 2023 15:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line area/datastore Affects the storage system area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Transaction ID counter for Postgres backups
2 participants