Skip to content

Fix: The metrics view API response is not super-set of resources response keys#3834

Merged
yadvr merged 4 commits into
apache:4.13from
shapeblue:metrics-api
Jan 30, 2020
Merged

Fix: The metrics view API response is not super-set of resources response keys#3834
yadvr merged 4 commits into
apache:4.13from
shapeblue:metrics-api

Conversation

@Pearl1594
Copy link
Copy Markdown
Contributor

Description

The metrics API has few properties missing that are present in the corresponding resource. This addressed the following issue: #3831

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

@Pearl1594 Pearl1594 requested a review from yadvr January 24, 2020 12:00
@yadvr yadvr added this to the 4.13.1.0 milestone Jan 24, 2020
}

public Boolean isDestroyed() {
public Boolean getDestroyed() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

boolean getter should adhere to is() pattern

@DaanHoogland
Copy link
Copy Markdown
Contributor

I do not care much either way but we agreed on the getter convention for booleans a while back. thoughts @rhtyd ?

@weizhouapache
Copy link
Copy Markdown
Member

weizhouapache commented Jan 24, 2020

@DaanHoogland
Copy link
Copy Markdown
Contributor

@weizhouapache looks cool. @Pearl1594 @rhtyd is there a specific reason to go back on our getter convention, or any other reason we shouldn't use lombok? (name of the neightbourhood I live in;) after the indonesian isleland \o/)

@DaanHoogland
Copy link
Copy Markdown
Contributor

@Pearl1594 @rhtyd can you meddle in on @weizhouapache 's idea? (lombok would actually make this a get<>() as it is Boolean and not boolean)

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@DaanHoogland I've reverted the particular function to it's original naming convention. the getter function need not be modified for this case.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 24, 2020

That's how BeanUtils::copyProperties and most IDEs works. The problem of booleans having is than get breaks the use case to copy bean/properties.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 24, 2020

@DaanHoogland this is a special case for the metrics apis that extend over resource list apis. Without using getters instead of issers, it cannot be fixed. Turns out the previously referred agreement is merely our own preference but not a standard convention for IDEs, and libraries.

@yadvr yadvr closed this Jan 24, 2020
@yadvr yadvr reopened this Jan 24, 2020
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 27, 2020

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-658

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 27, 2020

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr yadvr requested a review from DaanHoogland January 27, 2020 08:33
Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

code lgtm, let's discuss lombok on an issue page if appropriate.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 29, 2020

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-681

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 29, 2020

@blueorangutan test

1 similar comment
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 29, 2020

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-836)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39519 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3834-t836-kvm-centos7.zip
Smoke tests completed. 77 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr merged commit 1c130a5 into apache:4.13 Jan 30, 2020
ustcweizhou pushed a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
…apache#3834)

The metrics API has few properties missing that are present in the corresponding resource. 

Fixes apache#3831

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Rohit Yadav <rohit@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants