-
Notifications
You must be signed in to change notification settings - Fork 44
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
Chain Event Types Removal Finale #3309
Merged
Merged
Conversation
This file contains 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
# Conflicts: # packages/chain-events/services/ChainEventsConsumer/ChainEventHandlers/migration.ts # packages/commonwealth/client/scripts/controllers/server/chain_entities.ts
# Conflicts: # packages/commonwealth/server/models/subscription.ts
# Conflicts: # packages/chain-events/services/ChainEventsConsumer/ChainEventHandlers/entityArchival.ts # packages/chain-events/services/ChainEventsConsumer/ChainEventHandlers/migration.ts # packages/chain-events/services/ChainEventsConsumer/ChainEventHandlers/notification.ts # packages/chain-events/services/ChainEventsConsumer/ChainEventHandlers/storage.ts # packages/chain-events/services/ChainEventsConsumer/republishMessages.ts # packages/chain-events/services/ChainSubscriber/util.ts # packages/chain-events/services/database/database.ts # packages/chain-events/services/database/models/chain_event.ts # packages/chain-events/services/database/models/chain_event_type.ts # packages/chain-events/src/interfaces.ts # packages/chain-events/test/integration/service-tests/chainEventsConsumer.test.ts # packages/common-common/src/rabbitmq/RabbitMQConfig.ts # packages/common-common/src/rabbitmq/rabbitMQController.ts # packages/common-common/src/rabbitmq/types/chainEventNotificationsCUD.ts # packages/common-common/src/rabbitmq/types/chainEventTypeCUD.ts # packages/common-common/src/rabbitmq/types/index.ts # packages/commonwealth/client/scripts/controllers/server/chain_entities.ts # packages/commonwealth/client/scripts/controllers/server/notifications.ts # packages/commonwealth/client/scripts/controllers/server/socket/chainEventsNs.ts # packages/commonwealth/client/scripts/models/ChainEvent.ts # packages/commonwealth/client/scripts/models/DashboardActivityNotification.ts # packages/commonwealth/client/scripts/models/Notification.ts # packages/commonwealth/client/scripts/state.ts # packages/commonwealth/server/CommonwealthConsumer/CommonwealthConsumer.ts # packages/commonwealth/server/CommonwealthConsumer/messageProcessors/chainEventTypeCUDQueue.ts # packages/commonwealth/server/models.ts # packages/commonwealth/server/models/chain_event_type.ts # packages/commonwealth/server/models/notification.ts # packages/commonwealth/server/models/subscription.ts # packages/commonwealth/server/routes/deleteChain.ts # packages/commonwealth/server/routes/getSubscribedChains.ts # packages/commonwealth/server/routes/subscription/createSubscription.ts # packages/commonwealth/server/scripts/enforceDataConsistency.ts # packages/commonwealth/server/socket/chainEventsNs.ts # packages/commonwealth/server/util/emitNotifications.ts # packages/commonwealth/test/integration/enforceDataConsistency.spec.ts # packages/commonwealth/test/systemTests/consumer.test.ts
# Conflicts: # packages/chain-events/services/ChainEventsConsumer/republishMessages.ts
# Conflicts: # packages/commonwealth/server/migrations/20221226212006-remove-unused-entity-id.js
timolegros
requested review from
jnaviask,
zakhap,
dillchen and
CowMuon
as code owners
April 2, 2023 07:26
jnaviask
approved these changes
Apr 2, 2023
timolegros
added a commit
that referenced
this pull request
Apr 4, 2023
* from event-types client side * move chain + network to event -> working chain activity dashboard * switch ce commands to ts-node-dev * chain + network added to event in ChainEventConsumer * save * filter out non entity creation/completion events for notifications * remove EventTypeCUD RabbitMQ types + config + pub/sub calls * remove ChainEventType model * remove chain-event-type migration * CET model removal fixes * CW remove CET migration * CW remove CET model * CET removal migrations + model update * migration fixes * migration fixes * chain subscriptions + chain-event notification settings + subscribedChains * add full chain to createSubscription route result + fix UI * turn off sourceMap, use proper tsconfig when building ce, and fixed scraper imports * add type check to CI + fix type errors * add type check to CI + fix type errors + remove format in CE repo * set allowJs: false in tsconfig so sourceMap files don't interrupt ts-node * RabbitMQ merge fixes * Make CI lint only the changes in the branch rather than everything * fix tsconfig + run prettier * merge fixes * merge fixes * discoverReconnectRange fix * consumer erc20 notification handler bug fix * load-env-var fix * Procfile fix * master merge fixes * fix chain-event notifications * fix chain-event email notifications * format * format * CE css fix * remove subscriptions count for chain-events * fix getSubscribedChains call * notification settings page fixes + remove unnecessary logs * format * delete script * migration script fix * prettier format * publishCustomRabbitMQMessage.ts improvements * prettier format * more script improvements for testing/QA * add dump file to gitignore * 8 min local * 15 seconds local * add fkey from NR to Sub * format * eslint + format + .prettierignore update * Ensure CET Removal Backwards Compatibility. (#2765) * Use CE proxy for events too. * Ensure backwards compatibility for deployment + fix link to chain. * Prettier fixes. * Remove log. * fixed type errors * fix lint * fix lint * format * small logging fix * migration log improvement * ce procfile fix * add missing index to notif table * Subscriptions pkey + not null * fix type * test improved CE queries * Procfile fix * heroku test * heroku test 2 * cleaup * redo migration * redo migration CE + network migration fix * fix order of CE migrations * logging for debugging 503 * error handling CE - 503 debugging * event route - 503 debugging * optimize event route db query * prettier --------- Co-authored-by: Jake Naviasky <jake@commonwealth.im> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Muon Shot <120686579+CowMuon@users.noreply.github.com> (cherry picked from commit 6632d14)
jnaviask
added a commit
that referenced
this pull request
Apr 10, 2023
* Chain Event Types Removal Finale (#3309) * from event-types client side * move chain + network to event -> working chain activity dashboard * switch ce commands to ts-node-dev * chain + network added to event in ChainEventConsumer * save * filter out non entity creation/completion events for notifications * remove EventTypeCUD RabbitMQ types + config + pub/sub calls * remove ChainEventType model * remove chain-event-type migration * CET model removal fixes * CW remove CET migration * CW remove CET model * CET removal migrations + model update * migration fixes * migration fixes * chain subscriptions + chain-event notification settings + subscribedChains * add full chain to createSubscription route result + fix UI * turn off sourceMap, use proper tsconfig when building ce, and fixed scraper imports * add type check to CI + fix type errors * add type check to CI + fix type errors + remove format in CE repo * set allowJs: false in tsconfig so sourceMap files don't interrupt ts-node * RabbitMQ merge fixes * Make CI lint only the changes in the branch rather than everything * fix tsconfig + run prettier * merge fixes * merge fixes * discoverReconnectRange fix * consumer erc20 notification handler bug fix * load-env-var fix * Procfile fix * master merge fixes * fix chain-event notifications * fix chain-event email notifications * format * format * CE css fix * remove subscriptions count for chain-events * fix getSubscribedChains call * notification settings page fixes + remove unnecessary logs * format * delete script * migration script fix * prettier format * publishCustomRabbitMQMessage.ts improvements * prettier format * more script improvements for testing/QA * add dump file to gitignore * 8 min local * 15 seconds local * add fkey from NR to Sub * format * eslint + format + .prettierignore update * Ensure CET Removal Backwards Compatibility. (#2765) * Use CE proxy for events too. * Ensure backwards compatibility for deployment + fix link to chain. * Prettier fixes. * Remove log. * fixed type errors * fix lint * fix lint * format * small logging fix * migration log improvement * ce procfile fix * add missing index to notif table * Subscriptions pkey + not null * fix type * test improved CE queries * Procfile fix * heroku test * heroku test 2 * cleaup * redo migration * redo migration CE + network migration fix * fix order of CE migrations * logging for debugging 503 * error handling CE - 503 debugging * event route - 503 debugging * optimize event route db query * prettier --------- Co-authored-by: Jake Naviasky <jake@commonwealth.im> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Muon Shot <120686579+CowMuon@users.noreply.github.com> (cherry picked from commit 6632d14) * merge CET removal fixes * add key to divs in notification settings * redraw -> forceRerender * standardized * Fix proposals page for contracts. --------- Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to Issue
Closes: #2949
Description of Changes
This PR is nearly identical to #3044 with the only changes being to redo some of the changes that we're reverted in the last attempt at deploying chain-event-types removal.
Hugely reduces
Notifications
table size (5,426,564 -> 150,834 rows). DB total size reduced from 10.1GB to 2.4GB. This PR also massively reduces the number of notifications and subscriptions created giving us much more time to properly redesign notifications to facilitate scaling. We should also see a considerable performance gain forpg:copy
operations or full DB dumps.Test Plan
Deployment Plan
Other Considerations