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

obsservice: connect to the sink cluster and run migrations #82695

Merged
merged 2 commits into from
Jun 24, 2022

Conversation

andreimatei
Copy link
Contributor

This patch adds a --sink-pgurl flag to the obsservice for the connection
string to the sink cluster. It uses it to run SQL schema migrations, of
which there is a single dummy one.

We're using https://github.com/pressly/goose for schema migrations;
it can be used both as a cmdline binary, and as a library (we use it
as a library), and it supports migrations written as either SQL files,
or as a set of go functions (for the more involved ones, I guess).

Release note: None

@andreimatei andreimatei requested review from dhartunian, abarganier and a team June 9, 2022 22:03
@andreimatei andreimatei requested a review from a team as a code owner June 9, 2022 22:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andreimatei andreimatei force-pushed the obsservice.connect-sql branch from 0b73198 to 0df7118 Compare June 10, 2022 15:44
Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

:lgtm: approach looks straightforward to me :)

Reviewed 13 of 13 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @abarganier)

Copy link
Contributor

@abarganier abarganier left a comment

Choose a reason for hiding this comment

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

Nice and easy to follow! :lgtm_strong:

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @andreimatei)

@andreimatei andreimatei force-pushed the obsservice.connect-sql branch from 0df7118 to a766287 Compare June 21, 2022 21:52
Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @dhartunian)

@craig
Copy link
Contributor

craig bot commented Jun 22, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 23, 2022

Merge conflict.

This patch adds a --sink-pgurl flag to the obsservice for the connection
string to the sink cluster. It uses it to run SQL schema migrations, of
which there is a single dummy one.

We're using https://github.com/pressly/goose for schema migrations;
it can be used both as a cmdline binary, and as a library (we use it
as a library), and it supports migrations written as either SQL files,
or as a set of go functions (for the more involved ones, I guess).

Release note: None
@andreimatei andreimatei force-pushed the obsservice.connect-sql branch from a766287 to 7e07fc1 Compare June 23, 2022 18:27
Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @dhartunian)

@craig
Copy link
Contributor

craig bot commented Jun 23, 2022

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Jun 23, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 24, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 24, 2022

Build succeeded:

@craig craig bot merged commit 4ff65df into cockroachdb:master Jun 24, 2022
@andreimatei andreimatei deleted the obsservice.connect-sql branch July 11, 2022 18:26
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.

4 participants