Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Hotfix] Fix switchModel API response handler #41

Merged
merged 1 commit into from
Nov 1, 2018

Conversation

keigohtr
Copy link
Member

@keigohtr keigohtr commented Nov 1, 2018

What is this PR for?

Switching model is always shown as failure on WebUI but actually success.
This is because our API response handler didn't catch the status correctly.

This PR includes

  • Fix SwitchModel API response handler

What type of PR is it?

Bugfix

What is the issue?

N/A

How should this be tested?

Switch model on WebUI.

@@ -814,6 +814,7 @@ def switch_drucker_service_model_assignment(
name="{0}-deployment".format(sobj.service_name),
namespace=sobj.service_level
)
response_body["status"] = True
Copy link
Member

Choose a reason for hiding this comment

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

It might fix the problem, but meaning of status as True seems confusing.
status is often like OK, NG etc.

Did response_body["success"] = True not work?

Copy link
Member Author

Choose a reason for hiding this comment

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

All backend responses return response_body["status"] = True now. If we change it to response_body["success"] = True, we need to replace all fields in backend and frontend.

We may use status as integer, but may change in the next PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, a separate PR is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you :)

Copy link
Member

@yoquankara yoquankara left a comment

Choose a reason for hiding this comment

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

LGTM

@keigohtr keigohtr merged commit bc4de21 into master Nov 1, 2018
@keigohtr keigohtr deleted the hotfix/fix-switchmodelapi-response branch November 1, 2018 05:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants