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

feat!: Allow NameFieldEscape configurable #855

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

weichou1229
Copy link
Member

@weichou1229 weichou1229 commented Sep 6, 2023

BREAKING CHANGE: Allow NameFieldEscape configurable and add API path builder for Http and MQTT client

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?) not impact

Testing Instructions

New Dependency Instructions (If applicable)

BREAKING CHANGE: Allow NameFieldEscape configurable and add API path builder for Http and MQTT client

Signed-off-by: bruce <[email protected]>
return &pathBuilder{}
}

func (b *pathBuilder) EnableNameFieldEscape(enableNameFieldEscape bool) *pathBuilder {
Copy link
Member

Choose a reason for hiding this comment

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

Why not pass enableNameFieldEscape bool to NewPathBuilder and eliminate this function?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was not a required value for the pathBuilder, so I didn't put it into the construct function.

Copy link
Member

Choose a reason for hiding this comment

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

I thought it was not a required value for the pathBuilder, so I didn't put it into the construct function.

Looks like you are always calling EnableNameFieldEscape so seems it is required.

common.NewPathBuilder().EnableNameFieldEscape

Copy link
Member Author

@weichou1229 weichou1229 Sep 12, 2023

Choose a reason for hiding this comment

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

Yes, I am always calling the function, but we will remove it in EdgeX 4.0, so would it be optional in the future?
By the way, I'm fine with removing the EnableNameFieldEscape function.

Copy link
Member

Choose a reason for hiding this comment

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

It will be removed, so it will not exist for being optional. Also the clean-up for 4.0 will be easier (slightly) if it is a parameter to the NewPathBuilder. ;-) This not a big deal, so approving PR as is since device services are failing again without it.

@lenny-goodell lenny-goodell merged commit ae77527 into edgexfoundry:main Sep 12, 2023
@weichou1229 weichou1229 deleted the name-escape branch September 13, 2023 00:15
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.

2 participants