Skip to content

Event validation & add Task related events - #7

Merged
mocsharp merged 3 commits into
release/0.1.0from
vchang/task-message-definitions
Apr 11, 2022
Merged

Event validation & add Task related events#7
mocsharp merged 3 commits into
release/0.1.0from
vchang/task-message-definitions

Conversation

@mocsharp

@mocsharp mocsharp commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

Description

Rename message body definitions from *Message to *Event and added EventBase with Validation() using System.ComponentModel.DataAnnotations.

Validation is done recursively for all properties and validates all validation attributes.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • All tests passed locally.
  • Documentation comments included/updated.

Add validation to events.

Signed-off-by: Victor Chang <vicchang@nvidia.com>
@mocsharp mocsharp added the enhancement New feature or request label Apr 8, 2022
@mocsharp mocsharp added this to the 0.1.0 milestone Apr 8, 2022
@mocsharp mocsharp self-assigned this Apr 8, 2022
@mocsharp
mocsharp marked this pull request as draft April 8, 2022 00:38
Signed-off-by: Victor Chang <vicchang@nvidia.com>
@codecov

codecov Bot commented Apr 8, 2022

Copy link
Copy Markdown

Codecov Report

Merging #7 (0ccaabd) into release/0.1.0 (ffcf29a) will increase coverage by 1.11149%.
The diff coverage is 94.44444%.

Impacted file tree graph

@@                   Coverage Diff                   @@
##           release/0.1.0          #7         +/-   ##
=======================================================
+ Coverage       93.77778%   94.88927%   +1.11148%     
=======================================================
  Files                 19          24          +5     
  Lines                450         587        +137     
  Branches              15          32         +17     
=======================================================
+ Hits                 422         557        +135     
+ Misses                24          22          -2     
- Partials               4           8          +4     
Flag Coverage Δ
unittests 94.88927% <94.44444%> (+1.11148%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../Messaging/Configuration/ConfigurationException.cs 50.00000% <ø> (+25.00000%) ⬆️
src/Messaging/Common/MessageValidationException.cs 42.85714% <42.85714%> (ø)
src/Messaging/Events/EventBase.cs 91.83673% <91.83673%> (ø)
src/Messaging/Events/ExportCompleteEvent.cs 100.00000% <100.00000%> (ø)
src/Messaging/Events/ExportRequestEvent.cs 83.33333% <100.00000%> (ø)
src/Messaging/Events/WorkflowRequestEvent.cs 100.00000% <100.00000%> (ø)
src/Messaging/Test/EventBaseTest.cs 100.00000% <100.00000%> (ø)
src/Messaging/Test/ExportCompleteEventTest.cs 100.00000% <100.00000%> (ø)
src/Messaging/Test/TaskCompleteEventTest.cs 100.00000% <100.00000%> (ø)
src/Messaging/Test/TaskDispatchEventTest.cs 100.00000% <100.00000%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffcf29a...0ccaabd. Read the comment docs.

Signed-off-by: Victor Chang <vicchang@nvidia.com>
@mocsharp
mocsharp force-pushed the vchang/task-message-definitions branch from c061a88 to 0ccaabd Compare April 8, 2022 19:11
@sonarqubecloud

sonarqubecloud Bot commented Apr 8, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

91.5% 91.5% Coverage
0.0% 0.0% Duplication

@mocsharp
mocsharp marked this pull request as ready for review April 8, 2022 19:27
@mocsharp
mocsharp requested a review from a team April 8, 2022 23:07

@DanielNuttall-AD DanielNuttall-AD left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@mocsharp
mocsharp merged commit a31c717 into release/0.1.0 Apr 11, 2022
@mocsharp
mocsharp deleted the vchang/task-message-definitions branch April 11, 2022 15:25
jeanpatrickleger pushed a commit that referenced this pull request Jun 14, 2022
* Rename Message to Event used in the message body.
* Add validation to events and validate event messages on all properties recursively.

Signed-off-by: Victor Chang <vicchang@nvidia.com>
Signed-off-by: JP LEGER <jeanpatrick.leger@gmail.com>
mocsharp added a commit that referenced this pull request Jun 27, 2022
* Rename Message to Event used in the message body.
* Add validation to events and validate event messages on all properties recursively.

Signed-off-by: Victor Chang <vicchang@nvidia.com>
mocsharp added a commit that referenced this pull request Jun 27, 2022
* Rename Message to Event used in the message body.
* Add validation to events and validate event messages on all properties recursively.

Signed-off-by: Victor Chang <vicchang@nvidia.com>
@github-actions

Copy link
Copy Markdown

🎉 This issue has been resolved in version 0.1.2 🎉

The release is available on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants