-
Notifications
You must be signed in to change notification settings - Fork 173
feat(controlplane): refactor object storage #2613
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
Open
jirevwe
wants to merge
101
commits into
main
Choose a base branch
from
raymond/feat/refactor-object-storage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 84 commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
209c64b
Add backup jobs infrastructure for hourly project data exports
jirevwe 846276e
Add models for AzureBlobStorage and BackupJob to datastore
jirevwe 37b2f77
Add BlobStore abstraction and support for Azure Blob Storage integration
jirevwe 93928d6
Add StreamExport for gzip-compressed JSONL backups to BlobStore
jirevwe b357755
Switch ExportRecords to JSONL format with snapshot consistency using …
jirevwe bea397c
Refactor tests to use helper functions for parsing JSONL and decompre…
jirevwe 1c8c0d6
Switch ExportRecords to JSONL format with snapshot consistency using …
jirevwe 1cfe7e0
Add Azure Blob Storage configuration support to queries and migrations
jirevwe 7225cff
Add Azure Blob Storage configuration support to storage policy
jirevwe bb4378e
Add E2E tests for Azure Blob Storage backup functionality
jirevwe 6b79fd5
Refactor storage policy handling to support Azure Blob Storage and si…
jirevwe 4f1eb9c
Add unit tests for BlobStore with support for OnPrem, S3, and Azure B…
jirevwe 4f0d221
Add support for Azurite (Azure Blob Storage emulator) for testing env…
jirevwe 28bdc28
Handle "ContainerAlreadyExists" error when creating default Azurite c…
jirevwe e5edf07
Simplify `FailBackupJob` method signature by combining parameters `jo…
jirevwe db0bb0b
Add indexes for filtering and sorting `backup_jobs` by status and pro…
jirevwe c396aa3
Remove unnecessary blank line in `closeWithError` function
jirevwe 5b89ead
Add configurable backup interval support with dynamic cron scheduling…
jirevwe 6d2e37e
Refactor SQL queries and Go methods for `backup_jobs` to improve argu…
jirevwe 45fe85a
Add stress test script for backups with support for S3, Azure Blob, a…
jirevwe e2bff73
Refactor SQL queries and Go methods for `backup_jobs` to improve argu…
jirevwe 03e6ecb
Update Postgres version to 18 in docker-compose and configuration
jirevwe c8ef81f
Integrate cached repositories across services to improve query perfor…
jirevwe b698073
Add cached endpoint repository with comprehensive tests to improve ca…
jirevwe 458b63d
Add cached filter repository with tests to enhance caching and minimi…
jirevwe 3994a9b
Add cached project repository with tests to optimize caching and redu…
jirevwe 2f73f3b
Add cached subscription repository with tests to optimize caching and…
jirevwe 69071ea
Add cached API key repository with methods to enhance caching and red…
jirevwe 3a492dc
Add cached organisation repository to enhance caching and reduce data…
jirevwe 2012ef0
Add cached portal link repository to enhance caching and reduce datab…
jirevwe f2eaa0d
Update PgBouncer configuration to adjust pool mode, connection limits…
jirevwe 99cff0a
Add backup collector for CDC-based WAL streaming and periodic blob st…
jirevwe 70f90f4
Add CDC backup collector to worker for WAL streaming and periodic blo…
jirevwe a16b87e
Add publication for convoy tables to support CDC-based backup options
jirevwe 1038d54
Add CDC and replication configuration options to Convoy
jirevwe dc72280
Add publication for convoy tables to support CDC-based backup options
jirevwe 55274e6
Update Docker Compose: add ports and WAL configuration for Postgres; …
jirevwe 3adad41
Add cached repositories for API keys and portal links to enhance cach…
jirevwe 9d39d54
Remove project-scoped filtering from export functions and queries
jirevwe daad8f0
Update query struct: replace basic types with pgtype equivalents for …
jirevwe c30a8f3
Refactor repository functions to use grouped parameter declarations f…
jirevwe df1f45d
Add tests for backup collector, covering start/stop behavior, insert …
jirevwe 6ec97f3
Add end-to-end tests for CDC-based backup collector on on-prem, S3, a…
jirevwe 5d37020
Add unit tests for backup collector buffer and flush functionality
jirevwe feaef9b
Enable logical WAL in PostgreSQL test container for CDC backup tests
jirevwe ff8e6a9
Relax strict equality checks in backup export tests to allow for mult…
jirevwe 701005b
Simplify time filtering logic in backup helper tests by replacing cut…
jirevwe 6f35302
Add helper function to check UID existence in JSONL results in backup…
jirevwe 4c9ebf1
Remove project-scoped filtering test from `ExportRecords` and add `Ba…
jirevwe f0c2db3
Add path traversal protection to `OnPremClient.Upload` to prevent ins…
jirevwe 8878d6a
Make `OnPremClient.Upload` context-aware to handle cancellation durin…
jirevwe 1a9c92c
Make `flushedLSN` thread-safe using `atomic.Uint64` and improve shutd…
jirevwe 9560251
Add nil check for `storage` in `NewBlobStoreClient` to prevent nil po…
jirevwe d49f528
Handle `pgx.ErrNoRows` in `ClaimBackupJob` to return nil instead of a…
jirevwe 1e066da
Add conditional creation of `convoy_backup` publication to handle exi…
jirevwe 5e90583
Rename `BackupProjectData` task to `ExportTableData` across the codebase
jirevwe a5d3b57
Add `ensureContainer` to AzureBlobClient for thread-safe container cr…
jirevwe fbba096
Replace `ExportTableData` task with direct call to `Exporter.StreamEx…
jirevwe bf38375
Rename `lookback` to `lookBackDur` for consistency in variable naming
jirevwe 974058a
Merge branch 'main' of https://github.com/frain-dev/convoy into raymo…
jirevwe 7b0b2bb
Remove `project_id` field from `BackupJob` and drop related database …
jirevwe 41c801d
Remove `project_id` references from backup job handling and update re…
jirevwe 74d8145
Remove `project_id` references from backup job queries and related st…
jirevwe ad91823
Update blob key and file path formatting for backups to use date and …
jirevwe bbbc528
Remove `project_id` from backup job handling and streamline backup logic
jirevwe e01614b
Offset backup job scheduling to ensure enqueue runs before processing
jirevwe 14da20b
Add new backup job utilities and remove `project_id` from backup logic
jirevwe 8affecf
Remove `projectRepo` and `project` from `Exporter` to simplify struct…
jirevwe 3af8459
Add support for offset in cron generation via `DurationToCronOffset`
jirevwe 1fc402b
Remove `projectRepo` and simplify `Exporter` constructor; update back…
jirevwe e9c6ca1
Simplify error variable scoping in `config.Override` handling.
jirevwe 0bb0de6
Update `Exporter` to use `expStart` and `expEnd` instead of `expDate`…
jirevwe 391bed9
Refactor date filtering in `Exporter` queries to use start and end ti…
jirevwe 681f512
Update `Exporter` and record-handling methods to support start and en…
jirevwe 3d87b74
Update mock repository methods to support start and end timestamps in…
jirevwe c30f808
Update tests to use start and end timestamps in `ExportRecords`, repl…
jirevwe 6cd5bd6
Add `cachedrepo` package for cache-aside repository utilities with un…
jirevwe a62a8c1
Refactor `CachedEndpointRepository` and tests to use `cachedrepo` uti…
jirevwe 84b5971
Remove `CachedFilterRepository` and associated tests; migrate to `cac…
jirevwe 5eda4f6
Remove `CachedProjectRepository` and associated tests; migrate to `ca…
jirevwe 43c4ccf
Remove `CachedSubscriptionRepository` and associated tests; migrate t…
jirevwe 1d234fd
Remove `CachedAPIKeyRepository` and associated implementation; migrat…
jirevwe e00bb76
Remove `CachedOrganisationRepository` and associated implementation; …
jirevwe 7490c92
Remove `CachedPortalLinkRepository` and associated implementation; mi…
jirevwe 9a3594d
Increase `PGBOUNCER_DEFAULT_POOL_SIZE` to 80 in local `.env` configur…
jirevwe a1709af
Clean up redundant comments in cached repository implementations.
jirevwe f2ee71f
Update tests to use explicit epoch start time in `ExportRecords` call…
jirevwe 89ba623
Update tests to use current timestamps for event seeding; revise expo…
jirevwe c9ce84e
Add unique bucket and container creation for test isolation in backup…
jirevwe 8b1ab12
Enable RetentionPolicy-based task registration and backup scheduling …
jirevwe 4f49c73
Remove unused task registrations for `MonitorTwitterSources` and `Tok…
jirevwe bb26063
Add `NewExporterWithWindow` constructor for time-bounded manual/expor…
jirevwe ef74b41
Add `ManualBackup` task for on-demand, time-bounded backup operations
jirevwe 238175e
Add `backup` command for on-demand event and delivery backup operations
jirevwe 71068df
Add `ManualBackupJob` task type for on-demand backup operations
jirevwe 7b4978e
Add `TriggerBackup` handler and API route for on-demand backup job cr…
jirevwe fa21ded
Ensure UTC timestamps in `Exporter` initialization; validate export w…
jirevwe ce01073
Refactor `EnqueueBackupJobIfIdle` to support time-bounded backup sche…
jirevwe d7edfae
Add admin guard and retention policy checks to `TriggerBackup` handler
jirevwe 1573161
Add `notFoundErr` handling to `FetchWithNotFound` for improved cache …
jirevwe 6f22c50
Invalidate cache entries in `DeleteFilter` using subscriptionID and e…
jirevwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jirevwe, was this absolutely necessary? I don't have an issue with it. I am only worried about self-hosted upgrades and if there are any incompatibilities users might run into. If we can't do without it, then we'll need to have upgrade notes.
Also, if this is a prerequisite i'm curious about the availability across cloud providers.