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

engine: fix for notification channel deduplication migration #3971

Merged
merged 9 commits into from
Jul 8, 2024

Conversation

mastercactapus
Copy link
Member

Description:
Fixes a big issue with the notification channel deduplication migration.

  • Introduces the ability to add data to the migrations_test.go tests.
  • Updates the dedup migration so other updates will retain the dedup table
  • Uses the dedup table to do a 1-time migration of the schedule_data table as necessary
  • Adds a smoketest that reproduces the bug (try disabling the schedule manager migration code to see the fkey error)

Out of Scope

  • For instances updated between the problematic migration and this fix (nightly builds June 29th - July 9th) another PR will be opened with a fix to bypass the error so schedules don't get stuck.

- Added schedules and schedule_data inserts to enhance test coverage
- Introduced uuidJSON function for consistent JSON formatting in tests
- Store old_created_at in temporary table for deduplication
- Ensure old_created_at is restored when rolled back
- Update schema.sql to reflect new table structure
- Adjust unit tests for new JSON structure in schedule_data
- Introduce migration logic for deduplicated notification channel IDs
- Add new SQL queries to support the migration
- Persist migration state to avoid redundant processing
- Update struct definitions and data mapping utilities
@github-actions github-actions bot added the size/l label Jul 8, 2024
Forfold
Forfold previously approved these changes Jul 8, 2024
allending313
allending313 previously approved these changes Jul 8, 2024
@mastercactapus mastercactapus dismissed stale reviews from allending313 and Forfold via 2942d62 July 8, 2024 20:39
@mastercactapus mastercactapus merged commit 66ef297 into master Jul 8, 2024
7 checks passed
@mastercactapus mastercactapus deleted the nc-dedup-fix branch July 8, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants