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

fix: Added validation for UpdateScheduleJobRequest #934

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

jackchenjc
Copy link
Contributor

refer to edgexfoundry/edgex-go#4925

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-core-contracts/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

refer to edgexfoundry/edgex-go#4925

Signed-off-by: Jack Chen <jack@iotechsys.com>
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.60%. Comparing base (4ed9aff) to head (9d7347a).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #934      +/-   ##
==========================================
+ Coverage   43.52%   43.60%   +0.07%     
==========================================
  Files         124      124              
  Lines        6752     6761       +9     
==========================================
+ Hits         2939     2948       +9     
  Misses       3557     3557              
  Partials      256      256              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

use dive or inline validation tag in dto, and the validation can be called automatically

@jackchenjc
Copy link
Contributor Author

jackchenjc commented Oct 8, 2024

Since there is no Validation func for UpdateScheduleJob dto, the validation should be called in the validation function of UpdateSubscriptionRequest.

If we create a Validation func for UpdateScheduleJob dto, the validation can be called automatically, but that function will be very similar to the one for ScheduleJob dto or the one I just committed.

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@cloudxxx8 cloudxxx8 merged commit cf5c632 into edgexfoundry:main Oct 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants