feat: introduce experiment created and updated events#1342
Open
yoganandaness wants to merge 8 commits intodevelopfrom
Open
feat: introduce experiment created and updated events#1342yoganandaness wants to merge 8 commits intodevelopfrom
yoganandaness wants to merge 8 commits intodevelopfrom
Conversation
…osal and experiment messages with sample data.
…oker and define its interface.
…nit tests for message generation.
2363855 to
f5d8335
Compare
… creation/update events to the message broker.
3f83c1b to
990dfa2
Compare
…or-message-to-scic
| shortCode: string; | ||
| title: string; | ||
| submitted: boolean; | ||
| samples?: { id: number; title: string }[]; |
Contributor
There was a problem hiding this comment.
suggestion: Can we do a simple Pick<Sample, 'id' | 'title'> here. This would help if anyone refactors in the future
| endsAt: Date; | ||
| status: string; | ||
| proposal?: ProposalMessageData; | ||
| samples?: { id: number; title: string }[]; |
| await sampleDataSource.getSamples({ | ||
| filter: { proposalPk: proposal.primaryKey }, | ||
| }) | ||
| ).map((sample) => ({ |
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
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.
Description
This pull request introduces significant improvements to the backend's event handling and message brokering, especially around experiments and proposals. The main changes include implementing a new function to generate comprehensive experiment message data (including related samples, proposal, and instrument information), updating the RabbitMQ message broker to handle new experiment-related events, and enhancing mock data sources and tests to support these features.
Motivation and Context
Experiment event support and messaging
How Has This Been Tested
Attached Unit tests
Fixes
Changes
Enhancements to message brokering and event handling:
getExperimentMessageDatafunction inmessageBroker.tsto construct detailed JSON messages for experiments, including associated samples, proposal, and instrument data.EXPERIMENT_CREATED,EXPERIMENT_UPDATED, andEXPERIMENT_ESF_SUBMITTEDevents using the new experiment message data structure.Testing improvements:
getExperimentMessageDatato verify inclusion of instrument, samples, and proposer data, and to handle missing instruments.Depends on
Tests included/Docs Updated?