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

switchover: refactor and move SWO toolset to UI #2523

Merged
merged 256 commits into from
Dec 8, 2022

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Jul 25, 2022

Description:
This PR is a new implementation of the switchover code that can be executed from the UI, replacing the need to run & connect from the command line.

A new make start-swo command has been added to the Makefile to locally start GoAlert in switchover mode.

  • added sqlc for type-safe prepared statements
  • added start-swo make target for starting in switchover mode
  • removed obsolete contextLocker from app
  • moved application name logic into the swo package
  • moved all switchover-mode DB connection logic into swo.Manager
  • dropped the switchover-shell subcommand
  • dropped the now-obsolete pauseHandler
  • added swoStatus query
  • added swoAction mutation
  • switched limit reset from truncate to delete from to be compatible with swo
  • added switchover_log table for traceable coordination of the swo
  • added a db_id column with a unique ID to validate DB URLs are correct
  • removed old switchover test
  • removed legacy switchover package
  • added swo and related packages
  • Moved DB connector logic to util/sqldrv with the RetryDriver
  • added new Switchover page to admin

Which issue(s) this PR fixes:
Closes #2506

Screenshots:
image
image
image

Describe any introduced user-facing changes:
A new Switchover page is now available in the admin section.

Describe any introduced API changes:
A new query and mutation was added to allow starting SWO.

@mastercactapus mastercactapus merged commit e2509b1 into master Dec 8, 2022
@mastercactapus mastercactapus deleted the swo-switchover-mk2 branch December 8, 2022 16:42
@Forfold
Copy link
Contributor

Forfold commented Dec 8, 2022

🎉 🎉

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.

admin: Switchover
3 participants