Skip to content

fix: patch /blueprints/:id wouldn't handle byte[]#2660

Merged
warren830 merged 1 commit into
apache:mainfrom
merico-ai:kw-2658-patch-blueprint
Aug 3, 2022
Merged

fix: patch /blueprints/:id wouldn't handle byte[]#2660
warren830 merged 1 commit into
apache:mainfrom
merico-ai:kw-2658-patch-blueprint

Conversation

@klesh
Copy link
Copy Markdown
Contributor

@klesh klesh commented Aug 2, 2022

Summary

PATCH /blueprints/:id was using mapstructure.Decode for blueprint partial update, which was unable to handle datatypes.JSON or json.RawMessage.

This fix enhanced the helper.DecodeMapStruct to handle the situation, and replaced mapstructure.Decode with it.

Does this close any open issues?

Closes #2658

Screenshots

image

@klesh klesh force-pushed the kw-2658-patch-blueprint branch from 041b5ec to 6672382 Compare August 2, 2022 14:21
@narrowizard
Copy link
Copy Markdown
Collaborator

narrowizard commented Aug 3, 2022

LGTM, please cherry-pick this fix to v0.12.0-rc2 verson.

Copy link
Copy Markdown
Contributor

@warren830 warren830 left a comment

Choose a reason for hiding this comment

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

LGTM

@warren830 warren830 merged commit 4f05cdc into apache:main Aug 3, 2022
@warren830 warren830 deleted the kw-2658-patch-blueprint branch August 3, 2022 01:29
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.

[Bug][framework] PATCH /blueprints failed when trying to update Settings field

3 participants