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

refactor!: Use bool types for command parameters to be more consistent #4276

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

jinlinGuan
Copy link
Contributor

@jinlinGuan jinlinGuan commented Jan 12, 2023

BREAKING CHANGE: ds-pushevent and ds-returnevent to use bool true/false instead of yes/no

related: edgexfoundry/go-mod-core-contracts#782

Signed-off-by: Ginny Guan [email protected]

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/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?)
    docs: Update docs to use true/false for ds-pushevent and ds-returnevent in 3.0 edgex-docs#917 and the core-command Swagger file in this repo

Testing Instructions

build core-command and device-virtual docker images based on the changes and run docker-compose.yml
The following commands work as expected:

curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-pushevent\=true
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-pushevent\=false
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-return\=true
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-return\=false

and the following commands return errors as expected:

curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-pushevent\=yes
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-pushevent\=no
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-return\=yes
curl http://localhost:59882/api/v2/device/name/Random-Boolean-Device/Bool\?ds-return\=no

New Dependency Instructions (If applicable)

@cloudxxx8
Copy link
Member

please modify the Swagger file as well

BREAKING CHANGE: ds-pushevent and ds-returnevent to use bool true/false instead of yes/no

related: edgexfoundry/go-mod-core-contracts#782

Signed-off-by: Ginny Guan <[email protected]>
@sonarqubecloud
Copy link

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

No Coverage information No Coverage information
3.8% 3.8% Duplication

@bnevis-i bnevis-i marked this pull request as ready for review January 13, 2023 22:45
@bnevis-i
Copy link
Collaborator

bnevis-i commented Jan 13, 2023

@jinlinGuan Go mod changes are propagated; marking ready for review (PS see Cloud's note)

Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@bnevis-i
Copy link
Collaborator

@cloudxxx8 Do you think we could merge this one and do the swagger in a followup PR? The breaking change not merged is holding me up on my security work.

@jinlinGuan
Copy link
Contributor Author

The core-command Swagger file has already been updated in this PR.

@cloudxxx8 Do you think we could merge this one and do the swagger in a followup PR? The breaking change not merged is holding me up on my security work.

@lenny-goodell lenny-goodell merged commit 81801e3 into edgexfoundry:main Jan 17, 2023
@jinlinGuan jinlinGuan deleted the issue-780-command branch January 18, 2023 09:11
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.

4 participants